A RESTful API for task management built with Laravel 12.
- PHP - Version 8.2 or higher
- Laravel - Version 12.x
- MySQL - Version 8.x
- Redis - Version 5.0 or higher
- Docker - For Laravel Sail
- Composer - PHP dependency manager
- Clone the repository
git clone https://github.com/doobie-droid/task-management-mini-app-backend.git
cd task-management-api- Install Composer dependencies
composer install- Copy environment file
cp .env.example .env- Generate application key
./vendor/bin/sail artisan key:generate- Start Docker containers with Sail
./vendor/bin/sail up -d- Run database migrations
./vendor/bin/sail artisan migrate- Access the application
- API: http://localhost
- MySQL:
localhost:3307 - Redis:
localhost:6380
./vendor/bin/sail up- Start all Docker containers./vendor/bin/sail up -d- Start containers in detached mode./vendor/bin/sail down- Stop all Docker containers./vendor/bin/sail artisan- Run Artisan commands./vendor/bin/sail composer- Run Composer commands./vendor/bin/sail mysql- Access MySQL CLI
Execute the test suite:
./vendor/bin/sail artisan testRun specific test files:
./vendor/bin/sail artisan test --filter=TaskTestGenerate HTML coverage report:
./vendor/bin/sail artisan test --coverage-html=coverageThis will:
- Run all tests with coverage collection
- Generate an HTML coverage report in the
coverage/directory - Display a coverage summary in the terminal
To view the detailed HTML coverage report:
open coverage/index.htmlNote: Make sure Xdebug is enabled in your Sail environment for coverage reports to work properly.
This project uses Scribe to automatically generate API documentation from your routes, controllers, and docblocks.
Generate the API documentation:
./vendor/bin/sail artisan scribe:generateThis will:
- Scan your routes and controllers
- Extract information from docblocks and form requests
- Generate interactive HTML documentation in
public/docs - Create a Postman collection at
public/docs/collection.json
Once generated, access your API documentation at:
http://localhost/documentation

