# lakshmii08/mp-neurohire architecture

> Architecture diagram of the GitHub repository lakshmii08/mp-neurohire, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lakshmii08/mp-neurohire
- Repository: https://github.com/lakshmii08/mp-neurohire

## Overview

NeuroHire is a candidate-and-recruiter hiring platform. Candidates authenticate, analyze a resume and find skill-matched roles, enroll voice and facial identity signals, then complete an AI-assisted interview with speech analysis and proctoring; recruiters manage jobs and review candidate reports, integrity signals, and analytics. The React pages use a Firestore-shaped client that calls the Express API, which persists application data in SQLite and proxies voice analysis to Python. README documents capabilities beyond the sampled excerpts; links to those subsystems are included where documented, with evidence limits noted below.

Main entry points: [`src/App.tsx`](https://github.com/lakshmii08/mp-neurohire/blob/main/src/App.tsx) (SPA routes), [`src/lib/firestore.ts`](https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/firestore.ts) (API client), [`src/pages/InterviewScreen.tsx`](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/InterviewScreen.tsx) (AI interview), [`server/index.js`](https://github.com/lakshmii08/mp-neurohire/blob/main/server/index.js) (Express API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portals["User portals"]
  node_app_routes["SPA routes<br/>[App.tsx]"]
  node_auth_context["Session context<br/>[AuthContext.tsx]"]
end

subgraph group_candidate["Candidate assessment"]
  node_candidate_dashboard["Candidate dashboard"]
  node_resume_analysis["Resume analysis<br/>[ResumeAnalysis.tsx]"]
  node_job_matching["Job recommendations"]
  node_voice_enrollment["Voice enrollment<br/>[VoiceAuth.tsx]"]
  node_interview["AI interview"]
  node_face_identity["Face identity check<br/>[faceIdentity.ts]"]
  node_video_monitoring["Video monitoring<br/>[videoMonitoring.ts]"]
end

subgraph group_recruiter["Recruiter review"]
  node_candidate_report["Candidate report"]
  node_recruiter_jobs["Job management<br/>[RecruiterJobs.tsx]"]
  node_applicants["Job applicants<br/>[JobApplicants.tsx]"]
  node_proctoring_dashboard["Proctoring dashboard"]
  node_analytics["Recruiter analytics<br/>[Analytics.tsx]"]
end

subgraph group_services["Application services"]
  node_client_api["API client<br/>[firestore.ts]"]
  node_gemini_client["Generative AI client<br/>[gemini.ts]"]
  node_express_api["Express API<br/>[index.js]"]
  node_auth_routes["Authentication routes<br/>[auth.js]"]
  node_candidate_routes["Candidate routes<br/>[candidates.js]"]
  node_interview_routes["Interview routes<br/>[interviews.js]"]
  node_admin_routes["Admin routes<br/>[admin.js]"]
  node_sqlite[("SQLite database<br/>[db.js]")]
end

subgraph group_ml["Voice and speech ML"]
  node_ml_service["ML inference API<br/>[app.py]"]
  node_confidence_model["Confidence model"]
end

node_candidate_actor(("Candidate"))
node_recruiter_actor(("Recruiter"))
node_gemini_service{{"Google Gemini"}}

node_candidate_actor -->|"uses"| node_app_routes
node_recruiter_actor -->|"uses"| node_app_routes
node_app_routes -->|"provides session"| node_auth_context
node_app_routes -->|"routes to"| node_candidate_dashboard
node_app_routes -->|"routes to"| node_resume_analysis
node_app_routes -->|"routes to"| node_voice_enrollment
node_app_routes -->|"routes to"| node_interview
node_app_routes -->|"routes to"| node_candidate_report
node_app_routes -->|"routes to"| node_recruiter_jobs
node_app_routes -->|"routes to"| node_applicants
node_app_routes -->|"routes to"| node_proctoring_dashboard
node_app_routes -->|"routes to"| node_analytics
node_auth_context -->|"loads candidate"| node_client_api
node_candidate_dashboard -->|"loads profile"| node_client_api
node_candidate_dashboard -.->|"shows matches"| node_job_matching
node_resume_analysis -->|"analyzes resume"| node_gemini_client
node_resume_analysis -.->|"submits profile"| node_client_api
node_voice_enrollment -->|"captures signature"| node_face_identity
node_voice_enrollment -->|"gets landmarker"| node_video_monitoring
node_voice_enrollment -->|"updates candidate"| node_client_api
node_interview -->|"generates questions"| node_gemini_client
node_interview -->|"monitors interview"| node_video_monitoring
node_interview -->|"checks identity"| node_face_identity
node_interview -.->|"saves session"| node_client_api
node_candidate_report -->|"loads report"| node_client_api
node_recruiter_jobs -.->|"manages jobs"| node_client_api
node_applicants -.->|"loads applicants"| node_client_api
node_proctoring_dashboard -.->|"reads integrity events"| node_client_api
node_analytics -.->|"loads aggregates"| node_client_api
node_client_api -->|"sends REST requests"| node_express_api
node_express_api -->|"mounts routes"| node_auth_routes
node_express_api -->|"mounts routes"| node_candidate_routes
node_express_api -->|"mounts routes"| node_interview_routes
node_express_api -->|"mounts routes"| node_admin_routes
node_auth_routes -->|"reads and writes"| node_sqlite
node_candidate_routes -->|"reads and writes"| node_sqlite
node_interview_routes -->|"reads and writes"| node_sqlite
node_admin_routes -->|"reads and writes"| node_sqlite
node_auth_routes -->|"forwards voice audio"| node_ml_service
node_ml_service -->|"uses classifier"| node_confidence_model
node_gemini_client -->|"requests generation"| node_gemini_service
node_gemini_client -.->|"requests speech scoring"| node_ml_service

click node_app_routes "https://github.com/lakshmii08/mp-neurohire/blob/main/src/App.tsx"
click node_auth_context "https://github.com/lakshmii08/mp-neurohire/blob/main/src/contexts/AuthContext.tsx"
click node_candidate_dashboard "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/CandidateDashboard.tsx"
click node_resume_analysis "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/ResumeAnalysis.tsx"
click node_job_matching "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/CandidateDashboard.tsx"
click node_voice_enrollment "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/VoiceAuth.tsx"
click node_interview "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/InterviewScreen.tsx"
click node_face_identity "https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/faceIdentity.ts"
click node_video_monitoring "https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/videoMonitoring.ts"
click node_candidate_report "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/CandidateReport.tsx"
click node_recruiter_jobs "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/RecruiterJobs.tsx"
click node_applicants "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/JobApplicants.tsx"
click node_proctoring_dashboard "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/ProctoringDashboard.tsx"
click node_analytics "https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/Analytics.tsx"
click node_client_api "https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/firestore.ts"
click node_gemini_client "https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/gemini.ts"
click node_express_api "https://github.com/lakshmii08/mp-neurohire/blob/main/server/index.js"
click node_auth_routes "https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/auth.js"
click node_candidate_routes "https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/candidates.js"
click node_interview_routes "https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/interviews.js"
click node_admin_routes "https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/admin.js"
click node_sqlite "https://github.com/lakshmii08/mp-neurohire/blob/main/server/db.js"
click node_ml_service "https://github.com/lakshmii08/mp-neurohire/blob/main/python_ml_service/app.py"
click node_confidence_model "https://github.com/lakshmii08/mp-neurohire/blob/main/python_ml_service/confidence_model.py"

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_routes,node_auth_context toneBlue
class node_candidate_dashboard,node_resume_analysis,node_job_matching,node_voice_enrollment,node_interview,node_face_identity,node_video_monitoring toneAmber
class node_candidate_report,node_recruiter_jobs,node_applicants,node_proctoring_dashboard,node_analytics toneMint
class node_client_api,node_gemini_client,node_express_api,node_auth_routes,node_candidate_routes,node_interview_routes,node_admin_routes,node_sqlite toneRose
class node_ml_service,node_confidence_model,node_candidate_actor,node_recruiter_actor,node_gemini_service toneIndigo
```

## Components

### User portals

- [SPA routes](https://github.com/lakshmii08/mp-neurohire/blob/main/src/App.tsx): `src/App.tsx`
- [Session context](https://github.com/lakshmii08/mp-neurohire/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`

### Candidate assessment

- [Candidate dashboard](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/CandidateDashboard.tsx): `src/pages/CandidateDashboard.tsx`
- [Resume analysis](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/ResumeAnalysis.tsx): `src/pages/ResumeAnalysis.tsx`
- [Job recommendations](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/CandidateDashboard.tsx): `src/pages/CandidateDashboard.tsx`
- [Voice enrollment](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/VoiceAuth.tsx): `src/pages/VoiceAuth.tsx`
- [AI interview](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/InterviewScreen.tsx): `src/pages/InterviewScreen.tsx`
- [Face identity check](https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/faceIdentity.ts): `src/lib/faceIdentity.ts`
- [Video monitoring](https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/videoMonitoring.ts): `src/lib/videoMonitoring.ts`

### Recruiter review

- [Candidate report](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/CandidateReport.tsx): `src/pages/CandidateReport.tsx`
- [Job management](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/RecruiterJobs.tsx): `src/pages/RecruiterJobs.tsx`
- [Job applicants](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/JobApplicants.tsx): `src/pages/JobApplicants.tsx`
- [Proctoring dashboard](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/ProctoringDashboard.tsx): `src/pages/ProctoringDashboard.tsx`
- [Recruiter analytics](https://github.com/lakshmii08/mp-neurohire/blob/main/src/pages/Analytics.tsx): `src/pages/Analytics.tsx`

### Application services

- [API client](https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/firestore.ts): `src/lib/firestore.ts`
- [Generative AI client](https://github.com/lakshmii08/mp-neurohire/blob/main/src/lib/gemini.ts): `src/lib/gemini.ts`
- [Express API](https://github.com/lakshmii08/mp-neurohire/blob/main/server/index.js): `server/index.js`
- [Authentication routes](https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/auth.js): `server/routes/auth.js`
- [Candidate routes](https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/candidates.js): `server/routes/candidates.js`
- [Interview routes](https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/interviews.js): `server/routes/interviews.js`
- [Admin routes](https://github.com/lakshmii08/mp-neurohire/blob/main/server/routes/admin.js): `server/routes/admin.js`
- [SQLite database](https://github.com/lakshmii08/mp-neurohire/blob/main/server/db.js): `server/db.js`

### Voice and speech ML

- [ML inference API](https://github.com/lakshmii08/mp-neurohire/blob/main/python_ml_service/app.py): `python_ml_service/app.py`
- [Confidence model](https://github.com/lakshmii08/mp-neurohire/blob/main/python_ml_service/confidence_model.py): `python_ml_service/confidence_model.py`

### Other components

- **Candidate**
- **Recruiter**
- **Google Gemini**

## Connections

- Candidate → SPA routes: uses (evidence: `src/App.tsx`)
- Recruiter → SPA routes: uses (evidence: `src/App.tsx`)
- SPA routes → Session context: provides session (evidence: `src/App.tsx`)
- SPA routes → Candidate dashboard: routes to (evidence: `src/App.tsx`)
- SPA routes → Resume analysis: routes to (evidence: `src/App.tsx`)
- SPA routes → Voice enrollment: routes to (evidence: `src/App.tsx`)
- SPA routes → AI interview: routes to (evidence: `src/App.tsx`)
- SPA routes → Candidate report: routes to (evidence: `src/App.tsx`)
- SPA routes → Job management: routes to (evidence: `src/App.tsx`)
- SPA routes → Job applicants: routes to (evidence: `src/App.tsx`)
- SPA routes → Proctoring dashboard: routes to (evidence: `src/App.tsx`)
- SPA routes → Recruiter analytics: routes to (evidence: `src/App.tsx`)
- Session context → API client: loads candidate (evidence: `src/contexts/AuthContext.tsx`)
- Candidate dashboard → API client: loads profile (evidence: `src/pages/CandidateDashboard.tsx`)
- Candidate dashboard → Job recommendations: shows matches (evidence: `src/pages/CandidateDashboard.tsx`)
- Resume analysis → Generative AI client: analyzes resume (evidence: `src/pages/ResumeAnalysis.tsx`)
- Resume analysis → API client: submits profile
- Voice enrollment → Face identity check: captures signature (evidence: `src/pages/VoiceAuth.tsx`)
- Voice enrollment → Video monitoring: gets landmarker (evidence: `src/pages/VoiceAuth.tsx`)
- Voice enrollment → API client: updates candidate (evidence: `src/pages/VoiceAuth.tsx`)
- AI interview → Generative AI client: generates questions (evidence: `src/pages/InterviewScreen.tsx`)
- AI interview → Video monitoring: monitors interview (evidence: `src/pages/InterviewScreen.tsx`)
- AI interview → Face identity check: checks identity (evidence: `src/pages/InterviewScreen.tsx`)
- AI interview → API client: saves session (evidence: `src/pages/InterviewScreen.tsx`)
- Candidate report → API client: loads report (evidence: `src/pages/CandidateReport.tsx`)
- Job management → API client: manages jobs
- Job applicants → API client: loads applicants
- Proctoring dashboard → API client: reads integrity events
- Recruiter analytics → API client: loads aggregates
- API client → Express API: sends REST requests (evidence: `src/lib/firestore.ts`)
- Express API → Authentication routes: mounts routes (evidence: `server/index.js`)
- Express API → Candidate routes: mounts routes (evidence: `server/index.js`)
- Express API → Interview routes: mounts routes (evidence: `server/index.js`)
- Express API → Admin routes: mounts routes (evidence: `server/index.js`)
- Authentication routes → SQLite database: reads and writes (evidence: `server/routes/auth.js`)
- Candidate routes → SQLite database: reads and writes (evidence: `server/routes/candidates.js`)
- Interview routes → SQLite database: reads and writes (evidence: `server/routes/interviews.js`)
- Admin routes → SQLite database: reads and writes (evidence: `server/routes/admin.js`)
- Authentication routes → ML inference API: forwards voice audio (evidence: `server/routes/auth.js`)
- ML inference API → Confidence model: uses classifier (evidence: `python_ml_service/app.py`)
- Generative AI client → Google Gemini: requests generation (evidence: `src/lib/gemini.ts`)
- Generative AI client → ML inference API: requests speech scoring
