How michniks2001/overthinker-ai works
Project type and purpose
• This is a full-stack Next.js application (React on the frontend with built-in serverless API routes on the backend).
• It serves dynamic pages under app/ (using the Next.js App Router), includes UI components in components/ui/, and provides two API endpoints—/api/study-session and /api/upload.
• There’s a simple database utility in utils/db.js (likely for persisting study sessions) and a file-upload utility in lib/utils.js.
File structure
Top-level folders and their roles:
• app/ – Next.js App Router directory:
• page.js, quiz/page.js → React page components (server-rendered + client hydration).
• api/ → Serverless API route handlers:
– study-session/route.js → CRUD logic for study sessions, uses utils/db.js.
– upload/route.js → Handles multipart file uploads, uses lib/utils.js.
• globals.css, layout.js → Global styles & layout wrapper.
• components/ui/ – Reusable UI primitives (Button, Card, Input, FileUpload).
• utils/db.js – Database connection & query helpers.
• lib/utils.js – Shared utility functions (e.g. file parsing).
• public/ – Static assets.
• Config files: next.config.mjs, postcss.config.mjs, eslint.config.mjs, jsconfig.json.
Key architectural insights from README
• Standard Next.js stack: React + serverless routes.
• Deployed on Vercel (implied serverless functions).
• No explicit microservices—everything lives in one Next.js codebase.