An end-to-end Next.js 14 + Prisma + Tailwind MVP for auditing LLM applications. It now uses a modular audit pipeline that separates target execution, evaluation, and run aggregation while persisting structured evidence and version metadata for each run.
- Next.js 14 App Router (TypeScript)
- Tailwind CSS + shadcn-inspired primitives
- Prisma + PostgreSQL
- Recharts for charts
- zod for validation
- CSV / JSON exports (papaparse-style)
-
Install deps
npm install -
Configure env
cp .env.example .env -
Prisma setup & seed
npm run db:bootstrap -
Run dev server
npm run dev
Open http://localhost:3000
Seed creates a demo project (demo-project) and a completed audit run (demo-run). Nav link “Demo Run” opens the dashboard instantly.
- Landing page → “Create Audit Project”
- Configure target per mode (Prompt-only, Endpoint, RAG)
- Select audit categories → Run audit
- View dashboard (overall score, category bars, verdict donut, table)
- Drill into test details
- Export JSON/CSV from dashboard
- Server actions in
lib/actions.tshandle create/update/run/export. - Audit execution, scoring, and aggregation are separated under
lib/audit/*. lib/evaluator.tsstill provides the heuristic scorer, but it now sits behind a pipeline seam instead of being embedded inside the run loop.- Charts rendered client-side (
components/charts.tsx). - Prisma schema in
prisma/schema.prisma; seed cases inprisma/seed.js.
Add provider-specific executors in lib/audit/executor.ts for OpenAI, Anthropic, and production endpoint adapters. The current implementation keeps a simulated fallback plus a generic HTTP executor seam.
Hook into pdf-lib in an API route and render a summary; CSV/JSON already implemented.
npm run dev– start appnpm run build– production buildnpm run prisma:push– sync schemanpm run prisma:seed– seed demo datanpm run db:bootstrap– generate client, push schema, and seed demo data
Internal demo use. Adjust as needed.