# dhruvplaz-web/hirex-trial architecture

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

- Interactive diagram: https://gitdiagram.com/dhruvplaz-web/hirex-trial
- Repository: https://github.com/dhruvplaz-web/hirex-trial

## Overview

HireX is a multi-role campus placement and talent-intelligence platform. Students build and verify skills through onboarding, assessments, aptitude activities and the AST Code Lab; the platform exposes evidence and matching for recruiters, plus analytics for academicians and administrators. The React client selects persona-specific views and calls a FastAPI backend whose routers coordinate ML, assessment and persistent-store capabilities. The README documents major features that were not sampled; those branches are included at subsystem level. Unshown implementation details and their internal call paths are intentionally not inferred.

Main entry points: [`server/app/code_lab/code_lab_engine.py`](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/code_lab_engine.py) (Code Lab engine), [`server/app/main.py`](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/main.py) (FastAPI application), [`server/app/routes`](https://github.com/dhruvplaz-web/hirex-trial/tree/main/server/app/routes) (Role and feature routes), [`server/app/code_lab/routes_code_lab.py`](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/routes_code_lab.py) (Code Lab routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Role-based client"]
  node_app["Role router and shell<br/>[App.tsx]"]
  node_landing["Role entry"]
  node_onboarding["Resume onboarding"]
  node_auth["Authentication context<br/>[AuthContext.tsx]"]
  node_assessment["Assessment context"]
  node_roleportals["Role portals"]
end

subgraph group_verification["Skill verification"]
  node_aptitude["Aptitude Arena"]
  node_proctored["Proctored assessment"]
  node_codeclient["Code Lab client<br/>[CodeLabView.tsx]"]
  node_codeapi["Code Lab routes<br/>[routes_code_lab.py]"]
  node_codeengine["Code Lab engine<br/>[code_lab_engine.py]"]
  node_challenge["Challenge bank and audit<br/>[code_lab_bank.py]"]
  node_challengepipeline["Challenge ingestion"]
end

subgraph group_placement["Matching and placement"]
  node_ml["Skill and matching models"]
  node_copilot["Placement Co-Pilot<br/>[placement_agent.py]"]
end

subgraph group_backend["API and persistence"]
  node_api["API service<br/>[api.ts]"]
  node_server["FastAPI application<br/>[main.py]"]
  node_routes["Role and feature routes"]
  node_store[("Canonical data store<br/>[canonical_store.py]")]
  node_seed["Institution and market data<br/>[seed_data.py]"]
end

subgraph group_governance["Institutional governance"]
  node_academician["Academician portal"]
  node_admin["Admin portal"]
  node_sync["Data synchronization<br/>[sync_service.py]"]
end

node_student(("Student"))
node_recruiter(("Recruiter"))
node_institution(("Academicians and TPOs"))

node_student -->|"enters"| node_landing
node_recruiter -->|"uses portal"| node_roleportals
node_institution -->|"uses portal"| node_academician
node_landing -->|"enters role"| node_app
node_app -->|"reads profile"| node_auth
node_auth -->|"renders onboarding"| node_onboarding
node_student -->|"provides resume"| node_onboarding
node_student -->|"takes aptitude"| node_aptitude
node_student -->|"verifies code"| node_codeclient
node_codeclient -.->|"requests API"| node_api
node_proctored -->|"updates state"| node_assessment
node_api -.->|"calls API"| node_server
node_server -->|"registers routers"| node_routes
node_routes -->|"reads and writes"| node_store
node_routes -->|"loads seed data"| node_seed
node_codeapi -->|"dispatches"| node_codeengine
node_codeengine -->|"selects challenges"| node_challenge
node_codeengine -->|"validates submissions"| node_challengepipeline
node_codeapi -->|"uses pipeline"| node_challengepipeline
node_codeengine -->|"persists outcomes"| node_store
node_recruiter -->|"matches talent"| node_ml
node_ml -.->|"supports matching"| node_roleportals
node_student -->|"requests guidance"| node_copilot
node_institution -->|"reviews analytics"| node_academician
node_institution -->|"governs platform"| node_admin
node_server -->|"registers sync routes"| node_sync

click node_app "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/App.tsx"
click node_landing "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/LandingPageView.tsx"
click node_onboarding "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/components/auth/ResumeOnboardingSection.tsx"
click node_auth "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/context/AuthContext.tsx"
click node_assessment "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/context/AssessmentContext.tsx"
click node_aptitude "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/AptitudeArenaView.tsx"
click node_proctored "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/components/proctoring/ProctoredAssessmentEngine.tsx"
click node_codeclient "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/CodeLab/CodeLabView.tsx"
click node_codeapi "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/routes_code_lab.py"
click node_codeengine "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/code_lab_engine.py"
click node_challenge "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/code_lab_bank.py"
click node_challengepipeline "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/challenge_pipeline.py"
click node_ml "https://github.com/dhruvplaz-web/hirex-trial/tree/main/server/app/ml"
click node_copilot "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/agents/placement_agent.py"
click node_roleportals "https://github.com/dhruvplaz-web/hirex-trial/tree/main/client/src/views"
click node_api "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/services/api.ts"
click node_server "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/main.py"
click node_routes "https://github.com/dhruvplaz-web/hirex-trial/tree/main/server/app/routes"
click node_store "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/db/canonical_store.py"
click node_seed "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/data/seed_data.py"
click node_academician "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/AcademicianPortalView.tsx"
click node_admin "https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/AdminPortalView.tsx"
click node_sync "https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/services/sync_service.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,node_landing,node_onboarding,node_auth,node_assessment,node_roleportals toneBlue
class node_aptitude,node_proctored,node_codeclient,node_codeapi,node_codeengine,node_challenge,node_challengepipeline toneAmber
class node_ml,node_copilot toneMint
class node_api,node_server,node_routes,node_store,node_seed toneRose
class node_academician,node_admin,node_sync,node_student,node_recruiter,node_institution toneIndigo
```

## Components

### Role-based client

- [Role router and shell](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Role entry](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/LandingPageView.tsx): `client/src/views/LandingPageView.tsx`
- [Resume onboarding](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/components/auth/ResumeOnboardingSection.tsx): `client/src/components/auth/ResumeOnboardingSection.tsx`
- [Authentication context](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/context/AuthContext.tsx): `client/src/context/AuthContext.tsx`
- [Assessment context](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/context/AssessmentContext.tsx): `client/src/context/AssessmentContext.tsx`
- [Role portals](https://github.com/dhruvplaz-web/hirex-trial/tree/main/client/src/views): `client/src/views`

### Skill verification

- [Aptitude Arena](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/AptitudeArenaView.tsx): `client/src/views/AptitudeArenaView.tsx`
- [Proctored assessment](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/components/proctoring/ProctoredAssessmentEngine.tsx): `client/src/components/proctoring/ProctoredAssessmentEngine.tsx`
- [Code Lab client](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/CodeLab/CodeLabView.tsx): `client/src/views/CodeLab/CodeLabView.tsx`
- [Code Lab routes](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/routes_code_lab.py): `server/app/code_lab/routes_code_lab.py`
- [Code Lab engine](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/code_lab_engine.py): `server/app/code_lab/code_lab_engine.py`
- [Challenge bank and audit](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/code_lab_bank.py): `server/app/code_lab/code_lab_bank.py`
- [Challenge ingestion](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/code_lab/challenge_pipeline.py): `server/app/code_lab/challenge_pipeline.py`

### Matching and placement

- [Skill and matching models](https://github.com/dhruvplaz-web/hirex-trial/tree/main/server/app/ml): `server/app/ml`
- [Placement Co-Pilot](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/agents/placement_agent.py): `server/app/agents/placement_agent.py`

### API and persistence

- [API service](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/services/api.ts): `client/src/services/api.ts`
- [FastAPI application](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/main.py): `server/app/main.py`
- [Role and feature routes](https://github.com/dhruvplaz-web/hirex-trial/tree/main/server/app/routes): `server/app/routes`
- [Canonical data store](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/db/canonical_store.py): `server/app/db/canonical_store.py`
- [Institution and market data](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/data/seed_data.py): `server/app/data/seed_data.py`

### Institutional governance

- [Academician portal](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/AcademicianPortalView.tsx): `client/src/views/AcademicianPortalView.tsx`
- [Admin portal](https://github.com/dhruvplaz-web/hirex-trial/blob/main/client/src/views/AdminPortalView.tsx): `client/src/views/AdminPortalView.tsx`
- [Data synchronization](https://github.com/dhruvplaz-web/hirex-trial/blob/main/server/app/services/sync_service.py): `server/app/services/sync_service.py`

### Other components

- **Student**
- **Recruiter**
- **Academicians and TPOs**

## Connections

- Student → Role entry: enters (evidence: `README.md`)
- Recruiter → Role portals: uses portal (evidence: `README.md`)
- Academicians and TPOs → Academician portal: uses portal (evidence: `README.md`)
- Role entry → Role router and shell: enters role (evidence: `client/src/App.tsx`)
- Role router and shell → Authentication context: reads profile (evidence: `client/src/App.tsx`)
- Authentication context → Resume onboarding: renders onboarding (evidence: `client/src/components/modals/AuthModal.tsx`)
- Student → Resume onboarding: provides resume (evidence: `README.md`)
- Student → Aptitude Arena: takes aptitude (evidence: `README.md`)
- Student → Code Lab client: verifies code (evidence: `README.md`)
- Code Lab client → API service: requests API
- Proctored assessment → Assessment context: updates state (evidence: `client/src/components/proctoring/ProctoredAssessmentEngine.tsx`)
- API service → FastAPI application: calls API
- FastAPI application → Role and feature routes: registers routers (evidence: `server/app/main.py`)
- Role and feature routes → Canonical data store: reads and writes (evidence: `server/app/routes/auth.py`)
- Role and feature routes → Institution and market data: loads seed data (evidence: `server/app/routes/auth.py`)
- Code Lab routes → Code Lab engine: dispatches (evidence: `server/app/code_lab/routes_code_lab.py`)
- Code Lab engine → Challenge bank and audit: selects challenges (evidence: `server/app/code_lab/code_lab_engine.py`)
- Code Lab engine → Challenge ingestion: validates submissions (evidence: `server/app/code_lab/challenge_pipeline.py`)
- Code Lab routes → Challenge ingestion: uses pipeline (evidence: `server/app/code_lab/routes_code_lab.py`)
- Code Lab engine → Canonical data store: persists outcomes (evidence: `server/app/code_lab/code_lab_engine.py`)
- Recruiter → Skill and matching models: matches talent (evidence: `README.md`)
- Skill and matching models → Role portals: supports matching
- Student → Placement Co-Pilot: requests guidance (evidence: `README.md`)
- Academicians and TPOs → Academician portal: reviews analytics (evidence: `README.md`)
- Academicians and TPOs → Admin portal: governs platform (evidence: `README.md`)
- FastAPI application → Data synchronization: registers sync routes (evidence: `server/app/main.py`)
