# nishit-luhadia30/genai architecture

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

- Interactive diagram: https://gitdiagram.com/nishit-luhadia30/genai
- Repository: https://github.com/nishit-luhadia30/genai

## Overview

CareerAI is a React/Supabase resume-to-opportunity workspace. A candidate uploads a resume; the browser extracts text, the intelligence service builds and validates an editable profile, then job retrieval and matching produce role-specific explanations, gaps, and compatibility estimates. Candidates can also analyze job descriptions and request grounded resume suggestions. The older assessment, recommendations, skill-gap, and chat features remain available. The README documents server-side Gemini capabilities; some detailed matching internals and UI interactions are not in the excerpts, so those links rely on README evidence.

Main entry points: [`src/pages/ResumeWorkspace.jsx`](https://github.com/nishit-luhadia30/genai/blob/main/src/pages/ResumeWorkspace.jsx) (Resume Workspace), [`src/services/resumeIntelligence.js`](https://github.com/nishit-luhadia30/genai/blob/main/src/services/resumeIntelligence.js) (Resume Intelligence), [`src/App.jsx`](https://github.com/nishit-luhadia30/genai/blob/main/src/App.jsx) (Application Router), [`src/services/aiService.js`](https://github.com/nishit-luhadia30/genai/blob/main/src/services/aiService.js) (Career AI Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_app["Application Router<br/>[App.jsx]"]
  node_workspace_ui["Resume Workspace"]
  node_profile_editor["Profile Editor"]
  node_resume_upload["Resume Upload<br/>[ResumeUpload.jsx]"]
  node_job_match_card["Job Match Card<br/>[JobMatchCard.jsx]"]
end

subgraph group_resume["Resume Intelligence"]
  node_document_parser["Document Extraction<br/>[documentParser.js]"]
  node_intelligence["Resume Intelligence"]
  node_local_parser["Local Analysis Fallback"]
  node_schema["Profile Validation and Scoring<br/>[resumeSchema.js]"]
  node_edge_ai["Resume AI Actions<br/>[index.ts]"]
end

subgraph group_opportunities["Jobs and Matching"]
  node_job_repository["Job Catalog<br/>[jobRepository.js]"]
  node_sample_jobs["Sample Jobs<br/>[sampleJobs.js]"]
  node_job_store[("Job Postings Store")]
end

subgraph group_services["Platform and Career Tools"]
  node_career_ui["Career Assessment and Dashboard"]
  node_career_recommendations["Career Recommendations"]
  node_skill_gap["Skill Gap Analysis"]
  node_chat["Career Chat<br/>[ChatBot.jsx]"]
  node_ai_service["Career AI Service<br/>[aiService.js]"]
  node_legacy_edge["Career Recommendations API<br/>[index.ts]"]
  node_supabase["Supabase Client and Auth<br/>[supabaseClient.js]"]
end

node_candidate(("Candidate"))
node_gemini["Gemini AI"]
node_supabase_platform[("Supabase Platform")]

node_candidate -->|"opens"| node_app
node_app -->|"routes to"| node_workspace_ui
node_app -->|"routes to"| node_career_ui
node_app -->|"routes to"| node_career_recommendations
node_app -->|"routes to"| node_skill_gap
node_app -->|"renders"| node_chat
node_candidate -->|"selects resume"| node_resume_upload
node_workspace_ui -->|"presents"| node_resume_upload
node_workspace_ui -->|"extracts text"| node_document_parser
node_workspace_ui -->|"requests profile"| node_intelligence
node_document_parser -->|"supplies text"| node_intelligence
node_intelligence -->|"validates profile"| node_schema
node_intelligence -->|"falls back to"| node_local_parser
node_workspace_ui -->|"edits profile"| node_profile_editor
node_workspace_ui -->|"loads catalog"| node_job_repository
node_job_repository -->|"combines demo jobs"| node_sample_jobs
node_job_repository -->|"queries jobs"| node_supabase
node_supabase -->|"reads and writes"| node_job_store
node_workspace_ui -->|"requests matching"| node_intelligence
node_intelligence -->|"scores compatibility"| node_schema
node_workspace_ui -->|"shows matches"| node_job_match_card
node_intelligence -->|"invokes actions"| node_edge_ai
node_edge_ai -->|"parses and ranks"| node_gemini
node_workspace_ui -->|"requests job analysis"| node_edge_ai
node_workspace_ui -->|"requests ATS analysis"| node_edge_ai
node_workspace_ui -->|"requests grounded rewrites"| node_edge_ai
node_intelligence -->|"authenticates session"| node_supabase
node_supabase -->|"uses auth and API"| node_supabase_platform
node_career_recommendations -->|"requests advice"| node_ai_service
node_skill_gap -->|"requests gap analysis"| node_ai_service
node_chat -->|"sends questions"| node_ai_service
node_career_ui -.->|"provides assessment"| node_ai_service
node_ai_service -->|"dispatches career actions"| node_edge_ai
node_ai_service -.->|"uses legacy endpoint"| node_legacy_edge

click node_app "https://github.com/nishit-luhadia30/genai/blob/main/src/App.jsx"
click node_workspace_ui "https://github.com/nishit-luhadia30/genai/blob/main/src/pages/ResumeWorkspace.jsx"
click node_profile_editor "https://github.com/nishit-luhadia30/genai/blob/main/src/components/resume/CandidateProfileEditor.jsx"
click node_resume_upload "https://github.com/nishit-luhadia30/genai/blob/main/src/components/resume/ResumeUpload.jsx"
click node_job_match_card "https://github.com/nishit-luhadia30/genai/blob/main/src/components/resume/JobMatchCard.jsx"
click node_document_parser "https://github.com/nishit-luhadia30/genai/blob/main/src/services/documentParser.js"
click node_intelligence "https://github.com/nishit-luhadia30/genai/blob/main/src/services/resumeIntelligence.js"
click node_local_parser "https://github.com/nishit-luhadia30/genai/blob/main/src/services/localResumeParser.js"
click node_schema "https://github.com/nishit-luhadia30/genai/blob/main/src/ai/resumeSchema.js"
click node_edge_ai "https://github.com/nishit-luhadia30/genai/blob/main/supabase/functions/resume-intelligence/index.ts"
click node_job_repository "https://github.com/nishit-luhadia30/genai/blob/main/src/services/jobRepository.js"
click node_sample_jobs "https://github.com/nishit-luhadia30/genai/blob/main/src/data/sampleJobs.js"
click node_job_store "https://github.com/nishit-luhadia30/genai/blob/main/supabase/migrations/002_resume_intelligence.sql"
click node_career_ui "https://github.com/nishit-luhadia30/genai/blob/main/src/components/CareerAssessment.jsx"
click node_career_recommendations "https://github.com/nishit-luhadia30/genai/blob/main/src/components/CareerRecommendations.jsx"
click node_skill_gap "https://github.com/nishit-luhadia30/genai/blob/main/src/components/SkillGapAnalysis.jsx"
click node_chat "https://github.com/nishit-luhadia30/genai/blob/main/src/components/ChatBot.jsx"
click node_ai_service "https://github.com/nishit-luhadia30/genai/blob/main/src/services/aiService.js"
click node_legacy_edge "https://github.com/nishit-luhadia30/genai/blob/main/supabase/functions/career-recommendations/index.ts"
click node_supabase "https://github.com/nishit-luhadia30/genai/blob/main/src/services/supabaseClient.js"

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_workspace_ui,node_profile_editor,node_resume_upload,node_job_match_card toneBlue
class node_document_parser,node_intelligence,node_local_parser,node_schema,node_edge_ai,node_supabase_platform toneAmber
class node_job_repository,node_sample_jobs,node_job_store toneMint
class node_career_ui,node_career_recommendations,node_skill_gap,node_chat,node_ai_service,node_legacy_edge,node_supabase toneRose
class node_candidate,node_gemini toneIndigo
```

## Components

### Workspace UI

- [Application Router](https://github.com/nishit-luhadia30/genai/blob/main/src/App.jsx): `src/App.jsx`
- [Resume Workspace](https://github.com/nishit-luhadia30/genai/blob/main/src/pages/ResumeWorkspace.jsx): `src/pages/ResumeWorkspace.jsx`
- [Profile Editor](https://github.com/nishit-luhadia30/genai/blob/main/src/components/resume/CandidateProfileEditor.jsx): `src/components/resume/CandidateProfileEditor.jsx`
- [Resume Upload](https://github.com/nishit-luhadia30/genai/blob/main/src/components/resume/ResumeUpload.jsx): `src/components/resume/ResumeUpload.jsx`
- [Job Match Card](https://github.com/nishit-luhadia30/genai/blob/main/src/components/resume/JobMatchCard.jsx): `src/components/resume/JobMatchCard.jsx`

### Resume Intelligence

- [Document Extraction](https://github.com/nishit-luhadia30/genai/blob/main/src/services/documentParser.js): `src/services/documentParser.js`
- [Resume Intelligence](https://github.com/nishit-luhadia30/genai/blob/main/src/services/resumeIntelligence.js): `src/services/resumeIntelligence.js`
- [Local Analysis Fallback](https://github.com/nishit-luhadia30/genai/blob/main/src/services/localResumeParser.js): `src/services/localResumeParser.js`
- [Profile Validation and Scoring](https://github.com/nishit-luhadia30/genai/blob/main/src/ai/resumeSchema.js): `src/ai/resumeSchema.js`
- [Resume AI Actions](https://github.com/nishit-luhadia30/genai/blob/main/supabase/functions/resume-intelligence/index.ts): `supabase/functions/resume-intelligence/index.ts`

### Jobs and Matching

- [Job Catalog](https://github.com/nishit-luhadia30/genai/blob/main/src/services/jobRepository.js): `src/services/jobRepository.js`
- [Sample Jobs](https://github.com/nishit-luhadia30/genai/blob/main/src/data/sampleJobs.js): `src/data/sampleJobs.js`
- [Job Postings Store](https://github.com/nishit-luhadia30/genai/blob/main/supabase/migrations/002_resume_intelligence.sql): `supabase/migrations/002_resume_intelligence.sql`

### Platform and Career Tools

- [Career Assessment and Dashboard](https://github.com/nishit-luhadia30/genai/blob/main/src/components/CareerAssessment.jsx): `src/components/CareerAssessment.jsx`
- [Career Recommendations](https://github.com/nishit-luhadia30/genai/blob/main/src/components/CareerRecommendations.jsx): `src/components/CareerRecommendations.jsx`
- [Skill Gap Analysis](https://github.com/nishit-luhadia30/genai/blob/main/src/components/SkillGapAnalysis.jsx): `src/components/SkillGapAnalysis.jsx`
- [Career Chat](https://github.com/nishit-luhadia30/genai/blob/main/src/components/ChatBot.jsx): `src/components/ChatBot.jsx`
- [Career AI Service](https://github.com/nishit-luhadia30/genai/blob/main/src/services/aiService.js): `src/services/aiService.js`
- [Career Recommendations API](https://github.com/nishit-luhadia30/genai/blob/main/supabase/functions/career-recommendations/index.ts): `supabase/functions/career-recommendations/index.ts`
- [Supabase Client and Auth](https://github.com/nishit-luhadia30/genai/blob/main/src/services/supabaseClient.js): `src/services/supabaseClient.js`

### Other components

- **Candidate**
- **Gemini AI**
- **Supabase Platform**

## Connections

- Candidate → Application Router: opens (evidence: `src/App.jsx`)
- Application Router → Resume Workspace: routes to (evidence: `src/App.jsx`)
- Application Router → Career Assessment and Dashboard: routes to (evidence: `src/App.jsx`)
- Application Router → Career Recommendations: routes to (evidence: `src/App.jsx`)
- Application Router → Skill Gap Analysis: routes to (evidence: `src/App.jsx`)
- Application Router → Career Chat: renders (evidence: `src/App.jsx`)
- Candidate → Resume Upload: selects resume (evidence: `README.md`)
- Resume Workspace → Resume Upload: presents (evidence: `src/pages/ResumeWorkspace.jsx`)
- Resume Workspace → Document Extraction: extracts text (evidence: `src/pages/ResumeWorkspace.jsx`)
- Resume Workspace → Resume Intelligence: requests profile (evidence: `src/pages/ResumeWorkspace.jsx`)
- Document Extraction → Resume Intelligence: supplies text (evidence: `src/pages/ResumeWorkspace.jsx`)
- Resume Intelligence → Profile Validation and Scoring: validates profile (evidence: `src/services/resumeIntelligence.js`)
- Resume Intelligence → Local Analysis Fallback: falls back to (evidence: `src/services/resumeIntelligence.js`)
- Resume Workspace → Profile Editor: edits profile (evidence: `src/pages/ResumeWorkspace.jsx`)
- Resume Workspace → Job Catalog: loads catalog (evidence: `src/pages/ResumeWorkspace.jsx`)
- Job Catalog → Sample Jobs: combines demo jobs (evidence: `src/services/jobRepository.js`)
- Job Catalog → Supabase Client and Auth: queries jobs (evidence: `src/services/jobRepository.js`)
- Supabase Client and Auth → Job Postings Store: reads and writes (evidence: `README.md`)
- Resume Workspace → Resume Intelligence: requests matching (evidence: `README.md`)
- Resume Intelligence → Profile Validation and Scoring: scores compatibility (evidence: `src/services/resumeIntelligence.js`)
- Resume Workspace → Job Match Card: shows matches (evidence: `src/pages/ResumeWorkspace.jsx`)
- Resume Intelligence → Resume AI Actions: invokes actions (evidence: `README.md`)
- Resume AI Actions → Gemini AI: parses and ranks (evidence: `README.md`)
- Resume Workspace → Resume AI Actions: requests job analysis (evidence: `README.md`)
- Resume Workspace → Resume AI Actions: requests ATS analysis (evidence: `README.md`)
- Resume Workspace → Resume AI Actions: requests grounded rewrites (evidence: `README.md`)
- Resume Intelligence → Supabase Client and Auth: authenticates session (evidence: `src/services/resumeIntelligence.js`)
- Supabase Client and Auth → Supabase Platform: uses auth and API (evidence: `README.md`)
- Career Recommendations → Career AI Service: requests advice (evidence: `src/components/CareerRecommendations.jsx`)
- Skill Gap Analysis → Career AI Service: requests gap analysis (evidence: `src/components/SkillGapAnalysis.jsx`)
- Career Chat → Career AI Service: sends questions (evidence: `src/components/ChatBot.jsx`)
- Career Assessment and Dashboard → Career AI Service: provides assessment
- Career AI Service → Resume AI Actions: dispatches career actions (evidence: `src/services/aiService.js`)
- Career AI Service → Career Recommendations API: uses legacy endpoint
