# divya-a10/hiro.ai architecture

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

- Interactive diagram: https://gitdiagram.com/divya-a10/hiro.ai
- Repository: https://github.com/divya-a10/hiro.ai

## Overview

Resume Matcher AI combines a React workflow for resume and job-description analysis with a FastAPI optimization service. Users enter through the landing page, upload a resume, provide a job description, and view match results; the UI also exposes profile and pitch-deck views. The backend endpoint initializes state and invokes an agent workflow, while the browser AI module can call that endpoint or Gemini. Supabase is documented as the persistence layer, but the sampled evidence does not show specific database operations. Some agent internals and view behavior were not sampled.

Main entry points: [`src/App.tsx`](https://github.com/divya-a10/hiro.ai/blob/main/src/App.tsx) (App router), [`src/lib/ai.ts`](https://github.com/divya-a10/hiro.ai/blob/main/src/lib/ai.ts) (AI analysis client), [`src/views/UploadResume.tsx`](https://github.com/divya-a10/hiro.ai/blob/main/src/views/UploadResume.tsx) (Resume upload), [`src/views/JobDescription.tsx`](https://github.com/divya-a10/hiro.ai/blob/main/src/views/JobDescription.tsx) (Job description)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["App router<br/>[App.tsx]"]
  node_landing["Landing page<br/>[Landing.tsx]"]
  node_upload["Resume upload<br/>[UploadResume.tsx]"]
  node_job["Job description<br/>[JobDescription.tsx]"]
  node_results["Match results<br/>[Results.tsx]"]
  node_dashboard["Hiro dashboard<br/>[HiroDashboard.tsx]"]
  node_pitch["Pitch deck<br/>[PitchDeck.tsx]"]
  node_profile["User profile<br/>[Profile.tsx]"]
end

subgraph group_identity["Identity and profile"]
  node_auth["Auth context<br/>[AuthContext.tsx]"]
  node_clerk["Clerk adapter<br/>[clerk-wrapper.ts]"]
end

subgraph group_analysis["Analysis and orchestration"]
  node_ai["AI analysis client<br/>[ai.ts]"]
  node_api["Optimize API<br/>[main.py]"]
  node_workflow["Agent workflow<br/>[agents_workflow.py]"]
  node_schemas["Workflow schemas<br/>[schemas.py]"]
  node_hiroapi["Hiro API client<br/>[hiroApi.ts]"]
end

subgraph group_integrations["External services"]
  node_supabase[("Supabase store<br/>[supabase.ts]")]
  node_gemini["Gemini AI"]
end

node_user(("Candidate"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_job
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_pitch
node_app -->|"routes to"| node_profile
node_app -->|"provides auth"| node_auth
node_auth -->|"uses"| node_clerk
node_results -->|"renders"| node_dashboard
node_upload -.->|"may persist"| node_supabase
node_job -.->|"may persist"| node_supabase
node_job -->|"analyzes with"| node_ai
node_upload -.->|"extracts with"| node_ai
node_ai -->|"requests generation"| node_gemini
node_ai -->|"posts optimization"| node_api
node_api -->|"invokes"| node_workflow
node_workflow -->|"validates with"| node_schemas
node_dashboard -->|"uses"| node_hiroapi
node_hiroapi -->|"posts optimization"| node_api

click node_app "https://github.com/divya-a10/hiro.ai/blob/main/src/App.tsx"
click node_landing "https://github.com/divya-a10/hiro.ai/blob/main/src/views/Landing.tsx"
click node_upload "https://github.com/divya-a10/hiro.ai/blob/main/src/views/UploadResume.tsx"
click node_job "https://github.com/divya-a10/hiro.ai/blob/main/src/views/JobDescription.tsx"
click node_results "https://github.com/divya-a10/hiro.ai/blob/main/src/views/Results.tsx"
click node_dashboard "https://github.com/divya-a10/hiro.ai/blob/main/src/components/HiroDashboard.tsx"
click node_pitch "https://github.com/divya-a10/hiro.ai/blob/main/src/views/PitchDeck.tsx"
click node_profile "https://github.com/divya-a10/hiro.ai/blob/main/src/views/Profile.tsx"
click node_auth "https://github.com/divya-a10/hiro.ai/blob/main/src/contexts/AuthContext.tsx"
click node_clerk "https://github.com/divya-a10/hiro.ai/blob/main/src/clerk-wrapper.ts"
click node_ai "https://github.com/divya-a10/hiro.ai/blob/main/src/lib/ai.ts"
click node_api "https://github.com/divya-a10/hiro.ai/blob/main/main.py"
click node_workflow "https://github.com/divya-a10/hiro.ai/blob/main/agents_workflow.py"
click node_schemas "https://github.com/divya-a10/hiro.ai/blob/main/schemas.py"
click node_hiroapi "https://github.com/divya-a10/hiro.ai/blob/main/src/services/hiroApi.ts"
click node_supabase "https://github.com/divya-a10/hiro.ai/blob/main/src/lib/supabase.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_landing,node_upload,node_job,node_results,node_dashboard,node_pitch,node_profile toneBlue
class node_auth,node_clerk toneAmber
class node_ai,node_api,node_workflow,node_schemas,node_hiroapi toneMint
class node_supabase,node_gemini toneRose
class node_user toneIndigo
```

## Components

### User experience

- [App router](https://github.com/divya-a10/hiro.ai/blob/main/src/App.tsx): `src/App.tsx`
- [Landing page](https://github.com/divya-a10/hiro.ai/blob/main/src/views/Landing.tsx): `src/views/Landing.tsx`
- [Resume upload](https://github.com/divya-a10/hiro.ai/blob/main/src/views/UploadResume.tsx): `src/views/UploadResume.tsx`
- [Job description](https://github.com/divya-a10/hiro.ai/blob/main/src/views/JobDescription.tsx): `src/views/JobDescription.tsx`
- [Match results](https://github.com/divya-a10/hiro.ai/blob/main/src/views/Results.tsx): `src/views/Results.tsx`
- [Hiro dashboard](https://github.com/divya-a10/hiro.ai/blob/main/src/components/HiroDashboard.tsx): `src/components/HiroDashboard.tsx`
- [Pitch deck](https://github.com/divya-a10/hiro.ai/blob/main/src/views/PitchDeck.tsx): `src/views/PitchDeck.tsx`
- [User profile](https://github.com/divya-a10/hiro.ai/blob/main/src/views/Profile.tsx): `src/views/Profile.tsx`

### Identity and profile

- [Auth context](https://github.com/divya-a10/hiro.ai/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Clerk adapter](https://github.com/divya-a10/hiro.ai/blob/main/src/clerk-wrapper.ts): `src/clerk-wrapper.ts`

### Analysis and orchestration

- [AI analysis client](https://github.com/divya-a10/hiro.ai/blob/main/src/lib/ai.ts): `src/lib/ai.ts`
- [Optimize API](https://github.com/divya-a10/hiro.ai/blob/main/main.py): `main.py`
- [Agent workflow](https://github.com/divya-a10/hiro.ai/blob/main/agents_workflow.py): `agents_workflow.py`
- [Workflow schemas](https://github.com/divya-a10/hiro.ai/blob/main/schemas.py): `schemas.py`
- [Hiro API client](https://github.com/divya-a10/hiro.ai/blob/main/src/services/hiroApi.ts): `src/services/hiroApi.ts`

### External services

- [Supabase store](https://github.com/divya-a10/hiro.ai/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- **Gemini AI**

### Other components

- **Candidate**

## Connections

- Candidate → App router: uses (evidence: `src/App.tsx`)
- App router → Landing page: routes to (evidence: `src/App.tsx`)
- App router → Resume upload: routes to (evidence: `src/App.tsx`)
- App router → Job description: routes to (evidence: `src/App.tsx`)
- App router → Match results: routes to (evidence: `src/App.tsx`)
- App router → Pitch deck: routes to (evidence: `src/App.tsx`)
- App router → User profile: routes to (evidence: `src/App.tsx`)
- App router → Auth context: provides auth (evidence: `src/App.tsx`)
- Auth context → Clerk adapter: uses (evidence: `src/contexts/AuthContext.tsx`)
- Match results → Hiro dashboard: renders (evidence: `src/views/Results.tsx`)
- Resume upload → Supabase store: may persist (evidence: `src/views/UploadResume.tsx`)
- Job description → Supabase store: may persist (evidence: `src/views/JobDescription.tsx`)
- Job description → AI analysis client: analyzes with (evidence: `src/views/JobDescription.tsx`)
- Resume upload → AI analysis client: extracts with
- AI analysis client → Gemini AI: requests generation (evidence: `src/lib/ai.ts`)
- AI analysis client → Optimize API: posts optimization (evidence: `src/lib/ai.ts`)
- Optimize API → Agent workflow: invokes (evidence: `main.py`)
- Agent workflow → Workflow schemas: validates with (evidence: `agents_workflow.py`)
- Hiro dashboard → Hiro API client: uses (evidence: `src/components/HiroDashboard.tsx`)
- Hiro API client → Optimize API: posts optimization (evidence: `src/services/hiroApi.ts`)
