How piyush-eon/ai-career-coach works
Project Type and Purpose
• This is a full‑stack AI‑powered career coaching web application built with Next.js (App Router), Tailwind CSS, Prisma ORM, Neon DB, Inngest for background/event workflows, Clerk for authentication, and Shadcn UI components.
• It provides user authentication, onboarding, AI‑driven resume and cover‑letter generation (via Gemini API), practice quizzes/interviews, and dashboards.
Main Components
a. Frontend (Next.js “app” directory)
– Public pages: landing, auth pages (sign‑in, sign‑up), onboarding, dashboard, AI cover‑letter, resume builder, interview mock quizzes.
– UI layer: Shadcn UI components under components/ui, plus shared components (header, hero).
– CSS: Tailwind (tailwind.config.mjs, globals.css).
b. Backend/API
– Next.js API routes (app/api) for synchronous calls.
– Inngest functions (lib/inngest and app/api/inngest) for asynchronous jobs and event‑driven workflows (e.g., generating AI content).
– Helper libraries: app/lib (helper.js, schema.js), lib/utils, lib/checkUser.
c. Authentication & Authorization
– Clerk (third‑party auth) configuration via environment variables and middleware.js to guard routes.
d. Database & ORM
– Neon Postgres, accessed via Prisma (prisma/schema.prisma & prisma/migrations).
e. External Services
– Gemini AI API for text generation.
– Clerk.io for user sign‑in/up flows.
Relationships and Data Flows
• User’s browser ↔ Next.js front end pages (UI components).
• Front end → Clerk (OAuth flows) → Protected content.
• Authenticated front end → Next.js API or Inngest endpoints → Business logic in JS modules.
• API/Inngest handlers → Prisma client → Neon DB for reads/writes.
• Inngest jobs → Gemini API calls → store/generated content in DB → notify front end.
Architectural Patterns and Design Principles
• App Router pattern (Next.js 13) for file‑based routing and layouts.
• Separation of concerns: UI components, page logic, API routes, background workers.
• Event‑driven background processing via Inngest for long‑running AI tasks.
• 12‑factor app principles: environment variables, clear config files.
• Modular, reusable UI via Shadcn components.
Technologies and Frameworks to Annotate
– Next.js App Router
– Tailwind CSS
– Shadcn UI components
– Prisma ORM / Neon Postgres
– Inngest (event queue/workflow runner)
– Clerk (authentication)
– Gemini API (AI service)