Status: Polished portfolio project. Originally built late 2025, refreshed for May 2026 (current models, dependency hygiene). Functional locally; not deployed and not actively maintained — model IDs and SDK APIs will drift over time.
A Next.js app for generating Product Requirements Documents through a chat interface, with side-by-side comparison across Claude, GPT, Gemini, and Grok. Pick your favourite model's output, edit individual sections, export as Markdown or PDF.
- Conversational PRD generation — short clarifying-question chat, then one-shot PRD output
- Multi-model comparison — fan out the same prompt to up to 4 models in parallel and pick the winner
- Section-level editing — refine a single section without re-running the whole PRD
- Multi-modal input — text plus image uploads (sketches, wireframes, screenshots)
- Markdown + PDF export
- Credit system + Stripe checkout — free daily session, paid packs (Beer Edition pricing)
- Frontend: Next.js 15, React 19, Tailwind CSS 4
- Backend: Next.js API routes
- Database: SQLite via Prisma (zero-setup local demo — change
providerin prisma/schema.prisma topostgresqlfor production) - Auth: NextAuth v5 (beta) with GitHub OAuth
- AI providers: Anthropic, OpenAI, Google Gemini, xAI Grok
- Payments: Stripe
git clone https://github.com/drftstatic/PRD_Generator.git
cd PRD_Generator
npm install
cp .env.example .env # then edit — see "Required env vars" below
npx prisma migrate dev --name init
npm run devOpen http://localhost:3000.
The minimum to get a working chat + one-model generation:
NEXTAUTH_SECRET—openssl rand -base64 32GITHUB_CLIENT_ID+GITHUB_CLIENT_SECRET— register an OAuth app with callbackhttp://localhost:3000/api/auth/callback/github- One of:
ANTHROPIC_API_KEY,OPENAI_API_KEY,GOOGLE_AI_API_KEY,XAI_API_KEY
Stripe keys are optional unless you want to test paid credit purchases. See .env.example for the full list.
prisma/
schema.prisma # SQLite schema (User, PRDSession, PRD, Credit, etc.)
src/
app/
api/ # auth, generate-prd, conversation, credits, checkout, webhooks, upload
page.tsx # chat UI
prds/[sessionId]/ # PRD comparison + section editor
components/ # PRDViewer, SectionEditor, ImageUpload
hooks/ # useCredits, usePRDGeneration
lib/
ai-providers.ts # multi-provider orchestration
prd-template.ts # PRD structure + system prompt
pdf-generator.ts # Puppeteer-based PDF export
auth.ts, prisma.ts
config/
models.json # Model registry — edit here to add/remove models
All available models are listed in src/config/models.json. To add or swap a model, edit the JSON — no code changes required:
{
"providers": {
"anthropic": {
"models": ["claude-opus-4-7", "claude-sonnet-4-6"],
"display_names": ["Claude Opus 4.7", "Claude Sonnet 4.6"],
"api_key_env": "ANTHROPIC_API_KEY"
}
}
}The current registry was last verified May 2026. Provider model IDs drift quickly — check each provider's docs before deploying anything that depends on this code.
| Tier | Sessions | Price | Per session |
|---|---|---|---|
| On the House | 1/day | Free | $0 |
| Tall Boy | 1 | $2 | $2.00 |
| Sixer | 6 | $6 | $1.00 |
| Twelve Pack | 12 | $10 | $0.83 |
| Case | 24 | $18 | $0.75 |
One session = up to 4 PRD generations across different models.
| Route | Purpose |
|---|---|
POST /api/auth/[...nextauth] |
NextAuth |
POST /api/conversation |
Clarifying-question chat |
POST /api/generate-prd |
Multi-model PRD generation |
GET/POST /api/credits |
Balance + claim daily free |
POST /api/checkout |
Stripe checkout session |
POST /api/webhooks/stripe |
Stripe event handler |
POST /api/upload |
Image uploads |
GET /api/sessions/[sessionId] |
Session state |
POST /api/prds/[prdId]/regenerate-section |
Section-level edit |
Generated PRDs follow this structure:
- Product Name & Overview
- Problem Statement
- Target Users
- Goals & Success Metrics
- User Stories / Use Cases
- Functional Requirements
- Technical Considerations
- Out of Scope
- Open Questions / Risks
- This was built as an exploration of multi-model orchestration patterns and isn't actively maintained.
- Model IDs in src/config/models.json and src/app/api/conversation/route.ts will go stale — verify against each provider's docs.
- The Stripe integration is wired but has only been smoke-tested locally with the Stripe CLI.
puppeteeris a heavy dep (~170MB) and won't deploy to Vercel as-is — for serverless deploys, swap to@sparticuz/chromiumor a hosted PDF service.- For production, change Prisma's
providerfromsqlitetopostgresqland run a fresh migration.
MIT — see LICENSE.
Built with Claude Code.