# phani-manda/resumate architecture

> Architecture diagram of the GitHub repository phani-manda/resumate, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/phani-manda/resumate
- Repository: https://github.com/phani-manda/resumate

## Overview

ResumeAI is a career platform whose main workflows are creating and saving resumes, uploading a resume for ATS analysis against a job description, and getting career advice through a streaming coach chat. The dashboard summarizes resume, optimization, and chat activity. The graph includes the documented builder, optimizer, coach, analytics, and PDF capabilities. Some UI-to-feature wiring and the database schema are not shown in the sampled source, so those connections are omitted; the database node represents the PostgreSQL store documented by the README.

Main entry points: [`src/lib/db.ts`](https://github.com/phani-manda/resumate/blob/main/src/lib/db.ts) (Prisma client), [`src/app/api/ai/optimize/route.ts`](https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/optimize/route.ts) (ATS analysis API), [`src/components/optimizer/useOptimizer.ts`](https://github.com/phani-manda/resumate/blob/main/src/components/optimizer/useOptimizer.ts) (Optimizer workflow), [`src/app/api/ai/chat/route.ts`](https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/chat/route.ts) (Streaming chat API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_builder_page["Builder page<br/>[page.tsx]"]
  node_optimizer_page["Optimizer page<br/>[page.tsx]"]
  node_coach_page["Coach page<br/>[page.tsx]"]
  node_dashboard_page["Dashboard page<br/>[page.tsx]"]
end

subgraph group_resume["Resume workflows"]
  node_builder_hook["Builder state"]
  node_builder_ui["Builder interface"]
  node_resume_api["Resume collection API<br/>[route.ts]"]
  node_resume_item_api["Resume item API<br/>[route.ts]"]
  node_pdf_api["PDF export API<br/>[route.tsx]"]
  node_pdf_doc["PDF document"]
end

subgraph group_career["Career tools"]
  node_optimizer_hook["Optimizer workflow<br/>[useOptimizer.ts]"]
  node_optimizer_ui["Optimizer interface"]
  node_parse_api["Resume parsing API<br/>[route.ts]"]
  node_optimize_api["ATS analysis API<br/>[route.ts]"]
  node_coach_ui["Career coach chat"]
  node_chat_api["Streaming chat API<br/>[route.ts]"]
  node_history_api["Chat history API<br/>[route.ts]"]
  node_reaction_api["Message reaction API<br/>[route.ts]"]
  node_stats_hook["Dashboard stats hook"]
  node_stats_api["Dashboard stats API<br/>[route.ts]"]
end

subgraph group_data["Persistence"]
  node_db_client["Prisma client<br/>[db.ts]"]
  node_postgres[("PostgreSQL")]
end

node_user(("User"))
node_clerk["Clerk auth"]
node_groq{{"Groq AI"}}

node_user -->|"opens"| node_landing
node_user -->|"opens"| node_builder_page
node_user -->|"opens"| node_optimizer_page
node_user -->|"opens"| node_coach_page
node_user -->|"opens"| node_dashboard_page
node_builder_hook -->|"creates / lists"| node_resume_api
node_builder_hook -->|"loads / updates"| node_resume_item_api
node_optimizer_hook -->|"uploads resume"| node_parse_api
node_optimizer_hook -->|"requests analysis"| node_optimize_api
node_optimizer_hook -->|"loads / saves"| node_resume_api
node_pdf_api -->|"renders"| node_pdf_doc
node_parse_api -->|"authenticates"| node_clerk
node_optimize_api -->|"authenticates"| node_clerk
node_chat_api -->|"authenticates"| node_clerk
node_history_api -->|"authenticates"| node_clerk
node_reaction_api -->|"authenticates"| node_clerk
node_stats_api -->|"authenticates"| node_clerk
node_parse_api -->|"extracts fields"| node_groq
node_optimize_api -->|"analyzes resume"| node_groq
node_chat_api -->|"streams advice"| node_groq
node_resume_api -->|"reads / writes"| node_db_client
node_resume_item_api -->|"reads / writes"| node_db_client
node_optimize_api -->|"stores report"| node_db_client
node_chat_api -->|"stores messages"| node_db_client
node_history_api -->|"reads / deletes"| node_db_client
node_reaction_api -->|"updates reaction"| node_db_client
node_stats_api -->|"queries metrics"| node_db_client
node_db_client -->|"queries"| node_postgres

click node_landing "https://github.com/phani-manda/resumate/blob/main/src/app/page.tsx"
click node_builder_page "https://github.com/phani-manda/resumate/blob/main/src/app/builder/page.tsx"
click node_optimizer_page "https://github.com/phani-manda/resumate/blob/main/src/app/optimizer/page.tsx"
click node_coach_page "https://github.com/phani-manda/resumate/blob/main/src/app/coach/page.tsx"
click node_dashboard_page "https://github.com/phani-manda/resumate/blob/main/src/app/dashboard/page.tsx"
click node_builder_hook "https://github.com/phani-manda/resumate/blob/main/src/components/builder/useResumeBuilder.ts"
click node_builder_ui "https://github.com/phani-manda/resumate/blob/main/src/components/ResumeBuilderRefactored.tsx"
click node_resume_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/resumes/route.ts"
click node_resume_item_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/resumes/%5Bid%5D/route.ts"
click node_pdf_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/generate-pdf/route.tsx"
click node_pdf_doc "https://github.com/phani-manda/resumate/blob/main/src/components/builder/ResumePDFDocument.tsx"
click node_optimizer_hook "https://github.com/phani-manda/resumate/blob/main/src/components/optimizer/useOptimizer.ts"
click node_optimizer_ui "https://github.com/phani-manda/resumate/blob/main/src/components/AIOptimizerRefactored.tsx"
click node_parse_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/upload/parse/route.ts"
click node_optimize_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/optimize/route.ts"
click node_coach_ui "https://github.com/phani-manda/resumate/blob/main/src/components/CareerCoachChat.tsx"
click node_chat_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/chat/route.ts"
click node_history_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/chat/history/route.ts"
click node_reaction_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/chat/messages/%5Bid%5D/reaction/route.ts"
click node_stats_hook "https://github.com/phani-manda/resumate/blob/main/src/hooks/useDashboardStats.ts"
click node_stats_api "https://github.com/phani-manda/resumate/blob/main/src/app/api/dashboard/stats/route.ts"
click node_db_client "https://github.com/phani-manda/resumate/blob/main/src/lib/db.ts"

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_builder_page,node_optimizer_page,node_coach_page,node_dashboard_page,node_user toneBlue
class node_builder_hook,node_builder_ui,node_resume_api,node_resume_item_api,node_pdf_api,node_pdf_doc toneAmber
class node_optimizer_hook,node_optimizer_ui,node_parse_api,node_optimize_api,node_coach_ui,node_chat_api,node_history_api,node_reaction_api,node_stats_hook,node_stats_api toneMint
class node_db_client,node_postgres toneRose
class node_clerk,node_groq toneIndigo
```

## Components

### App entry

- [Landing page](https://github.com/phani-manda/resumate/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [Builder page](https://github.com/phani-manda/resumate/blob/main/src/app/builder/page.tsx): `src/app/builder/page.tsx`
- [Optimizer page](https://github.com/phani-manda/resumate/blob/main/src/app/optimizer/page.tsx): `src/app/optimizer/page.tsx`
- [Coach page](https://github.com/phani-manda/resumate/blob/main/src/app/coach/page.tsx): `src/app/coach/page.tsx`
- [Dashboard page](https://github.com/phani-manda/resumate/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`

### Resume workflows

- [Builder state](https://github.com/phani-manda/resumate/blob/main/src/components/builder/useResumeBuilder.ts): `src/components/builder/useResumeBuilder.ts`
- [Builder interface](https://github.com/phani-manda/resumate/blob/main/src/components/ResumeBuilderRefactored.tsx): `src/components/ResumeBuilderRefactored.tsx`
- [Resume collection API](https://github.com/phani-manda/resumate/blob/main/src/app/api/resumes/route.ts): `src/app/api/resumes/route.ts`
- [Resume item API](https://github.com/phani-manda/resumate/blob/main/src/app/api/resumes/%5Bid%5D/route.ts): `src/app/api/resumes/[id]/route.ts`
- [PDF export API](https://github.com/phani-manda/resumate/blob/main/src/app/api/generate-pdf/route.tsx): `src/app/api/generate-pdf/route.tsx`
- [PDF document](https://github.com/phani-manda/resumate/blob/main/src/components/builder/ResumePDFDocument.tsx): `src/components/builder/ResumePDFDocument.tsx`

### Career tools

- [Optimizer workflow](https://github.com/phani-manda/resumate/blob/main/src/components/optimizer/useOptimizer.ts): `src/components/optimizer/useOptimizer.ts`
- [Optimizer interface](https://github.com/phani-manda/resumate/blob/main/src/components/AIOptimizerRefactored.tsx): `src/components/AIOptimizerRefactored.tsx`
- [Resume parsing API](https://github.com/phani-manda/resumate/blob/main/src/app/api/upload/parse/route.ts): `src/app/api/upload/parse/route.ts`
- [ATS analysis API](https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/optimize/route.ts): `src/app/api/ai/optimize/route.ts`
- [Career coach chat](https://github.com/phani-manda/resumate/blob/main/src/components/CareerCoachChat.tsx): `src/components/CareerCoachChat.tsx`
- [Streaming chat API](https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/chat/route.ts): `src/app/api/ai/chat/route.ts`
- [Chat history API](https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/chat/history/route.ts): `src/app/api/ai/chat/history/route.ts`
- [Message reaction API](https://github.com/phani-manda/resumate/blob/main/src/app/api/ai/chat/messages/%5Bid%5D/reaction/route.ts): `src/app/api/ai/chat/messages/[id]/reaction/route.ts`
- [Dashboard stats hook](https://github.com/phani-manda/resumate/blob/main/src/hooks/useDashboardStats.ts): `src/hooks/useDashboardStats.ts`
- [Dashboard stats API](https://github.com/phani-manda/resumate/blob/main/src/app/api/dashboard/stats/route.ts): `src/app/api/dashboard/stats/route.ts`

### Persistence

- [Prisma client](https://github.com/phani-manda/resumate/blob/main/src/lib/db.ts): `src/lib/db.ts`
- **PostgreSQL**

### Other components

- **User**
- **Clerk auth**
- **Groq AI**

## Connections

- User → Landing page: opens
- User → Builder page: opens
- User → Optimizer page: opens
- User → Coach page: opens
- User → Dashboard page: opens
- Builder state → Resume collection API: creates / lists
- Builder state → Resume item API: loads / updates
- Optimizer workflow → Resume parsing API: uploads resume
- Optimizer workflow → ATS analysis API: requests analysis
- Optimizer workflow → Resume collection API: loads / saves
- PDF export API → PDF document: renders
- Resume parsing API → Clerk auth: authenticates
- ATS analysis API → Clerk auth: authenticates
- Streaming chat API → Clerk auth: authenticates
- Chat history API → Clerk auth: authenticates
- Message reaction API → Clerk auth: authenticates
- Dashboard stats API → Clerk auth: authenticates
- Resume parsing API → Groq AI: extracts fields
- ATS analysis API → Groq AI: analyzes resume
- Streaming chat API → Groq AI: streams advice
- Resume collection API → Prisma client: reads / writes
- Resume item API → Prisma client: reads / writes
- ATS analysis API → Prisma client: stores report
- Streaming chat API → Prisma client: stores messages
- Chat history API → Prisma client: reads / deletes
- Message reaction API → Prisma client: updates reaction
- Dashboard stats API → Prisma client: queries metrics
- Prisma client → PostgreSQL: queries
