# aryan-rajawat/proguide architecture

> Architecture diagram of the GitHub repository aryan-rajawat/proguide, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aryan-rajawat/proguide
- Repository: https://github.com/aryan-rajawat/proguide

## Overview

1. **Overall shape**
   - This is a **Next.js App Router** application for AI-assisted career guidance, deployed on **Vercel** and kept in sync from **v0.dev**.
   - The repo is organized around a **frontend app**, a small set of **server API routes**, and a **Supabase-backed data layer**.

2. **Primary user-facing surfaces**
   - The main product pages live under `app/`: `dashboard`, `jobs`, `mock-interview`, `resume-generator`, `resume-manager`, `career-insights`, `profile`, and `settings`.
   - `app/page.tsx` is the entry point/landing page, while `app/dashboard/layout.tsx` defines the authenticated app shell for the core experience.

3. **Authentication boundary**
   - Authentication is split into dedicated pages under `app/auth/signin`, `signup`, and `forgot-password`.
   - This suggests a clear boundary between public access, auth flows, and the protected dashboard area.

4. **AI/backend service layer**
   - The `app/api` directory contains three route handlers:
     - `generate-resume`
     - `generate-interview-questions`
     - `career-insights`
   - These are the main server-side integration points for AI-driven or computed outputs, and they separate client UI from backend generation logic.

5. **Data and persistence**
   - `lib/supabase.ts` centralizes Supabase access, indicating Supabase is the main backend service for auth and/or database storage.
   - The `scripts/create-database.sql` and `scripts/seed-sample-data.sql` files show the app expects a real database schema plus seeded sample content.

6. **Scheduled/automated processing**
   - `scripts/weekly-insights-cron.js` implies an automated job that periodically generates or refreshes career insights.
   - That creates a second data flow besides user-triggered API calls: a background batch process that updates insight data on a schedule.

7. **Feature-level flows**
   - **Resume generation**: `resume-generator` likely collects user profile inputs, calls `generate-resume`, and presents generated resume output.
   - **Mock interview**: `mock-interview` likely uses `generate-interview-questions` to produce role-specific questions.
   - **Career insights**: `career-insights` likely reads stored/generated insights and may also call the `career-insights` API route.
   - **Jobs**: `jobs/page.tsx` plus `jobs/jobs-content.tsx` and `jobs/loading.tsx` indicate a data-driven listing page with a loading state.

8. **Dashboard and account management**
   - `app/dashboard/page.tsx`, `profile/page.tsx`, and `settings/page.tsx` form the post-login control center.
   - These pages likely consume the same user identity and stored career data to present personalized status, preferences, and progress.

9. **Shared UI system**
   - `components/ui/*` contains a shadcn-style component library: buttons, cards, tabs, inputs, select, dropdowns, etc.
   - `components/theme-provider.tsx` and `app/globals.css`/`styles/globals.css` indicate a centralized theming and global styling layer.
   - `tailwind.config.ts`, `postcss.config.mjs`, and `components.json` reinforce that the UI stack is Tailwind-centric with prebuilt primitives.

10. **Static assets and legacy artifacts**
   - The root-level `.html`, `.js`, and `.css` files (`index.html`, `dashboard.html`, `auth.html`, `career-insights.html`, `mock-interview.html`, `resume-generator.html`, `script.js`, `styles.css`) look like older static prototypes or exported artifacts.
   - They are separate from the App Router structure and are likely not the primary runtime path, but they matter if an architecture diagram needs to show historical/static entry points.

11. **Runtime/deployment model**
   - The app is designed to run as a **server-rendered Next.js app** with **serverless route handlers** on Vercel.
   - Client pages, API routes, Supabase, and the cron script form the main execution boundaries: browser UI → Next.js server routes → Supabase/database/background jobs.

12. **What to draw in an architecture diagram**
   - A good diagram would show:
     - Browser/UI pages in `app/*`
     - Shared component library and theme layer
     - Next.js API routes as the backend service boundary
     - Supabase as the persistence/auth layer
     - Scheduled cron script feeding career insights
     - Static legacy HTML files as an optional side branch, not the core path

