This folder holds extended reference docs not always appropriate for the root README.md. GitHub will render this file when you open the docs/ directory.
This section explains the purpose of every top-level file, especially those where inline comments are limited or disallowed (JSON formats).
package.json: Node/Next.js dependencies + scripts. (JSON cannot have comments.)tsconfig.json: TypeScript compiler options (strictness, module resolution). Adjust here when changing build behavior.next.config.ts: Next.js framework configuration (React compiler enabled).postcss.config.mjs: PostCSS plugin pipeline (Tailwind). Extend with autoprefixer / cssnano if needed.eslint.config.mjs: ESLint presets + explicit ignore patterns..env.local: Developer machine env overrides (never commit secrets). ProvidesNEXT_PUBLIC_API_BASE_URLand Groq API keys (server side usage only).
layout.tsx: Global HTML skeleton, navigation bar, footer, font & global styles import.globals.css: Base CSS variables + Tailwind import + dark mode adjustments.page.tsx: Main quiz page handling generation, answering, continuation, retry, stats navigation.ai-quiz/page.tsx: Alternate quiz generation mode with subtopic coverage tracking.practice/page.tsx+PracticeClient.tsx: Load topic-specific questions, self-mark attempts, track per-question time.questions/page.tsx+QuestionsClient.tsx: CRUD interface for adding and listing stored questions.stats/page.tsx: Session analytics dashboard (local history, average, best, coverage metrics, tiers).api/quiz/generate/route.ts: Serverless route calling Groq API; enforces quiz schema and ordering.
src/lib/config.ts: Shared runtime constants (API base URL fallback logic).
index.js: Express bootstrap, middleware setup, Mongo connection, route mounting.models/Question.js: Mongoose schema for persistent interview questions.models/Attempt.js: Mongoose schema for user attempts (correctness + timing) enabling analytics.routes/questionRoutes.js: REST endpoints to create/list questions.routes/attemptRoutes.js: REST endpoints to record attempts and fetch aggregated stats.package.json: Backend dependency manifest (no inline comments)..env: Server-only environment (Mongo URI, API keys) excluded from version control.
Generated output by Next.js (do not edit). Linted & rebuilt automatically.
Static assets (favicons, images). Add new images here and reference with / paths.
package.json / tsconfig.json follow strict JSON spec which forbids comments. To explain configuration choices, prefer this doc or dedicated sections in the root README.md.
- Add new pages in
src/app/<route>/page.tsxwith optional client components. - Add new API serverless routes under
src/app/api/<namespace>/route.ts. - For persistent analytics beyond localStorage, wire frontend quiz & practice flows to POST attempts to Express server (already scaffolded).
Each runtime-relevant file now has top-of-file comments summarizing its role. For non-commentable or generated files, refer back to this mapping.
Last updated: 2025-11-20