Backend API for a Kanban board application built with Laravel and Clean Architecture.
- PHP 8.4
- Laravel 12.x
- MySQL 8.0
- Docker
- Laravel Sanctum
- PHPStan/Larastan
- Laravel Pint
- PHPUnit
This project adopts Clean Architecture and is structured with the following layers.
app/
├── Domain/
│ ├── Board/
│ │ ├── Models/
│ │ └── Repositories/
│ └── User/
│ └── Models/
├── Application/
│ └── Board/
│ └── UseCases/
├── Infrastructure/
│ ├── Providers/
│ └── Repositories/
└── Http/
├── Controllers/
└── Requests/
- Docker & Docker Compose
# Clone the repository
git clone <repository-url>
cd kanban-backend
# Initial setup (first time only)
make setup
# Access: http://localhost:8000# Start containers
make up
# Stop containers
make downAuthentication is required for all endpoints except /api/auth/register and /api/auth/login. For authenticated APIs, include the following header.
Authorization: Bearer <token>
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
User registration |
| POST | /api/auth/login |
Login |
| POST | /api/auth/logout |
Logout (auth required) |
| GET | /api/auth/user |
Get current user info (auth required) |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/boards |
Get board list |
| POST | /api/boards |
Create board |
| GET | /api/boards/{id} |
Get board details |
| PUT | /api/boards/{id} |
Update board |
| DELETE | /api/boards/{id} |
Delete board |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/boards/{boardId}/columns |
Create column |
| PUT | /api/columns/{id} |
Update column |
| DELETE | /api/columns/{id} |
Delete column |
| PUT | /api/columns/reorder |
Reorder columns |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/columns/{columnId}/cards |
Create card |
| GET | /api/cards/{id} |
Get card details |
| PUT | /api/cards/{id} |
Update card |
| DELETE | /api/cards/{id} |
Delete card |
| PUT | /api/cards/{id}/move |
Move card |
# Run tests
make test
# Shell access inside container
make shell
# View logs
make logs
# Clear cache
make clear# Run all tests
make test
# Run specific test (inside container)
make shell
php artisan test --filter=BoardApiTestGitHub Actions automatically runs the following.
- Lint Job: Pint (format check) + Larastan (static analysis)
- Test Job: PHPUnit tests (MySQL environment)
User
├── id
├── name
├── email
└── password
Board
├── id
├── name
└── owner_id (→ User)
Column
├── id
├── board_id (→ Board)
├── name
└── position
Card
├── id
├── column_id (→ Column)
├── title
├── description
├── position
├── assignee_id (→ User)
└── created_by (→ User)
For the frontend that works with this API, please refer to the following repository.