How sayali0109/pathvise works
Project type and purpose
• This is a full-stack, server-rendered React application built with Next.js.
• Its purpose is to serve as an AI-powered career coaching platform, providing features like AI-generated cover letters, resume building, interview practice quizzes, user dashboards, and onboarding flows.
File structure
• Top-level areas:
• app/ (Next.js App Router pages + layouts)
• actions/ (modular “action” handlers for user, resume, cover-letter, interview, dashboard flows)
• components/ (shared UI primitives under components/ui/)
• lib/ (helper functions, Prisma client, Inngest client & function definitions)
• prisma/ (database schema + migration files)
• data/ (static data lists)
• hooks/ (custom React hooks)
• public/, tailwind.config.mjs, next.config.mjs, etc.
• API surface:
• app/api/inngest/route.js – entry point for Inngest webhook
• lib/inngest/functions.js – background jobs for AI tasks
• Authentication pages under app/(auth)
• UI widgets under components/ui/
• Prisma ORM layer under lib/prisma.js & prisma/schema.prisma
Pulling insights from the README
• Standard Next.js scaffold.
• Deployed on Vercel.
• Uses Next.js App Router, next/font, Tailwind CSS.
a. Main components
• Client Browser (User’s device)
• Next.js Application (hosted on Vercel’s Serverless/Edge Runtime)
• Inngest Event Handler (serverless background jobs)
• Business-logic “actions” modules
• Database (PostgreSQL/MySQL via Prisma)
• External AI API (e.g., OpenAI)
• Static Assets CDN (Vercel’s built-in CDN or similar)
b. Relationships & Interactions
1. User → Browser UI (React components under app/, components/ui/)
2. Browser → Next.js Server (SSR/SSG via App Router)
3. Next.js Server → “actions” modules to orchestrate feature flows
4. Actions → API routes (app/api/inngest) to enqueue AI jobs with Inngest
5. Inngest Worker → executes background functions (lib/inngest/functions.js)
6. Background functions → External AI API to generate cover letters, quizzes, etc.
7. Background functions → Prisma client (lib/prisma.js) to persist results to DB
8. Next.js Server & API routes → Prisma client to read/write user and coaching data
9. Client polls or subscribes (via fetch hooks) for job completion & displays updates
10. Static assets delivered via CDN/public folder
c. Architectural patterns & design principles
• Separation of Concerns: UI components, data-fetching hooks, action handlers, and background workers
• Event-driven background processing (Inngest) for long-running AI tasks
• Prisma as a typed ORM bridging business logic and relational database
• Next.js App Router for colocated routing, layouts, and page‐level data fetching
• Clean folder conventions: “app/” for pages, “components/” for UI, “lib/” for shared logic
d. Key technologies & libraries
• Next.js (App Router, Server/Edge Functions)
• React + Tailwind CSS + next/font
• Prisma ORM + PostgreSQL (or compatible RDBMS)
• Inngest (event queue & serverless functions)
• Vercel Platform (hosting, CDN)
• OpenAI (or similar) APIs for AI generation
Elements
• Green for server/runtime components (SSR, API routes)
• Orange for background workers (Inngest)
• Purple for data stores (Database)
• Gray for external services (AI API, CDN)