Skip to content

A full-stack kanban board built with Next.js 15, Django 4.2, and GraphQL. Features drag-and-drop task management and MCP server integration.

Notifications You must be signed in to change notification settings

ggustin93/nextjs-django-kanban-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Kanban Board

Full-stack task management application with GraphQL API and drag-and-drop interface.

Stack: Next.js 15, Django 4.2, TypeScript, Material UI, Apollo Client, Graphene-Django

Table of Contents

  1. Quick Start
  2. Features
  3. Tech Stack
  4. Project Structure
  5. Testing
  6. Pre-commit Hooks
  7. Continuous Integration
  8. Development Commands
  9. πŸš€ Deployment Roadmap
  10. Architecture
  11. MCP Server Integration
  12. License

1. Quick Start

# With Docker
docker-compose up --build

# Or separately
cd backend && pip install -r requirements.txt && python manage.py migrate && python manage.py runserver
cd frontend && npm install && npm run dev

2. Features

Task Management:

  • Dual view modes: Kanban board + Eisenhower Matrix
  • Priority system (P1-P4): Do First β†’ Schedule β†’ Quick Win β†’ Backlog
  • Status workflow: TODO β†’ DOING β†’ WAITING β†’ DONE
  • Category tagging with # prefix (#frontend, #backend, etc.)
  • Drag-and-drop between columns and priority quadrants

Filtering & Search:

  • Filter by priority (P1-P4) in both views
  • Filter by status (To Do, Doing, Waiting, Done) in both views
  • Filter by category with multi-select
  • Full-text search across title, description, and category

Technical Stack:

  • GraphQL API with type-safe Apollo Client
  • TypeScript end-to-end with Material UI
  • Docker development environment with hot-reload
  • Pre-commit hooks (Ruff, ESLint, Prettier)
  • MCP server for Claude AI integration

3. Tech Stack

Backend: Django 4.2, Graphene-Django, SQLite
Frontend: Next.js 15, TypeScript, Apollo Client, Material UI v7, @dnd-kit
Infrastructure: Docker Compose, pre-commit hooks (Ruff, ESLint, Prettier)

4. Project Structure

.
β”œβ”€β”€ backend/                         # Django backend (modular monolith)
β”‚   β”œβ”€β”€ apps/                       # Django apps (OpenHEXA pattern)
β”‚   β”‚   β”œβ”€β”€ core/                   # Shared base models and utilities
β”‚   β”‚   β”‚   β”œβ”€β”€ models.py           # TimeStampedModel (DRY principle)
β”‚   β”‚   β”‚   └── apps.py             # Core app configuration
β”‚   β”‚   └── kanban/                 # Kanban feature app
β”‚   β”‚       β”œβ”€β”€ models.py           # Task model (inherits TimeStampedModel)
β”‚   β”‚       β”œβ”€β”€ apps.py             # Kanban app configuration
β”‚   β”‚       β”œβ”€β”€ schema/             # GraphQL split by concern
β”‚   β”‚       β”‚   β”œβ”€β”€ types.py        # TaskType, TaskStatusEnum, TaskPriorityEnum
β”‚   β”‚       β”‚   β”œβ”€β”€ queries.py      # Query resolvers (allTasks)
β”‚   β”‚       β”‚   └── mutations.py    # Mutation resolvers (CRUD with priority/category)
β”‚   β”‚       β”œβ”€β”€ graphql/            # Exported GraphQL schema
β”‚   β”‚       β”‚   └── schema.graphql  # For frontend consumption
β”‚   β”‚       β”œβ”€β”€ tests/              # App-specific tests
β”‚   β”‚       β”‚   β”œβ”€β”€ test_models.py  # Model validation tests
β”‚   β”‚       β”‚   └── test_schema.py  # GraphQL API tests
β”‚   β”‚       β”œβ”€β”€ management/         # Django management commands
β”‚   β”‚       β”‚   └── commands/
β”‚   β”‚       β”‚       └── seed_tasks.py  # Sample data generator
β”‚   β”‚       └── migrations/         # Database migrations
β”‚   β”œβ”€β”€ config/                     # Django configuration
β”‚   β”‚   β”œβ”€β”€ settings.py             # Single settings file
β”‚   β”‚   β”œβ”€β”€ urls.py                 # URL routing
β”‚   β”‚   └── schema.py               # Root GraphQL schema (composition)
β”‚   β”œβ”€β”€ integrations/               # External service integrations
β”‚   β”‚   └── mcp/                    # Model Context Protocol server
β”‚   β”‚       β”œβ”€β”€ server.py           # FastMCP implementation
β”‚   β”‚       β”œβ”€β”€ fastmcp.json        # Server configuration
β”‚   β”‚       β”œβ”€β”€ mcp_config.example.json  # Claude Desktop config template
β”‚   β”‚       └── README.md           # MCP setup instructions
β”‚   β”œβ”€β”€ scripts/                    # Utility scripts
β”‚   β”‚   β”œβ”€β”€ export_schema.py        # GraphQL schema export
β”‚   β”‚   └── README.md               # Scripts documentation
β”‚   β”œβ”€β”€ tests/                      # Project-wide integration tests
β”‚   β”‚   β”œβ”€β”€ integration/
β”‚   β”‚   β”‚   └── test_mcp_server.py  # MCP server async tests
β”‚   β”‚   └── conftest.py             # Pytest configuration
β”‚   β”œβ”€β”€ data/                       # SQLite database directory
β”‚   β”‚   └── db.sqlite3
β”‚   β”œβ”€β”€ requirements.txt            # Python dependencies
β”‚   β”œβ”€β”€ Dockerfile                  # Multi-stage Docker build
β”‚   └── manage.py                   # Django management script
β”‚
β”œβ”€β”€ frontend/                       # Next.js frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”‚   β”‚   β”œβ”€β”€ layout.tsx          # Root layout
β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx            # Home page (redirects to /tasks)
β”‚   β”‚   β”‚   β”œβ”€β”€ providers.tsx       # App providers (Theme, Apollo)
β”‚   β”‚   β”‚   └── tasks/
β”‚   β”‚   β”‚       └── page.tsx        # Kanban board page
β”‚   β”‚   β”œβ”€β”€ components/             # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ Board.tsx           # Main board orchestrator
β”‚   β”‚   β”‚   β”œβ”€β”€ ApolloWrapper.tsx   # Apollo Client provider
β”‚   β”‚   β”‚   └── kanban/             # Kanban-specific components
β”‚   β”‚   β”‚       β”œβ”€β”€ types.ts        # TypeScript types (TaskStatus, TaskPriority)
β”‚   β”‚   β”‚       β”œβ”€β”€ TaskCard.tsx    # Draggable task card with priority badge
β”‚   β”‚   β”‚       β”œβ”€β”€ KanbanColumn.tsx  # Column with drop zone + sorting
β”‚   β”‚   β”‚       β”œβ”€β”€ TaskDialog.tsx  # Create/edit dialog with priority/category
β”‚   β”‚   β”‚       └── useTaskDialog.ts  # Dialog state hook
β”‚   β”‚   β”œβ”€β”€ graphql/                # GraphQL operations
β”‚   β”‚   β”‚   β”œβ”€β”€ client.ts           # Apollo Client config
β”‚   β”‚   β”‚   β”œβ”€β”€ queries.ts          # GET_TASKS query
β”‚   β”‚   β”‚   └── mutations.ts        # CREATE/UPDATE/DELETE mutations
β”‚   β”‚   β”œβ”€β”€ theme/                  # Material UI theme
β”‚   β”‚   β”‚   └── theme.ts            # Custom theme configuration
β”‚   β”‚   └── __tests__/              # Frontend tests
β”‚   β”œβ”€β”€ package.json                # Node dependencies
β”‚   β”œβ”€β”€ next.config.ts              # Next.js configuration
β”‚   β”œβ”€β”€ Dockerfile                  # Multi-stage Docker build
β”‚   └── tsconfig.json               # TypeScript configuration
β”‚
β”œβ”€β”€ docker-compose.yml              # Services orchestration
β”œβ”€β”€ Makefile                        # Development shortcuts
β”œβ”€β”€ .pre-commit-config.yaml         # Code quality hooks (Ruff, ESLint)
└── .env                            # Environment variables (ports, URLs)

5. Testing

make test                                      # All tests
docker-compose exec backend python manage.py test  # Backend
cd frontend && npm test                        # Frontend

Coverage: Backend (20 tests), Frontend (12 tests)

6. Pre-commit Hooks

pip install pre-commit && pre-commit install
pre-commit run --all-files  # Manual run

Checks: Ruff (Python), ESLint + Prettier (TypeScript), YAML validation

7. Continuous Integration

GitHub Actions on push/PR: Backend linting (Ruff), Frontend linting (ESLint), Backend tests (Django), Frontend tests (Jest), Docker build validation.

8. Development Commands

make up/down         # Start/stop services
make test/migrate    # Run tests/migrations
make logs/shell      # View logs/Django shell

GraphQL API (http://localhost:8000/graphql):

  • Query: allTasks { id title status priority category }
  • Create: createTask(title: "Task", status: TODO, priority: P1)
  • Update: updateTask(id: "1", status: DOING)
  • Delete: deleteTask(id: "1")

9. Deployment

Development: Docker Compose (configured)
Production: Requires PostgreSQL migration, Gunicorn setup, CORS configuration

Deployment options: Vercel (frontend) + Render/Railway (backend) or self-hosted VPS with Docker Compose.

10. Architecture

System Architecture

graph TB
    subgraph "Frontend Layer"
        UI[Next.js 15 App]
        Apollo[Apollo Client]
        DnD["@dnd-kit"]
        MUI[Material UI v7]

        UI --> Apollo
        UI --> DnD
        UI --> MUI
    end

    subgraph "API Layer"
        GraphQL[GraphQL API<br/>Graphene-Django]
        Schema[Schema Composition<br/>Root ← Apps]
    end

    subgraph "Backend Layer - Modular Monolith"
        subgraph "Core App"
            CoreModels[TimeStampedModel<br/>Shared Base Classes]
        end

        subgraph "Kanban App"
            KanbanSchema[GraphQL Schema<br/>types, queries, mutations]
            KanbanModels[Task Model]
            KanbanLogic[Business Logic]
        end

        subgraph "Integration Layer"
            MCP[MCP Server<br/>External Integrations]
        end

        ORM[Django ORM]
    end

    subgraph "Data Layer"
        DB[(SQLite Dev<br/>PostgreSQL Prod)]
    end

    subgraph "Infrastructure"
        Docker[Docker Compose<br/>Hot Reload]
    end

    %% Data Flow
    Apollo -->|GraphQL Queries/Mutations| GraphQL
    GraphQL --> Schema
    Schema -.inherits.-> KanbanSchema
    KanbanSchema --> KanbanLogic
    KanbanLogic --> KanbanModels
    KanbanModels -.extends.-> CoreModels
    KanbanModels --> ORM
    ORM --> DB

    %% Integration Flow
    KanbanLogic -.uses.-> MCP

    %% Infrastructure
    Docker -.orchestrates.-> UI
    Docker -.orchestrates.-> GraphQL
    Docker -.orchestrates.-> DB

    %% Styling
    classDef frontend fill:#61dafb,stroke:#333,stroke-width:2px,color:#000
    classDef api fill:#e535ab,stroke:#333,stroke-width:2px,color:#fff
    classDef backend fill:#092e20,stroke:#333,stroke-width:2px,color:#fff
    classDef data fill:#336791,stroke:#333,stroke-width:2px,color:#fff
    classDef infra fill:#2496ed,stroke:#333,stroke-width:2px,color:#fff

    class UI,Apollo,DnD,MUI frontend
    class GraphQL,Schema api
    class CoreModels,KanbanSchema,KanbanModels,KanbanLogic,MCP,ORM backend
    class DB data
    class Docker infra
Loading

Backend: Feature-based apps with split GraphQL schemas, shared base models, schema composition pattern
Frontend: Single-purpose components, custom hooks, TypeScript enums, organized directory structure

11. MCP Server Integration

Model Context Protocol server for task management through Claude AI.

Setup: Configure Claude Desktop with backend/integrations/mcp/server.py path
Operations: List, create, update, delete tasks via natural language
Deployment: Supports stdio (local) and HTTP/SSE (remote) transport

See backend/integrations/mcp/README.md for configuration details.

12. License

MIT License

About

A full-stack kanban board built with Next.js 15, Django 4.2, and GraphQL. Features drag-and-drop task management and MCP server integration.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published