R RomantiCode
Example only — not a real customer report

AI Code Audit Report Example for an AI-generated app.

Below is a sample AI code audit report produced for a fictional vibe-coded SaaS app. It shows the structure and depth of what LegacyDoc AI generates from your local codebase.

This is an example format — not a real customer report, not a security audit, and not an automatic fix.

Audit Report

taskflow-mvp · sample

Generated by LegacyDoc AI · Local VS Code workspace

v0.1 2026-05-06 Example
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

tree
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

  1. Split TaskList into TaskList + TaskRow + TaskFilters.
  2. Move all DB-accessing functions to server-only modules.
  3. Add input parsing helper for API routes (consistent shape, consistent errors).
  4. Add JSDoc to public exports in lib/* for AI tool readability.
  5. Document required environment variables in README.

06 — AI-ready review notes

Hand this to Claude Code, Cursor, or Codex

prompt.md
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.

Reminder: This is an example format, not a real customer report and not a security audit. LegacyDoc AI helps generate context, architecture maps, and review notes — it does not perform automatic fixes, vulnerability scanning, or formal security certification.

Generate one for your own codebase

Runs inside VS Code. BYOK. No code storage or proxying by RomantiCode.

Related