Skip to content

noir4y/kanban-backend

Repository files navigation

Kanban Board API

Backend API for a Kanban board application built with Laravel and Clean Architecture.

Tech Stack

  • PHP 8.4
  • Laravel 12.x
  • MySQL 8.0
  • Docker
  • Laravel Sanctum

Development Tools

  • PHPStan/Larastan
  • Laravel Pint
  • PHPUnit

Architecture

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/

Setup

Prerequisites

  • Docker & Docker Compose

Quick Start

# Clone the repository
git clone <repository-url>
cd kanban-backend

# Initial setup (first time only)
make setup

# Access: http://localhost:8000

Subsequent Launches

# Start containers
make up

# Stop containers
make down

API Endpoints

Authentication is required for all endpoints except /api/auth/register and /api/auth/login. For authenticated APIs, include the following header.

Authorization: Bearer <token>

Authentication

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)

Boards (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

Columns (Auth Required)

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

Cards (Auth Required)

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

Development Commands

# Run tests
make test

# Shell access inside container
make shell

# View logs
make logs

# Clear cache
make clear

Testing

# Run all tests
make test

# Run specific test (inside container)
make shell
php artisan test --filter=BoardApiTest

CI/CD

GitHub Actions automatically runs the following.

  • Lint Job: Pint (format check) + Larastan (static analysis)
  • Test Job: PHPUnit tests (MySQL environment)

Data Model

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)

Frontend

For the frontend that works with this API, please refer to the following repository.

About

Backend API for a Kanban board application built with Laravel and Clean Architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages