Implement complete nested todo tree web app MVP

This commit implements a fully functional self-hosted task decomposition engine with:

Backend (FastAPI + SQLite):
- RESTful API with full CRUD operations for projects and tasks
- Arbitrary-depth hierarchical task structure using self-referencing parent_task_id
- JSON import endpoint for seeding projects from LLM-generated breakdowns
- SQLAlchemy models with proper relationships and cascade deletes
- Status tracking (backlog, in_progress, blocked, done)
- Auto-generated OpenAPI documentation

Frontend (React + Vite + Tailwind):
- Dark cyberpunk theme with orange accents
- Project list page with create/import/delete functionality
- Dual view modes:
  * Tree View: Collapsible hierarchical display with inline editing
  * Kanban Board: Drag-and-drop status management
- Real-time CRUD operations for tasks and subtasks
- JSON import modal with validation
- Responsive design optimized for desktop

Infrastructure:
- Docker setup with multi-stage builds
- docker-compose for orchestration
- Nginx reverse proxy for production frontend
- Named volume for SQLite persistence
- CORS configuration for local development

Documentation:
- Comprehensive README with setup instructions
- Example JSON import file demonstrating nested structure
- API endpoint documentation
- Data model diagrams
This commit is contained in:
Claude
2025-11-19 22:51:42 +00:00
parent bac534ce94
commit 441f62023e
28 changed files with 1977 additions and 0 deletions

93
backend/app/schemas.py Normal file
View File

@@ -0,0 +1,93 @@
from pydantic import BaseModel, ConfigDict
from typing import Optional, List
from datetime import datetime
from .models import TaskStatus
# Task Schemas
class TaskBase(BaseModel):
title: str
description: Optional[str] = None
status: TaskStatus = TaskStatus.BACKLOG
parent_task_id: Optional[int] = None
sort_order: int = 0
class TaskCreate(TaskBase):
project_id: int
class TaskUpdate(BaseModel):
title: Optional[str] = None
description: Optional[str] = None
status: Optional[TaskStatus] = None
parent_task_id: Optional[int] = None
sort_order: Optional[int] = None
class Task(TaskBase):
id: int
project_id: int
created_at: datetime
updated_at: datetime
model_config = ConfigDict(from_attributes=True)
class TaskWithSubtasks(Task):
subtasks: List['TaskWithSubtasks'] = []
model_config = ConfigDict(from_attributes=True)
# Project Schemas
class ProjectBase(BaseModel):
name: str
description: Optional[str] = None
class ProjectCreate(ProjectBase):
pass
class ProjectUpdate(BaseModel):
name: Optional[str] = None
description: Optional[str] = None
class Project(ProjectBase):
id: int
created_at: datetime
updated_at: datetime
model_config = ConfigDict(from_attributes=True)
class ProjectWithTasks(Project):
tasks: List[Task] = []
model_config = ConfigDict(from_attributes=True)
# JSON Import Schemas
class ImportSubtask(BaseModel):
title: str
description: Optional[str] = None
status: TaskStatus = TaskStatus.BACKLOG
subtasks: List['ImportSubtask'] = []
class ImportProject(BaseModel):
name: str
description: Optional[str] = None
class ImportData(BaseModel):
project: ImportProject
tasks: List[ImportSubtask] = []
class ImportResult(BaseModel):
project_id: int
project_name: str
tasks_created: int