# mahendrababu99/mtx architecture

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

- Interactive diagram: https://gitdiagram.com/mahendrababu99/mtx
- Repository: https://github.com/mahendrababu99/mtx

## Overview

EvidenceHire is a candidate assessment and hiring-evaluation application: candidates authenticate, complete staged and progressive assessments, and present evidence for HR review. The UI also exposes candidate evidence, competition, and communication features, while HR has candidate-review workflows. The backend mounts role-protected APIs and persists data through Supabase; competition evaluation can use AI-detection services. The README is a generic Vite template, so product capabilities are inferred from the source tree and sampled routes/controllers. Unsampled modules are shown as distinct subsystems, without speculative wiring.

Main entry points: [`src/features/candidate/CandidatePortal.tsx`](https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/CandidatePortal.tsx) (Candidate portal), [`backend/src/server.ts`](https://github.com/mahendrababu99/mtx/blob/main/backend/src/server.ts) (API server), [`src/App.tsx`](https://github.com/mahendrababu99/mtx/blob/main/src/App.tsx) (Role-based app), [`backend/src/config/database.ts`](https://github.com/mahendrababu99/mtx/blob/main/backend/src/config/database.ts) (Supabase database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_app["Role-based app<br/>[App.tsx]"]
  node_candidate_portal["Candidate portal"]
  node_hr_dashboard["HR dashboard<br/>[HRDashboard.tsx]"]
end

subgraph group_candidate["Candidate evaluation"]
  node_assessment_ui["Assessment runner"]
  node_qualification["Qualification flow"]
  node_competition_ui["Live competitions"]
  node_communication_ui["Communication assessment"]
end

subgraph group_hiring["Hiring and evidence"]
  node_evidence_hub["Candidate evidence hub"]
  node_ai_engine["Explainable insights<br/>[aiEngineService.ts]"]
end

subgraph group_backend["API and persistence"]
  node_api_client["API client<br/>[apiClient.ts]"]
  node_server["API server<br/>[server.ts]"]
  node_assessment_routes["Assessment routes"]
  node_assessment_controller["Assessment controller"]
  node_competition_routes["Competition routes"]
  node_competition_controller["Competition controller"]
  node_hr_controller["HR controller<br/>[hrController.ts]"]
  node_evidence_controller["Evidence controller"]
  node_supabase[("Supabase database<br/>[database.ts]")]
end

subgraph group_integrations["External analysis"]
  node_ai_detection["AI detection"]
  node_model_service{{"Model service"}}
end

node_candidate_actor(("Candidate"))
node_hr_actor(("HR user"))

node_candidate_actor -->|"uses"| node_app
node_hr_actor -->|"uses"| node_app
node_app -->|"renders"| node_candidate_portal
node_app -->|"renders"| node_hr_dashboard
node_candidate_portal -->|"offers"| node_assessment_ui
node_candidate_portal -->|"offers"| node_competition_ui
node_candidate_portal -->|"offers"| node_communication_ui
node_candidate_portal -->|"offers"| node_evidence_hub
node_assessment_ui -.->|"qualification service"| node_qualification
node_assessment_ui -.->|"API calls"| node_api_client
node_competition_ui -.->|"API calls"| node_api_client
node_api_client -.->|"HTTP requests"| node_server
node_server -->|"mounts"| node_assessment_routes
node_server -->|"mounts"| node_competition_routes
node_server -.->|"mounts HR routes"| node_hr_controller
node_assessment_routes -->|"dispatches"| node_assessment_controller
node_competition_routes -->|"dispatches"| node_competition_controller
node_assessment_controller -->|"reads and writes"| node_supabase
node_competition_controller -->|"reads and writes"| node_supabase
node_hr_controller -->|"reads"| node_supabase
node_hr_controller -->|"uses evidence"| node_evidence_controller
node_competition_controller -->|"checks submissions"| node_ai_detection
node_ai_detection -.->|"requests prediction"| node_model_service
node_ai_detection -->|"saves detections"| node_supabase
node_evidence_hub -.->|"insight support"| node_ai_engine

click node_app "https://github.com/mahendrababu99/mtx/blob/main/src/App.tsx"
click node_candidate_portal "https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/CandidatePortal.tsx"
click node_hr_dashboard "https://github.com/mahendrababu99/mtx/blob/main/src/features/hr-dashboard/HRDashboard.tsx"
click node_assessment_ui "https://github.com/mahendrababu99/mtx/blob/main/src/features/assessment/AssessmentRunner.tsx"
click node_qualification "https://github.com/mahendrababu99/mtx/blob/main/src/features/qualification/services/qualificationService.ts"
click node_competition_ui "https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/competition/LiveCompetitionSession.tsx"
click node_communication_ui "https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/communication/CommunicationAssessmentModule.tsx"
click node_evidence_hub "https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/CandidateEvidenceHub.tsx"
click node_ai_engine "https://github.com/mahendrababu99/mtx/blob/main/src/services/aiEngineService.ts"
click node_api_client "https://github.com/mahendrababu99/mtx/blob/main/src/services/apiClient.ts"
click node_server "https://github.com/mahendrababu99/mtx/blob/main/backend/src/server.ts"
click node_assessment_routes "https://github.com/mahendrababu99/mtx/blob/main/backend/src/routes/assessmentRoutes.ts"
click node_assessment_controller "https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/assessmentController.ts"
click node_competition_routes "https://github.com/mahendrababu99/mtx/blob/main/backend/src/routes/competitionRoutes.ts"
click node_competition_controller "https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/competitionController.ts"
click node_hr_controller "https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/hrController.ts"
click node_evidence_controller "https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/evidenceController.ts"
click node_supabase "https://github.com/mahendrababu99/mtx/blob/main/backend/src/config/database.ts"
click node_ai_detection "https://github.com/mahendrababu99/mtx/blob/main/backend/src/services/aiDetectionService.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_candidate_portal,node_hr_dashboard,node_hr_actor toneBlue
class node_assessment_ui,node_qualification,node_competition_ui,node_communication_ui toneAmber
class node_evidence_hub,node_ai_engine toneMint
class node_api_client,node_server,node_assessment_routes,node_assessment_controller,node_competition_routes,node_competition_controller,node_hr_controller,node_evidence_controller,node_supabase toneRose
class node_ai_detection,node_model_service,node_candidate_actor toneIndigo
```

## Components

### User experience

- [Role-based app](https://github.com/mahendrababu99/mtx/blob/main/src/App.tsx): `src/App.tsx`
- [Candidate portal](https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/CandidatePortal.tsx): `src/features/candidate/CandidatePortal.tsx`
- [HR dashboard](https://github.com/mahendrababu99/mtx/blob/main/src/features/hr-dashboard/HRDashboard.tsx): `src/features/hr-dashboard/HRDashboard.tsx`

### Candidate evaluation

- [Assessment runner](https://github.com/mahendrababu99/mtx/blob/main/src/features/assessment/AssessmentRunner.tsx): `src/features/assessment/AssessmentRunner.tsx`
- [Qualification flow](https://github.com/mahendrababu99/mtx/blob/main/src/features/qualification/services/qualificationService.ts): `src/features/qualification/services/qualificationService.ts`
- [Live competitions](https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/competition/LiveCompetitionSession.tsx): `src/features/candidate/competition/LiveCompetitionSession.tsx`
- [Communication assessment](https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/communication/CommunicationAssessmentModule.tsx): `src/features/candidate/communication/CommunicationAssessmentModule.tsx`

### Hiring and evidence

- [Candidate evidence hub](https://github.com/mahendrababu99/mtx/blob/main/src/features/candidate/CandidateEvidenceHub.tsx): `src/features/candidate/CandidateEvidenceHub.tsx`
- [Explainable insights](https://github.com/mahendrababu99/mtx/blob/main/src/services/aiEngineService.ts): `src/services/aiEngineService.ts`

### API and persistence

- [API client](https://github.com/mahendrababu99/mtx/blob/main/src/services/apiClient.ts): `src/services/apiClient.ts`
- [API server](https://github.com/mahendrababu99/mtx/blob/main/backend/src/server.ts): `backend/src/server.ts`
- [Assessment routes](https://github.com/mahendrababu99/mtx/blob/main/backend/src/routes/assessmentRoutes.ts): `backend/src/routes/assessmentRoutes.ts`
- [Assessment controller](https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/assessmentController.ts): `backend/src/controllers/assessmentController.ts`
- [Competition routes](https://github.com/mahendrababu99/mtx/blob/main/backend/src/routes/competitionRoutes.ts): `backend/src/routes/competitionRoutes.ts`
- [Competition controller](https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/competitionController.ts): `backend/src/controllers/competitionController.ts`
- [HR controller](https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/hrController.ts): `backend/src/controllers/hrController.ts`
- [Evidence controller](https://github.com/mahendrababu99/mtx/blob/main/backend/src/controllers/evidenceController.ts): `backend/src/controllers/evidenceController.ts`
- [Supabase database](https://github.com/mahendrababu99/mtx/blob/main/backend/src/config/database.ts): `backend/src/config/database.ts`

### External analysis

- [AI detection](https://github.com/mahendrababu99/mtx/blob/main/backend/src/services/aiDetectionService.ts): `backend/src/services/aiDetectionService.ts`
- **Model service**

### Other components

- **Candidate**
- **HR user**

## Connections

- Candidate → Role-based app: uses
- HR user → Role-based app: uses
- Role-based app → Candidate portal: renders
- Role-based app → HR dashboard: renders
- Candidate portal → Assessment runner: offers
- Candidate portal → Live competitions: offers
- Candidate portal → Communication assessment: offers
- Candidate portal → Candidate evidence hub: offers
- Assessment runner → Qualification flow: qualification service
- Assessment runner → API client: API calls
- Live competitions → API client: API calls
- API client → API server: HTTP requests
- API server → Assessment routes: mounts
- API server → Competition routes: mounts
- API server → HR controller: mounts HR routes
- Assessment routes → Assessment controller: dispatches
- Competition routes → Competition controller: dispatches
- Assessment controller → Supabase database: reads and writes
- Competition controller → Supabase database: reads and writes
- HR controller → Supabase database: reads
- HR controller → Evidence controller: uses evidence
- Competition controller → AI detection: checks submissions
- AI detection → Model service: requests prediction
- AI detection → Supabase database: saves detections
- Candidate evidence hub → Explainable insights: insight support
