feat: migrate schema to DATE type, add test infrastructure

- Migrate due_date/next_occurrence columns from TIMESTAMPTZ to DATE
- Update serializeRow() to distinguish DATE vs TIMESTAMPTZ serialization
- Simplify frontend date parsing (no more timezone workarounds)
- Add Vitest + Testing Library test infrastructure
- Add initial date parsing/formatting unit tests
- Update package.json with dev dependencies (vitest, testing-library, jsdom)
This commit is contained in:
Victor
2026-05-03 03:16:54 +00:00
commit 6daa8f7f59
43 changed files with 9786 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
# VixTix Implementation Plan
## Architecture
- Next.js 16 App Router (TypeScript + Tailwind)
- PostgreSQL database (Docker container, port 5433)
- Drizzle ORM for database access
- RESTful API routes under `/app/api/`
- Multi-stage Docker build with PostgreSQL
## Database Schema
- **projects**: id, name, description, color, sort_order, created_at, updated_at
- **tasks**: id, project_id (FK), title, description, completed, priority (low/medium/high/urgent), due_date, status (todo/in_progress/done), parent_task_id (FK, self-ref), recurrence_rule (daily/weekly/biweekly/monthly/yearly/none), recurrence_interval, next_occurrence, sort_order, created_at, updated_at
- **Recurring tasks**: Handled inline in tasks table. When completed, if recurrence_rule != 'none', create new task with same data, next_occurrence as new due_date, and increment sort_order.
## API Routes
- `GET /api/tasks?project=&search=&status=&priority=&due_before=&due_after=&completed=` — list with filters
- `POST /api/tasks` — create task
- `PUT /api/tasks/[id]` — update task
- `DELETE /api/tasks/[id]` — delete task
- `PATCH /api/tasks/[id]/done` — toggle completion (handles recurrence)
- `GET /api/projects` — list projects
- `POST /api/projects` — create project
- `PUT /api/projects/[id]` — update project
- `DELETE /api/projects/[id]` — delete project
- `GET /api/kanban` — tasks grouped by status
## Frontend Views
1. **Sidebar**: Projects list (click to filter), New Task button, view switcher (List/Kanban/Calendar)
2. **List View**: Filterable task list with search, sort by due date/priority. Click task opens detail panel.
3. **Kanban Board**: Three columns (Todo/In Progress/Done). Click to move between statuses.
4. **Calendar View**: Monthly grid showing tasks on due dates. Click date to create task.
5. **Detail Panel**: Right-side panel for viewing/editing task details (title, description, project, priority, due date, recurrence, subtasks).
6. **New Task Modal**: Quick add from header.
7. **Recurring Task Modal**: Configure recurrence rule and interval.
## UI Design
- Clean, modern productivity app aesthetic
- Dark sidebar (#1a1a2e), white content area
- Color-coded priority badges (red=urgent, orange=high, yellow=medium, green=low)
- Project color indicators
- Responsive layout
## Docker
- Multi-stage build: builder + runner
- PostgreSQL container on port 5433 (avoiding conflicts)
- App on port 3070
- Docker Compose for orchestration