# arindam-roy2004/roastforge architecture

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

- Interactive diagram: https://gitdiagram.com/arindam-roy2004/roastforge
- Repository: https://github.com/arindam-roy2004/roastforge

## Overview

RoastForge is a resume-feedback and developer-discovery app. Users can try an anonymous roast, or sign in, upload a resume, receive an AI evaluation, and share it for community comments and reactions; projects add a portfolio track, while recruiters search candidate profiles and scores. The graph follows documented API and client flows and sampled controller/service ownership; some capability wiring is documented only in the README, so uncertain internal calls are omitted.

Main entry points: [`backend/src/app.ts`](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/app.ts) (Express API), [`backend/src/modules/analysis/analysis.controller.ts`](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/analysis/analysis.controller.ts) (AI analysis), [`backend/src/modules/resume/resume.service.ts`](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/resume/resume.service.ts) (Resume management), [`frontend/src/app/(roasthub)`](https://github.com/arindam-roy2004/roastforge/tree/main/frontend/src/app/(roasthub)) (App pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_pages["App pages"]
  node_api_client["API client<br/>[api.ts]"]
  node_reaction_sync["Reaction sync"]
end

subgraph group_identity["Identity and profiles"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_google_auth["Google sign-in"]
  node_users[("User records<br/>[auth.model.ts]")]
end

subgraph group_feedback["Resume feedback"]
  node_resume_routes["Resume routes<br/>[resume.routes.ts]"]
  node_resume_service["Resume management<br/>[resume.service.ts]"]
  node_resumes[("Resume records<br/>[resume.model.ts]")]
  node_upload["File upload<br/>[upload.routes.ts]"]
  node_analysis_routes["Analysis routes<br/>[analysis.routes.ts]"]
  node_analysis["AI analysis"]
  node_comments["Comments and votes<br/>[comment.service.ts]"]
end

subgraph group_discovery["Portfolio and recruiting"]
  node_projects["Project portfolio<br/>[project.routes.ts]"]
  node_recruiter["Candidate search"]
  node_talent["Talent scoring"]
end

node_visitor(("Visitor / user"))
node_api["Express API<br/>[app.ts]"]
node_cloudinary[("Cloudinary storage")]
node_gemini["Gemini AI"]
node_redis[("Redis cache")]
node_mongodb[("MongoDB")]
node_google["Google OAuth"]

node_visitor -->|"uses"| node_pages
node_pages -->|"requests"| node_api_client
node_api_client -->|"calls"| node_api
node_api -->|"dispatches"| node_resume_routes
node_api -->|"dispatches"| node_analysis_routes
node_api -->|"dispatches"| node_auth
node_api -->|"dispatches"| node_comments
node_api -->|"dispatches"| node_projects
node_api -->|"dispatches"| node_recruiter
node_resume_routes -->|"calls"| node_resume_service
node_resume_service -->|"reads/writes"| node_resumes
node_resume_service -->|"recalculates"| node_talent
node_talent -->|"updates scores"| node_mongodb
node_resume_service -->|"reads/writes"| node_mongodb
node_upload -->|"uploads files"| node_cloudinary
node_analysis_routes -->|"dispatches"| node_analysis
node_analysis -->|"loads and saves"| node_resumes
node_analysis -->|"fetches PDF"| node_cloudinary
node_analysis -->|"checks/stores cache"| node_redis
node_analysis -->|"requests roast"| node_gemini
node_analysis -->|"recalculates score"| node_talent
node_comments -->|"reads/writes"| node_mongodb
node_projects -->|"reads/writes"| node_mongodb
node_recruiter -->|"searches profiles"| node_mongodb
node_recruiter -->|"reads candidate data"| node_users
node_auth -->|"reads/writes"| node_users
node_google_auth -->|"verifies token"| node_google
node_google_auth -->|"issues tokens"| node_auth
node_reaction_sync -->|"syncs reactions"| node_api_client
node_pages -->|"queues reactions"| node_reaction_sync

click node_pages "https://github.com/arindam-roy2004/roastforge/tree/main/frontend/src/app/(roasthub)"
click node_api_client "https://github.com/arindam-roy2004/roastforge/blob/main/frontend/src/lib/api.ts"
click node_reaction_sync "https://github.com/arindam-roy2004/roastforge/blob/main/frontend/src/lib/resume-reaction-sync.ts"
click node_api "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/app.ts"
click node_auth "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/auth.service.ts"
click node_google_auth "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/google-auth.service.ts"
click node_users "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/auth.model.ts"
click node_resume_routes "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/resume/resume.routes.ts"
click node_resume_service "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/resume/resume.service.ts"
click node_resumes "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/resume/resume.model.ts"
click node_upload "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/upload/upload.routes.ts"
click node_analysis_routes "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/analysis/analysis.routes.ts"
click node_analysis "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/analysis/analysis.controller.ts"
click node_comments "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/comment/comment.service.ts"
click node_projects "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/project/project.routes.ts"
click node_recruiter "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/recruiter/recruiter.controller.ts"
click node_talent "https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/talent-score.service.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_pages,node_api_client,node_reaction_sync,node_visitor toneBlue
class node_auth,node_google_auth,node_users,node_cloudinary,node_redis,node_mongodb toneAmber
class node_resume_routes,node_resume_service,node_resumes,node_upload,node_analysis_routes,node_analysis,node_comments,node_api toneMint
class node_projects,node_recruiter,node_talent toneRose
class node_gemini,node_google toneIndigo
```

## Components

### Web client

- [App pages](https://github.com/arindam-roy2004/roastforge/tree/main/frontend/src/app/(roasthub)): `frontend/src/app/(roasthub)`
- [API client](https://github.com/arindam-roy2004/roastforge/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Reaction sync](https://github.com/arindam-roy2004/roastforge/blob/main/frontend/src/lib/resume-reaction-sync.ts): `frontend/src/lib/resume-reaction-sync.ts`

### Identity and profiles

- [Authentication](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/auth.service.ts): `backend/src/modules/auth/auth.service.ts`
- [Google sign-in](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/google-auth.service.ts): `backend/src/modules/auth/google-auth.service.ts`
- [User records](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/auth.model.ts): `backend/src/modules/auth/auth.model.ts`

### Resume feedback

- [Resume routes](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/resume/resume.routes.ts): `backend/src/modules/resume/resume.routes.ts`
- [Resume management](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/resume/resume.service.ts): `backend/src/modules/resume/resume.service.ts`
- [Resume records](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/resume/resume.model.ts): `backend/src/modules/resume/resume.model.ts`
- [File upload](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/upload/upload.routes.ts): `backend/src/modules/upload/upload.routes.ts`
- [Analysis routes](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/analysis/analysis.routes.ts): `backend/src/modules/analysis/analysis.routes.ts`
- [AI analysis](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/analysis/analysis.controller.ts): `backend/src/modules/analysis/analysis.controller.ts`
- [Comments and votes](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/comment/comment.service.ts): `backend/src/modules/comment/comment.service.ts`

### Portfolio and recruiting

- [Project portfolio](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/project/project.routes.ts): `backend/src/modules/project/project.routes.ts`
- [Candidate search](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/recruiter/recruiter.controller.ts): `backend/src/modules/recruiter/recruiter.controller.ts`
- [Talent scoring](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/modules/auth/talent-score.service.ts): `backend/src/modules/auth/talent-score.service.ts`

### Other components

- **Visitor / user**
- [Express API](https://github.com/arindam-roy2004/roastforge/blob/main/backend/src/app.ts): `backend/src/app.ts`
- **Cloudinary storage**
- **Gemini AI**
- **Redis cache**
- **MongoDB**
- **Google OAuth**

## Connections

- Visitor / user → App pages: uses
- App pages → API client: requests
- API client → Express API: calls
- Express API → Resume routes: dispatches
- Express API → Analysis routes: dispatches
- Express API → Authentication: dispatches
- Express API → Comments and votes: dispatches
- Express API → Project portfolio: dispatches
- Express API → Candidate search: dispatches
- Resume routes → Resume management: calls
- Resume management → Resume records: reads/writes
- Resume management → Talent scoring: recalculates
- Talent scoring → MongoDB: updates scores
- Resume management → MongoDB: reads/writes
- File upload → Cloudinary storage: uploads files
- Analysis routes → AI analysis: dispatches
- AI analysis → Resume records: loads and saves
- AI analysis → Cloudinary storage: fetches PDF
- AI analysis → Redis cache: checks/stores cache
- AI analysis → Gemini AI: requests roast
- AI analysis → Talent scoring: recalculates score
- Comments and votes → MongoDB: reads/writes
- Project portfolio → MongoDB: reads/writes
- Candidate search → MongoDB: searches profiles
- Candidate search → User records: reads candidate data
- Authentication → User records: reads/writes
- Google sign-in → Google OAuth: verifies token
- Google sign-in → Authentication: issues tokens
- Reaction sync → API client: syncs reactions
- App pages → Reaction sync: queues reactions
