Skip to content

stlgaits/todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToDo & Co

A simple to-do list app which may have needed some enhancements here & there!

Codacy Badge GitHub release (latest by date) GitHub package.json dependency version (prod) GitHub repo size GitHub issues GitHub closed issues GitHub last commit docsify Codacy Badge

📣📣📣 You can view the detailed documentation & UML diagrams of this project here 📣📣📣

!> This project is part of the Openclassrooms PHP / Symfony Apps Developer training course. It consists in auditing, unit-testing, profiling & making improvements to an existing to-do list app built in Symfony 3.1 (available here).

Estelle's GitHub stats

Installation

Downloading the project

If you would like to install this project on your computer, you will first need to clone the repo of this project using Git.

At the root of your project, you need to create a .env.local file (same level as .env) in which you need to configure the appropriate values for your blog to run. Specifically, you need to override the following variables :

DATABASE_URL="mysql://root:password@localhost:3306/todo"
ADMIN_EMAIL=youremail@example.com
ADMIN_PASSWORD=ChooseAStrongPersonalPasswordHere
ADMIN_USERNAME=youradminusername
APP_ENV=dev
APP_DEBUG=true

Requirements

  • PHP 8.0 or above
  • yarn & Node.js
  • composer
  • Download the Symfony CLI.
  • Run this command will guide you in cases there are missing extensions or parameters you need to tweak on your machine

It is highly recommended to have the APCU & OPCache PHP plugin configured to optimize performance with the following configuration

// php.ini

[apcu]
extension = php_apcu.dll
apc.enabled = 1
apc.shm_size = 32M
apc.ttl = 7200
apc.enable_cli = 1
apc.serializer = php

[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=60
opcache.file_cache="C:/yourfolder/opcache"
opcache.file_cache_fallback=1
symfony check:requirements  

Install dependencies

Before running the project, you need to run the following commands in order to install the appropriate dependencies.

composer install

Create a database

Now let's create our database. This will use the DATABASE_URL you've provided in .env.local file.

php bin/console doctrine:database:create

Generating the database schema

 php bin/console doctrine:schema:update --force

Loading the initial data (initial tasks & anonymous user)

php bin/console doctrine:fixtures:load --append

Install & build web assets

yarn install
yarn watch

Now you should be ready to launch the dev webserver using

symfony serve

The symfony serve command will start a PHP webserver. You can now go to your localhost URL : http://127.0.0.1:8000 where the app should be displayed.

NB: alternatively, if you do not wish to use the Symfony webserver, you can always use WAMP / Laragon / MAMP or a similar webserver suite.

Running the project in prod mode

In order to run the project in production mode, you need to override the following variables in your .env.local file :

APP_ENV=prod
APP_DEBUG=false

Then, you need to run yarn for prod mode as well with yarn build.

Success Criteria

The aim of this project is to evaluate the following skills :

  • to set up & implement unit & functional tests
  • to implement new features on an existing app
  • to read & describe pieces of code written by other developers
  • to make a test results report
  • to evaluate code quality & app performance
  • to set up an action plan in order to reduce an app's technical debt
  • to provide corrective patches when tests suggest so
  • to give advice on how to improve the project even further

Credits

Created by Estelle Gaits as the eigth project of the Openclassrooms PHP / Symfony Apps Developer training course.

%[{ CONTRIB.md }]%