Skip to content

About

This is the api for the task management mini app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Task Management API

A RESTful API for task management built with Laravel 12.

Requirements

  • 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

Setup with Laravel Sail

  1. Clone the repository
   git clone https://github.com/doobie-droid/task-management-mini-app-backend.git
   cd task-management-api
  1. Install Composer dependencies
   composer install
  1. Copy environment file
   cp .env.example .env
  1. Generate application key
   ./vendor/bin/sail artisan key:generate
  1. Start Docker containers with Sail
   ./vendor/bin/sail up -d
  1. Run database migrations
   ./vendor/bin/sail artisan migrate
  1. Access the application

Available Commands

  • ./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

Running Tests

Execute the test suite:

./vendor/bin/sail artisan test

Run specific test files:

./vendor/bin/sail artisan test --filter=TaskTest

Viewing Test Coverage

Generate HTML coverage report:

./vendor/bin/sail artisan test --coverage-html=coverage

This 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.html

alt text

Note: Make sure Xdebug is enabled in your Sail environment for coverage reports to work properly.


API Documentation

Auto-generating Documentation

This project uses Scribe to automatically generate API documentation from your routes, controllers, and docblocks.

Generating Documentation

Generate the API documentation:

./vendor/bin/sail artisan scribe:generate

This 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

Viewing Documentation

Once generated, access your API documentation at:

http://localhost/documentation

alt text

About

This is the api for the task management mini app

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages