Backend system to monitor and manage daily user orders
The project is ready to be run using laravel Sail, a built-in solution provided by Laravel to run the application using Docker. Docker Desktop is required. On Widows machines, WSL2 (Windows Subsystem for Linux) needs to be installed and enabled.
git clone https://github.com/Ambro-Gio/orders-be.gitThis command uses a docker container to install the vendor dependencies without installing php and composer on the machine.
cd path/to/orders-be/orders-be
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/opt \
-w /opt \
laravelsail/php84-composer:latest \
composer installCopy .env.example in .env. The example provided is already set up with the local mysql connection used by sail, for convenience.
cp .env.example .env./vendor/bin/sail up
./vendor/bin/sail artisan key:generate./vendor/bin/sail artisan migrateThe project is now accessible via localhost.
To run the application tests:
./vendor/bin/sail artisan test
Phpunit provides a command to generate a code coverage report.
./vendor/bin/sail phpunit --coverage-text
The report can also be generated as a html document
./vendor/bin/sail phpunit --coverage-html tests/coverage
A documentation for the orders-be Api can be found here