# darshop21/forge-resume-to-portfolio-builder architecture

> Architecture diagram of the GitHub repository darshop21/forge-resume-to-portfolio-builder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/darshop21/forge-resume-to-portfolio-builder
- Repository: https://github.com/darshop21/forge-resume-to-portfolio-builder

## Overview

Forge turns an uploaded resume into a deployed portfolio through resume extraction and parsing, AI planning and design, code generation, validation, build, and deployment. The main user flow runs from the React generation page through the API and Trigger.dev pipeline; users can poll progress and open the deployed site. Authentication and persisted run state support that flow. The README documents the full pipeline; some task implementations and integrations were not excerpted, so their finer-grained calls are not inferred.

Main entry points: [`backend/src/trigger/parent.ts`](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/parent.ts) (Pipeline orchestrator), [`backend/src/controllers/portfolio.controller.ts`](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/controllers/portfolio.controller.ts) (Portfolio controller), [`frontend/src/lib/api.ts`](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/lib/api.ts) (API client), [`frontend/src/App.tsx`](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/App.tsx) (Application routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["Application routes<br/>[App.tsx]"]
  node_generate["Generate page<br/>[Generate.tsx]"]
  node_polling["Run polling<br/>[useRunPolling.ts]"]
  node_preview["Site preview<br/>[SitePreview.tsx]"]
  node_auth_context["Session context<br/>[AuthContext.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_identity["Authentication"]
  node_auth_routes["Auth routes<br/>[auth.route.ts]"]
  node_auth_controller["Auth controller<br/>[auth.controller.ts]"]
  node_auth_middleware["Access-token guard<br/>[require-auth.ts]"]
  node_tokens["Token service<br/>[tokens.ts]"]
end

subgraph group_intake["Resume intake"]
  node_portfolio_routes["Portfolio routes<br/>[portfolio.route.ts]"]
  node_portfolio_controller["Portfolio controller"]
  node_pdf["PDF extraction<br/>[extract.ts]"]
  node_resume_parser["Resume parser<br/>[parser.ts]"]
end

subgraph group_pipeline["Generation pipeline"]
  node_parent_task["Pipeline orchestrator<br/>[parent.ts]"]
  node_architect["Site architecture<br/>[architect.ts]"]
  node_blueprint["Design blueprint<br/>[blueprint.ts]"]
  node_html["HTML generation<br/>[html.ts]"]
  node_css["CSS generation<br/>[css.ts]"]
  node_js["JavaScript generation<br/>[js.ts]"]
  node_validate["Pipeline validation<br/>[validate.ts]"]
  node_build["Site build<br/>[build.ts]"]
  node_deploy_task["Deployment task<br/>[deploy.ts]"]
end

subgraph group_state["Persistence and services"]
  node_database[("Application database<br/>[db.ts]")]
end

node_user(("Portfolio creator"))
node_upload["Resume upload service"]
node_vercel["Vercel deployment"]
node_llm["NVIDIA NIM"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_generate
node_app -->|"routes to"| node_preview
node_generate -->|"requests build"| node_api
node_generate -->|"uploads resume"| node_upload
node_upload -.->|"provides resume URL"| node_portfolio_controller
node_preview -->|"polls run"| node_polling
node_polling -->|"fetches status"| node_api
node_auth_context -->|"calls auth API"| node_api
node_api -->|"sends auth requests"| node_auth_routes
node_api -->|"sends portfolio requests"| node_portfolio_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_auth_routes -->|"guards profile"| node_auth_middleware
node_auth_middleware -->|"verifies token"| node_tokens
node_auth_controller -->|"issues and checks tokens"| node_tokens
node_portfolio_routes -->|"dispatches"| node_portfolio_controller
node_portfolio_routes -->|"guards requests"| node_auth_middleware
node_portfolio_controller -->|"creates and updates runs"| node_database
node_portfolio_controller -->|"extracts resume text"| node_pdf
node_portfolio_controller -->|"parses extracted text"| node_resume_parser
node_resume_parser -->|"invokes model"| node_llm
node_portfolio_controller -->|"triggers task"| node_parent_task
node_parent_task -->|"updates run state"| node_database
node_parent_task -->|"runs planning stage"| node_architect
node_parent_task -->|"runs design stage"| node_blueprint
node_parent_task -->|"runs generation stage"| node_html
node_parent_task -.->|"runs generation stage"| node_css
node_parent_task -.->|"runs generation stage"| node_js
node_parent_task -->|"runs validation"| node_validate
node_parent_task -->|"runs build stage"| node_build
node_parent_task -->|"runs deploy stage"| node_deploy_task
node_architect -->|"invokes model"| node_llm
node_deploy_task -.->|"publishes site"| node_vercel
node_api -->|"receives run status"| node_database

click node_app "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/App.tsx"
click node_generate "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/pages/Generate.tsx"
click node_polling "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/hooks/useRunPolling.ts"
click node_preview "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/pages/SitePreview.tsx"
click node_auth_context "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/context/AuthContext.tsx"
click node_api "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/lib/api.ts"
click node_auth_routes "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/routes/auth.route.ts"
click node_auth_controller "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/controllers/auth.controller.ts"
click node_auth_middleware "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/middlewares/require-auth.ts"
click node_tokens "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/services/auth/tokens.ts"
click node_portfolio_routes "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/routes/portfolio.route.ts"
click node_portfolio_controller "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/controllers/portfolio.controller.ts"
click node_pdf "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/services/pdf/extract.ts"
click node_resume_parser "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/services/resume/parser.ts"
click node_parent_task "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/parent.ts"
click node_architect "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/architect.ts"
click node_blueprint "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/blueprint.ts"
click node_html "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/html.ts"
click node_css "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/css.ts"
click node_js "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/js.ts"
click node_validate "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/validate.ts"
click node_build "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/build.ts"
click node_deploy_task "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/deploy.ts"
click node_database "https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/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_app,node_generate,node_polling,node_preview,node_auth_context,node_api toneBlue
class node_auth_routes,node_auth_controller,node_auth_middleware,node_tokens toneAmber
class node_portfolio_routes,node_portfolio_controller,node_pdf,node_resume_parser toneMint
class node_parent_task,node_architect,node_blueprint,node_html,node_css,node_js,node_validate,node_build,node_deploy_task toneRose
class node_database,node_user,node_upload,node_vercel,node_llm toneIndigo
```

## Components

### Web application

- [Application routes](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Generate page](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/pages/Generate.tsx): `frontend/src/pages/Generate.tsx`
- [Run polling](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/hooks/useRunPolling.ts): `frontend/src/hooks/useRunPolling.ts`
- [Site preview](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/pages/SitePreview.tsx): `frontend/src/pages/SitePreview.tsx`
- [Session context](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [API client](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`

### Authentication

- [Auth routes](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/routes/auth.route.ts): `backend/src/routes/auth.route.ts`
- [Auth controller](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/controllers/auth.controller.ts): `backend/src/controllers/auth.controller.ts`
- [Access-token guard](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/middlewares/require-auth.ts): `backend/src/middlewares/require-auth.ts`
- [Token service](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/services/auth/tokens.ts): `backend/src/services/auth/tokens.ts`

### Resume intake

- [Portfolio routes](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/routes/portfolio.route.ts): `backend/src/routes/portfolio.route.ts`
- [Portfolio controller](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/controllers/portfolio.controller.ts): `backend/src/controllers/portfolio.controller.ts`
- [PDF extraction](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/services/pdf/extract.ts): `backend/src/services/pdf/extract.ts`
- [Resume parser](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/services/resume/parser.ts): `backend/src/services/resume/parser.ts`

### Generation pipeline

- [Pipeline orchestrator](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/parent.ts): `backend/src/trigger/parent.ts`
- [Site architecture](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/architect.ts): `backend/src/trigger/architect.ts`
- [Design blueprint](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/blueprint.ts): `backend/src/trigger/blueprint.ts`
- [HTML generation](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/html.ts): `backend/src/trigger/html.ts`
- [CSS generation](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/css.ts): `backend/src/trigger/css.ts`
- [JavaScript generation](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/js.ts): `backend/src/trigger/js.ts`
- [Pipeline validation](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/validate.ts): `backend/src/trigger/validate.ts`
- [Site build](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/build.ts): `backend/src/trigger/build.ts`
- [Deployment task](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/trigger/deploy.ts): `backend/src/trigger/deploy.ts`

### Persistence and services

- [Application database](https://github.com/darshop21/forge-resume-to-portfolio-builder/blob/main/backend/src/lib/db.ts): `backend/src/lib/db.ts`

### Other components

- **Portfolio creator**
- **Resume upload service**
- **Vercel deployment**
- **NVIDIA NIM**

## Connections

- Portfolio creator → Application routes: uses (evidence: `frontend/src/App.tsx`)
- Application routes → Generate page: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Site preview: routes to (evidence: `frontend/src/App.tsx`)
- Generate page → API client: requests build (evidence: `frontend/src/pages/Generate.tsx`)
- Generate page → Resume upload service: uploads resume
- Resume upload service → Portfolio controller: provides resume URL
- Site preview → Run polling: polls run (evidence: `frontend/src/pages/SitePreview.tsx`)
- Run polling → API client: fetches status (evidence: `frontend/src/hooks/useRunPolling.ts`)
- Session context → API client: calls auth API (evidence: `frontend/src/context/AuthContext.tsx`)
- API client → Auth routes: sends auth requests (evidence: `frontend/src/lib/api.ts`)
- API client → Portfolio routes: sends portfolio requests (evidence: `frontend/src/lib/api.ts`)
- Auth routes → Auth controller: dispatches (evidence: `backend/src/routes/auth.route.ts`)
- Auth routes → Access-token guard: guards profile (evidence: `backend/src/routes/auth.route.ts`)
- Access-token guard → Token service: verifies token (evidence: `backend/src/middlewares/require-auth.ts`)
- Auth controller → Token service: issues and checks tokens (evidence: `backend/src/controllers/auth.controller.ts`)
- Portfolio routes → Portfolio controller: dispatches (evidence: `backend/src/routes/portfolio.route.ts`)
- Portfolio routes → Access-token guard: guards requests (evidence: `backend/src/routes/portfolio.route.ts`)
- Portfolio controller → Application database: creates and updates runs (evidence: `backend/src/controllers/portfolio.controller.ts`)
- Portfolio controller → PDF extraction: extracts resume text (evidence: `backend/src/controllers/portfolio.controller.ts`)
- Portfolio controller → Resume parser: parses extracted text (evidence: `backend/src/controllers/portfolio.controller.ts`)
- Resume parser → NVIDIA NIM: invokes model (evidence: `backend/src/services/resume/parser.ts`)
- Portfolio controller → Pipeline orchestrator: triggers task (evidence: `backend/src/controllers/portfolio.controller.ts`)
- Pipeline orchestrator → Application database: updates run state (evidence: `backend/src/trigger/parent.ts`)
- Pipeline orchestrator → Site architecture: runs planning stage (evidence: `backend/src/trigger/parent.ts`)
- Pipeline orchestrator → Design blueprint: runs design stage (evidence: `backend/src/trigger/parent.ts`)
- Pipeline orchestrator → HTML generation: runs generation stage (evidence: `backend/src/trigger/parent.ts`)
- Pipeline orchestrator → CSS generation: runs generation stage
- Pipeline orchestrator → JavaScript generation: runs generation stage
- Pipeline orchestrator → Pipeline validation: runs validation (evidence: `backend/src/trigger/parent.ts`)
- Pipeline orchestrator → Site build: runs build stage (evidence: `backend/src/trigger/parent.ts`)
- Pipeline orchestrator → Deployment task: runs deploy stage (evidence: `backend/src/trigger/parent.ts`)
- Site architecture → NVIDIA NIM: invokes model (evidence: `backend/src/trigger/architect.ts`)
- Deployment task → Vercel deployment: publishes site
- API client → Application database: receives run status
