How latawan-20041601/nextjs-crud-latawan works
TaskFlow is a Next.js task-management dashboard. Users open the dashboard, then create, edit, complete, search, filter, sort, and delete tasks, while managing categories and a saved theme preference. The client calls task and category API routes; those validate requests and access SQLite through the shared database module. The README also documents schema migration and retained task data. Edges reflect shown client fetches, route imports, and SQL access; theme persistence and several dashboard capabilities are documented, but some implementation details were not sampled.
Main entry points: TaskManager.tsx Task dashboard · tasks/route.ts Task collection API · [id]/route.ts Task item API · task-validation.ts Task validation
Components 10
Dashboard
- Home entry
app/page.tsx - Task dashboard
components/TaskManager.tsx - Theme preference
components/TaskManager.tsx
HTTP API
- Task collection API
app/api/tasks/route.ts - Task item API
app/api/tasks/[id]/route.ts - Category API
app/api/categories/route.ts
Persistence and types
- Task validation
lib/task-validation.ts - Task types
lib/task-types.ts - SQLite database
lib/db.ts
Other components
- Dashboard user
Connections 14
- Dashboard user → Home entry: opens
app/page.tsx - Home entry → Task dashboard: renders
app/page.tsx - Task dashboard → Task collection API: fetches tasks
components/TaskManager.tsx - Task dashboard → Task item API: updates tasks
components/TaskManager.tsx - Task dashboard → Category API: manages categories
components/TaskManager.tsx - Task dashboard → Theme preference: saves preference
components/TaskManager.tsx - Task collection API → SQLite database: reads and writes
app/api/tasks/route.ts - Task item API → SQLite database: reads and writes
app/api/tasks/[id]/route.ts - Category API → SQLite database: reads and writes
app/api/categories/route.ts - Task collection API → Task validation: validates and serializes
app/api/tasks/route.ts - Task item API → Task validation: validates and serializes
app/api/tasks/[id]/route.ts - Task collection API → Task types: uses row type
app/api/tasks/route.ts - Task item API → Task types: uses row type
app/api/tasks/[id]/route.ts - Task validation → Task types: uses types
lib/task-validation.ts