Audit Report
taskflow-mvp · sample
Generated by LegacyDoc AI · Local VS Code workspace
- Stack
- Next.js 15 · Supabase · Tailwind
- Size
- ~12k LOC · TypeScript
- Origin
- Built with Cursor + Claude Code
01 — Project overview
A working MVP without docs
A SaaS dashboard for personal task management, built quickly across three weekends. The app runs end-to-end and has been deployed to Vercel, but there are no automated tests, no README, and key design decisions live only in chat history with the AI tools used to build it.
02 — Architecture map
High-level folder structure
app/
├── (auth)/ # sign in, sign up, forgot password
├── dashboard/
│ ├── tasks/ # core feature: CRUD + filters
│ ├── projects/ # grouping for tasks
│ └── settings/ # user preferences
├── api/
│ ├── tasks/route.ts
│ ├── projects/route.ts
│ └── webhooks/
└── lib/
├── supabase.ts # DB client
├── auth.ts # helpers
└── ai.ts # optional AI features 03 — Module summaries
What each part does
- app/dashboard/tasks — largest surface area; CRUD for tasks plus filters and sorting.
- app/api/tasks — thin route handlers; delegates to lib/supabase and lib/auth.
- lib/supabase — centralizes DB access; mixes server and client usage in places.
- lib/auth — wraps Supabase auth; some duplication with route handler logic.
- lib/ai — optional GPT-powered task suggestions; behind a feature flag.
04 — Areas to inspect
Review these before changing anything
- app/api/tasks/route.ts — review input parsing and error handling for edge cases.
- lib/supabase.ts — verify which exports are server-only vs client-safe.
- app/dashboard/tasks/TaskList.tsx — 380 lines; consider splitting by responsibility.
- lib/ai.ts — confirm feature flag behavior and timeout handling.
- next.config.mjs — verify env var loading and image domains.
05 — Cleanup priorities
What to address first
- Split TaskList into TaskList + TaskRow + TaskFilters.
- Move all DB-accessing functions to server-only modules.
- Add input parsing helper for API routes (consistent shape, consistent errors).
- Add JSDoc to public exports in lib/* for AI tool readability.
- Document required environment variables in README.
06 — AI-ready review notes
Hand this to Claude Code, Cursor, or Codex
Use the architecture map and module summaries as project context. Help me split TaskList.tsx into smaller components without changing behavior. Then propose a unified input parsing helper for API routes. Files to attach: - app/dashboard/tasks/TaskList.tsx - app/api/tasks/route.ts - lib/supabase.ts
07 — What to do next
A four-step plan
- Review areas to inspect with a developer or via AI-assisted review.
- Tackle cleanup priorities in small, reviewable PRs.
- Re-run the audit after major changes to keep context fresh.
- If hiring a vibe code cleanup specialist, share this report on day 1.