Skip to content

ToDo & Co is a startup that offers a daily task management application.

Notifications You must be signed in to change notification settings

meline-p/todo-co

 
 

Repository files navigation

ToDo & Co

Description

ToDo & Co is a startup that offers a daily task management application.

Sommaire

Installation

  1. Clone the repository:

    git clone https://github.com/meline-p/todo-co.git
    cd todo-co
  2. Install dependencies with Composer:

    composer install
  3. Configure the environment by copying the .env file:

    cp .env .env.local
  4. Configure the test environment by copying the .env.test file:

    cp .env.test .env.test.local

Configuration

  • APP_SECRET : Generate a random secret key
    php bin/console secrets:generate-keys
  • DATABASE_URL : Database connection URL.

Ensure these parameters are configured in the .env.local and .env.test.local file.

Database

  1. Create and update the database:

    php bin/console doctrine:database:create
    php bin/console doctrine:migrations:migrate
    php bin/console doctrine:schema:update --force
  2. (Optional) Load test data:

    php bin/console doctrine:fixtures:load

Usage

Launch the website

Start the local server:

symfony serve -d

Access the application via your browser at http://localhost:8000.

Cache

  • This website uses TagAwareCacheInterface for cache management. To clear or invalidate the cache by tag, you can use the following command:

    php bin/console cache:clear
  • Or to invalidate a specific tag:

    $cachePool->invalidateTags(['your_tag']);

Unit and Functional Tests

  1. Create and update the test database:

    php bin/console doctrine:database:create --env=test
    php bin/console doctrine:migrations:migrate --env=test
    php bin/console doctrine:schema:update --force --env=test
  2. Running Tests: Unit and functional tests should be placed in the tests/ directory.

  • Run all tests:

    php vendor/bin/phpunit
  • Run a specific test:

    php vendor/bin/phpunit tests/Entity/TaskTest.php
  • Generate test coverage report:

    php vendor/bin/phpunit --coverage-html public/test-coverage

Documentation

Website Documentation:

To generate documentation, use phpDocumentor. You can download the latest PHAR file from https://phpdoc.org/phpDocumentor.phar and put it at the root of the project. Execute this command:

php phpDocumentor.phar run -d ./src -t docs/

Access the generated documentation in the docs/index.html directory. Launch Go Live on Visual Studio Code and access the online documentation in the docs directory.

Collaboration Guide: How to Contribute to the Project:

This document outlines the quality process and rules that all developers must follow when making changes to the project. It is available at the root of the project: collaboration.md.

Code Coverage Report:

This report consists of HTML files generated by PHPUnit, indicating the application's code coverage level. To generate new tests and a new coverage report:

php vendor/bin/phpunit --coverage-html public/test-coverage

About

ToDo & Co is a startup that offers a daily task management application.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 93.5%
  • PHP 4.7%
  • Twig 1.4%
  • Other 0.4%