Main entry points: [`app/dashboard/layout.tsx`](https://github.com/aryan-rajawat/proguide/blob/main/app/dashboard/layout.tsx) (App shell), [`components/ui/button.tsx`](https://github.com/aryan-rajawat/proguide/blob/main/components/ui/button.tsx) (UI kit), [`lib/supabase.ts`](https://github.com/aryan-rajawat/proguide/blob/main/lib/supabase.ts) (Supabase), [`app/page.tsx`](https://github.com/aryan-rajawat/proguide/blob/main/app/page.tsx) (Landing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App UI"]
  node_landing["Landing<br/>next page<br/>[page.tsx]"]
  node_auth_signin["Sign in<br/>auth page<br/>[page.tsx]"]
  node_auth_signup["Sign up<br/>auth page<br/>[page.tsx]"]
  node_auth_forgot["Reset password<br/>auth page<br/>[page.tsx]"]
  node_dashboard_shell["App shell<br/>dashboard layout<br/>[layout.tsx]"]
  node_dashboard_home["Dashboard<br/>[page.tsx]"]
  node_jobs["Jobs<br/>[page.tsx]"]
  node_resume_gen["Resume builder<br/>resume page<br/>[page.tsx]"]
  node_resume_mgr["Resume manager<br/>resume page<br/>[page.tsx]"]
  node_interview["Mock interview<br/>interview page<br/>[page.tsx]"]
  node_insights["Career insights<br/>insights page<br/>[page.tsx]"]
  node_profile["Profile<br/>account page<br/>[page.tsx]"]
  node_settings["Settings<br/>account page<br/>[page.tsx]"]
end

subgraph group_backend["Backend"]
  node_api_resume["Generate resume<br/>route handler<br/>[route.ts]"]
  node_api_questions["Interview questions<br/>route handler<br/>[route.ts]"]
  node_api_insights["Insights API<br/>route handler<br/>[route.ts]"]
  node_cron["Weekly cron<br/>background job"]
end

subgraph group_data["Data Layer"]
  node_supabase[("Supabase<br/>data service<br/>[supabase.ts]")]
  node_db_sql["Schema<br/>database script"]
  node_seed_sql["Seed data<br/>database script"]
end

subgraph group_shared["Shared UI"]
  node_theme["Theme<br/>ui provider<br/>[theme-provider.tsx]"]
  node_ui_lib["UI kit<br/>component library<br/>[button.tsx]"]
  node_styles["Global styles<br/>styling<br/>[globals.css]"]
end

subgraph group_legacy["Legacy Artifacts"]
  node_legacy_html["Static pages<br/>legacy assets<br/>[index.html]"]
end

node_landing -->|"start auth"| node_auth_signin
node_landing -->|"create account"| node_auth_signup
node_auth_signin -->|"enter app"| node_dashboard_shell
node_auth_signup -->|"enter app"| node_dashboard_shell
node_auth_forgot -->|"recover"| node_auth_signin
node_dashboard_shell -->|"wraps"| node_dashboard_home
node_dashboard_shell -->|"navigates"| node_jobs
node_dashboard_shell -->|"navigates"| node_resume_gen
node_dashboard_shell -->|"navigates"| node_resume_mgr
node_dashboard_shell -->|"navigates"| node_interview
node_dashboard_shell -->|"navigates"| node_insights
node_dashboard_shell -->|"navigates"| node_profile
node_dashboard_shell -->|"navigates"| node_settings
node_resume_gen -->|"calls"| node_api_resume
node_interview -->|"calls"| node_api_questions
node_insights -->|"calls"| node_api_insights
node_api_resume -->|"reads/writes"| node_supabase
node_api_questions -->|"reads/writes"| node_supabase
node_api_insights -->|"reads/writes"| node_supabase
node_cron -->|"refreshes"| node_api_insights
node_supabase -.->|"defined by"| node_db_sql
node_supabase -.->|"seeded by"| node_seed_sql
node_theme -->|"uses"| node_ui_lib
node_styles -->|"styles"| node_theme
node_ui_lib -.->|"renders"| node_jobs
node_ui_lib -.->|"renders"| node_resume_gen
node_ui_lib -.->|"renders"| node_interview
node_ui_lib -.->|"renders"| node_insights
node_legacy_html -.->|"prototype"| node_landing

click node_landing "https://github.com/aryan-rajawat/proguide/blob/main/app/page.tsx"
click node_auth_signin "https://github.com/aryan-rajawat/proguide/blob/main/app/auth/signin/page.tsx"
click node_auth_signup "https://github.com/aryan-rajawat/proguide/blob/main/app/auth/signup/page.tsx"
click node_auth_forgot "https://github.com/aryan-rajawat/proguide/blob/main/app/auth/forgot-password/page.tsx"
click node_dashboard_shell "https://github.com/aryan-rajawat/proguide/blob/main/app/dashboard/layout.tsx"
click node_dashboard_home "https://github.com/aryan-rajawat/proguide/blob/main/app/dashboard/page.tsx"
click node_jobs "https://github.com/aryan-rajawat/proguide/blob/main/app/jobs/page.tsx"
click node_resume_gen "https://github.com/aryan-rajawat/proguide/blob/main/app/resume-generator/page.tsx"
click node_resume_mgr "https://github.com/aryan-rajawat/proguide/blob/main/app/resume-manager/page.tsx"
click node_interview "https://github.com/aryan-rajawat/proguide/blob/main/app/mock-interview/page.tsx"
click node_insights "https://github.com/aryan-rajawat/proguide/blob/main/app/career-insights/page.tsx"
click node_profile "https://github.com/aryan-rajawat/proguide/blob/main/app/profile/page.tsx"
click node_settings "https://github.com/aryan-rajawat/proguide/blob/main/app/settings/page.tsx"
click node_api_resume "https://github.com/aryan-rajawat/proguide/blob/main/app/api/generate-resume/route.ts"
click node_api_questions "https://github.com/aryan-rajawat/proguide/blob/main/app/api/generate-interview-questions/route.ts"
click node_api_insights "https://github.com/aryan-rajawat/proguide/blob/main/app/api/career-insights/route.ts"
click node_cron "https://github.com/aryan-rajawat/proguide/blob/main/scripts/weekly-insights-cron.js"
click node_supabase "https://github.com/aryan-rajawat/proguide/blob/main/lib/supabase.ts"
click node_db_sql "https://github.com/aryan-rajawat/proguide/blob/main/scripts/create-database.sql"
click node_seed_sql "https://github.com/aryan-rajawat/proguide/blob/main/scripts/seed-sample-data.sql"
click node_theme "https://github.com/aryan-rajawat/proguide/blob/main/components/theme-provider.tsx"
click node_ui_lib "https://github.com/aryan-rajawat/proguide/blob/main/components/ui/button.tsx"
click node_styles "https://github.com/aryan-rajawat/proguide/blob/main/app/globals.css"
click node_legacy_html "https://github.com/aryan-rajawat/proguide/blob/main/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_landing,node_auth_signin,node_auth_signup,node_auth_forgot,node_dashboard_shell,node_dashboard_home,node_jobs,node_resume_gen,node_resume_mgr,node_interview,node_insights,node_profile,node_settings toneBlue
class node_api_resume,node_api_questions,node_api_insights,node_cron toneAmber
class node_supabase,node_db_sql,node_seed_sql toneMint
class node_theme,node_ui_lib,node_styles toneRose
class node_legacy_html toneIndigo
```

## Components

### App UI

Next.js App Router pages and shared frontend shell.

- [Landing](https://github.com/aryan-rajawat/proguide/blob/main/app/page.tsx): next page · Public entry page for the product. · `app/page.tsx`
- [Sign in](https://github.com/aryan-rajawat/proguide/blob/main/app/auth/signin/page.tsx): auth page · Authentication entry page. · `app/auth/signin/page.tsx`
- [Sign up](https://github.com/aryan-rajawat/proguide/blob/main/app/auth/signup/page.tsx): auth page · Account creation page. · `app/auth/signup/page.tsx`
- [Reset password](https://github.com/aryan-rajawat/proguide/blob/main/app/auth/forgot-password/page.tsx): auth page · Password recovery page. · `app/auth/forgot-password/page.tsx`
- [App shell](https://github.com/aryan-rajawat/proguide/blob/main/app/dashboard/layout.tsx): dashboard layout · Authenticated layout wrapping core app experiences. · `app/dashboard/layout.tsx`
- [Dashboard](https://github.com/aryan-rajawat/proguide/blob/main/app/dashboard/page.tsx): dashboard page · Primary logged-in overview. · `app/dashboard/page.tsx`
- [Jobs](https://github.com/aryan-rajawat/proguide/blob/main/app/jobs/page.tsx): jobs page · Job browsing experience with loading state. · `app/jobs/page.tsx`
- [Resume builder](https://github.com/aryan-rajawat/proguide/blob/main/app/resume-generator/page.tsx): resume page · User-facing resume generation flow. · `app/resume-generator/page.tsx`
- [Resume manager](https://github.com/aryan-rajawat/proguide/blob/main/app/resume-manager/page.tsx): resume page · Resume management and storage surface. · `app/resume-manager/page.tsx`
- [Mock interview](https://github.com/aryan-rajawat/proguide/blob/main/app/mock-interview/page.tsx): interview page · Interview practice experience. · `app/mock-interview/page.tsx`
- [Career insights](https://github.com/aryan-rajawat/proguide/blob/main/app/career-insights/page.tsx): insights page · Insights viewing surface. · `app/career-insights/page.tsx`
- [Profile](https://github.com/aryan-rajawat/proguide/blob/main/app/profile/page.tsx): account page · User profile and identity settings. · `app/profile/page.tsx`
- [Settings](https://github.com/aryan-rajawat/proguide/blob/main/app/settings/page.tsx): account page · User preferences and app settings. · `app/settings/page.tsx`

### Backend

Server route handlers and scheduled processing.

- [Generate resume](https://github.com/aryan-rajawat/proguide/blob/main/app/api/generate-resume/route.ts): route handler · Server endpoint for AI-assisted resume generation. · `app/api/generate-resume/route.ts`
- [Interview questions](https://github.com/aryan-rajawat/proguide/blob/main/app/api/generate-interview-questions/route.ts): route handler · Server endpoint for mock interview question generation. · `app/api/generate-interview-questions/route.ts`
- [Insights API](https://github.com/aryan-rajawat/proguide/blob/main/app/api/career-insights/route.ts): route handler · Server endpoint for career insight computation. · `app/api/career-insights/route.ts`
- [Weekly cron](https://github.com/aryan-rajawat/proguide/blob/main/scripts/weekly-insights-cron.js): background job · Scheduled script that refreshes or precomputes insights. · `scripts/weekly-insights-cron.js`

### Data Layer

Supabase access and database setup.

- [Supabase](https://github.com/aryan-rajawat/proguide/blob/main/lib/supabase.ts): data service · Central auth and database integration. · `lib/supabase.ts`
- [Schema](https://github.com/aryan-rajawat/proguide/blob/main/scripts/create-database.sql): database script · Database creation and seed scripts. · `scripts/create-database.sql`
- [Seed data](https://github.com/aryan-rajawat/proguide/blob/main/scripts/seed-sample-data.sql): database script · Sample content for local or staged data setup. · `scripts/seed-sample-data.sql`

### Shared UI

Reusable component and styling system.

- [Theme](https://github.com/aryan-rajawat/proguide/blob/main/components/theme-provider.tsx): ui provider · Shared theme provider for the app. · `components/theme-provider.tsx`
- [UI kit](https://github.com/aryan-rajawat/proguide/blob/main/components/ui/button.tsx): component library · Reusable shadcn-style UI primitives. · `components/ui/button.tsx`
- [Global styles](https://github.com/aryan-rajawat/proguide/blob/main/app/globals.css): styling · App-wide CSS and Tailwind integration. · `app/globals.css`

### Legacy Artifacts

Static prototype files kept outside the main app runtime.

- [Static pages](https://github.com/aryan-rajawat/proguide/blob/main/index.html): legacy assets · Older standalone HTML prototypes outside the App Router runtime. · `index.html`

## Connections

- Landing → Sign in: start auth · Public users move into sign-in flow.
- Landing → Sign up: create account · Public users can register.
- Sign in → App shell: enter app · Successful auth lands in protected shell.
- Sign up → App shell: enter app · New accounts flow into the protected area.
- Reset password → Sign in: recover · Password reset returns users to sign in.
- App shell → Dashboard: wraps · Layout provides shared authenticated chrome.
- App shell → Jobs: navigates · Core app shell hosts feature pages.
- App shell → Resume builder: navigates · Core app shell hosts feature pages.
- App shell → Resume manager: navigates · Core app shell hosts feature pages.
- App shell → Mock interview: navigates · Core app shell hosts feature pages.
- App shell → Career insights: navigates · Core app shell hosts feature pages.
- App shell → Profile: navigates · Core app shell hosts feature pages.
- App shell → Settings: navigates · Core app shell hosts feature pages.
- Resume builder → Generate resume: calls · Resume page requests generated output.
- Mock interview → Interview questions: calls · Interview page requests generated questions.
- Career insights → Insights API: calls · Insights page requests computed or generated insights.
- Generate resume → Supabase: reads/writes · Backend route uses Supabase for persistence or auth context.
- Interview questions → Supabase: reads/writes · Backend route uses Supabase for persistence or auth context.
- Insights API → Supabase: reads/writes · Backend route uses Supabase for persistence or auth context.
- Weekly cron → Insights API: refreshes · Scheduled job feeds the insights pipeline.
- Supabase → Schema: defined by · Schema setup describes the backing data model.
- Supabase → Seed data: seeded by · Sample data populates the database for development.
- Theme → UI kit: uses · Theme layer supports shared UI primitives.
- Global styles → Theme: styles · Global styling underpins the theme provider.
- UI kit → Jobs: renders · Feature pages consume shared primitives.
- UI kit → Resume builder: renders · Feature pages consume shared primitives.
- UI kit → Mock interview: renders · Feature pages consume shared primitives.
- UI kit → Career insights: renders · Feature pages consume shared primitives.
- Static pages → Landing: prototype · Static artifacts parallel the main app entry point.
