A simple REST API for managing tasks (todo list), built with Laravel 10 (PHP 8.2) and Docker.
This project is a pet project and serves as a demonstration of REST API architecture with online Postman documentation.
- PHP 8.2
- Laravel 10
- Docker / Docker Compose
- MySQL
- Composer
- Postman (for API documentation)
- Create new tasks
- Retrieve all tasks
- Update and delete tasks
- Mark tasks as completed / uncompleted
- Filter tasks by status
git clone https://github.com/lifan2029/api-todo-list.git
cd api-todo-listcp .env.example .envDB_CONNECTION=mysql
DB_HOST=laravel-db
DB_PORT=3306
DB_DATABASE=api_todo_list
DB_USERNAME=todolistuser
DB_PASSWORD=ortERSAkiEntALMaXIdocker compose up -d --builddocker compose exec laravel-php composer installdocker compose exec laravel-php php artisan key:generatedocker compose exec laravel-php php artisan migrate| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/task |
Get all tasks |
POST |
/api/v1/task/store |
Create a new task |
PUT |
/api/v1/task/update/{id} |
Update a task |
PUT |
/api/v1/task/complete/{id} |
Complete a task |
DELETE |
/api/v1/task/delete/{id} |
Delete a task |
Example request (create a task):
POST /api/v1/task/store
{
"title": "Build a demo project",
"description": "Create an API for a todo list",
"due_date": "01.09.2025 17:51",
"priority_id": 1
}The online Postman collection is available here:
👉 Open Postman Collection
docker compose exec laravel-php php artisan migrate:fresh --seed # Recreate DB with seed data
docker compose exec laravel-php php artisan test # Run tests
docker compose logs -f laravel-php # View container logsDeveloped by lifan2029 — Fullstack developer.
If you like this project, feel free to ⭐ star it on GitHub!
🧠 This project was created for demonstrate Laravel API development with Docker.