Thanks for helping improve the CCA Exam Simulator.
- Never commit an API key or
.env*file (other than.env.example)..gitignorealready excludes them — keep it that way. - Keep all Claude API calls server-side. The key must never reach the client bundle. New model calls belong in
app/api/**orlib/anthropic.ts, not in client components. - Only original questions. Don't add real or memorized exam content. The simulator approximates the published format only.
npm install
cp .env.example .env.local # set ANTHROPIC_API_KEY
npm run devRun all three checks locally — CI runs the same:
npm test
npm run lint
npm run build- Generation prompt:
lib/exam-prompt.ts - Server generate/retry logic:
lib/anthropic.ts - Parsing/validation (unit-tested):
lib/json-extract.ts,lib/validate.ts,lib/request-validation.ts - UI:
components/,app/
When changing parsing or validation, add a case to scripts/test.mjs.