Live, deployable Next.js application implementing Generation + Validation + Decision capabilities for SAP customers.
- Excel/CSV upload — drag-drop or file-select for batch requirements intake
- Path comparison — three implementation paths (Standard / Light / Custom) shown side-by-side with effort, architecture, pros/cons
- Architect verification badges — every artifact shows initials of senior architects who reviewed it
- Preview / Buy flow — first 35% of artifact shown free; full version unlocked via Stripe Checkout
- Decision sidebar — tracks topics, paths chosen, artifacts forged & purchased, suggests next steps
- 8-hex lattice — Workshop → RICEFW → FSD → FUT → TSD → TUT → Tests → Training, with sequence numbers
specforge-app/
├── src/
│ ├── app/
│ │ ├── page.tsx ← Landing page
│ │ ├── demo/page.tsx ← Demo (email-gated)
│ │ ├── success/page.tsx ← Stripe success redirect
│ │ ├── layout.tsx, globals.css
│ │ └── api/
│ │ ├── generate/route.ts ← LLM API (rate-limited, capped)
│ │ ├── subscribe/route.ts ← Email capture
│ │ ├── checkout/route.ts ← Creates Stripe checkout session
│ │ └── checkout/verify/route.ts ← Verifies payment after redirect
│ ├── components/
│ │ ├── EmailGate.tsx ← Email capture before demo
│ │ ├── Intake.tsx ← Excel + paste + samples
│ │ ├── PathComparison.tsx ← Three-path comparison cards
│ │ └── SpecforgeDemo.tsx ← Main demo with sidebar + hex lattice
│ └── lib/
│ ├── data.ts ← Artifacts, prices, architects, paths logic
│ └── storage.ts ← File-based storage helpers
├── package.json, next.config.js, tailwind.config.js
└── .env.example
| Name | Required | Purpose |
|---|---|---|
ANTHROPIC_API_KEY |
Yes | Claude API key |
STRIPE_SECRET_KEY |
Yes | Stripe secret (use sk_test_... for demo) |
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY |
Yes | Stripe publishable key |
NEXT_PUBLIC_SITE_URL |
Recommended | Your deployed URL (for Stripe redirects) |
DAILY_SPEND_CAP_USD |
Optional | Daily Claude API cap (default 5) |
PER_IP_DAILY_LIMIT |
Optional | Generations per IP/day (default 5) |
| Artifact | Specforge | Market |
|---|---|---|
| Workshop Deck | $400 | $4,500 |
| RICEFW Inventory | $600 | $5,500 |
| Functional Spec (FSD) | $500 | $5,000 |
| Functional Unit Test (FUT) | $300 | $3,500 |
| Technical Spec (TSD) | $500 | $5,000 |
| Technical Unit Test (TUT) | $300 | $3,500 |
| Integration Tests | $400 | $4,000 |
| Training Docs | $300 | $3,000 |
Edit prices in src/lib/data.ts — search for priceUSD and marketUSD.
Use 4242 4242 4242 4242 with any future expiry and any CVC for testing.
See DEPLOYMENT_GUIDE.md (next message) for step-by-step.