# vishesh-0406/sarathi architecture

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

- Interactive diagram: https://gitdiagram.com/vishesh-0406/sarathi
- Repository: https://github.com/vishesh-0406/sarathi

## Overview

Sarathi is a campus-placement preparation platform: students browse company-specific DSA, aptitude, and interview material, practice or take assessments, and track preparation; the backend supplies questions, runs code, and stores user progress. Its content pipeline gathers candidate recollections, matches canonical problems, and maintains question banks. The graph reflects documented features and source-index references; several frontend components and ingestion collectors were not excerpted, so their internal calls are not asserted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/App.jsx) (Application shell), [`backend/server.js`](https://github.com/vishesh-0406/sarathi/blob/main/backend/server.js) (HTTP API server), [`backend/controllers/mockTestController.js`](https://github.com/vishesh-0406/sarathi/blob/main/backend/controllers/mockTestController.js) (Mock assessments), [`data/processors/experienceParser.js`](https://github.com/vishesh-0406/sarathi/blob/main/data/processors/experienceParser.js) (Experience parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Student experience"]
  node_app["Application shell<br/>[App.jsx]"]
  node_authui["Authentication UI<br/>[AuthModal.jsx]"]
  node_authctx["Authentication state<br/>[AuthContext.jsx]"]
end

subgraph group_practice["Preparation areas"]
  node_dsa["DSA arena<br/>[DSA.jsx]"]
  node_ide["Code workspace<br/>[IDE.jsx]"]
  node_aptitude["Aptitude arena<br/>[Aptitude.jsx]"]
  node_interviews["Interview navigator<br/>[Interviews.jsx]"]
  node_companies["Company directory<br/>[Companies.jsx]"]
  node_roadmap["Preparation roadmap<br/>[Roadmap.jsx]"]
  node_tracker["Progress tracker<br/>[Tracker.jsx]"]
end

subgraph group_services["Platform services"]
  node_backend["HTTP API server<br/>[server.js]"]
  node_auth["Accounts and profiles<br/>[authController.js]"]
  node_mock["Mock assessments"]
  node_execution["Code execution"]
  node_readiness["Readiness analysis"]
  node_userstore[("User records<br/>[User.js]")]
end

subgraph group_content["Question intelligence"]
  node_questions[("Question records<br/>[Question.js]")]
  node_pipeline["Hiring-cycle sync"]
end

subgraph group_ingestion["Content pipeline"]
  node_parser["Experience parser"]
  node_collectors["Experience collectors"]
  node_matcher["LeetCode matching<br/>[leetcodeMatcher.js]"]
  node_banks["Company question banks"]
  node_templates["Test-case templates"]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"opens"| node_dsa
node_app -->|"opens"| node_ide
node_app -->|"renders"| node_authui
node_app -->|"renders"| node_aptitude
node_app -->|"renders"| node_interviews
node_app -->|"renders"| node_companies
node_app -->|"renders"| node_roadmap
node_app -->|"renders"| node_tracker
node_authui -->|"uses"| node_authctx
node_authctx -->|"requests auth"| node_backend
node_backend -->|"routes auth"| node_auth
node_backend -->|"routes assessments"| node_mock
node_auth -->|"reads/writes"| node_userstore
node_mock -->|"selects questions"| node_questions
node_mock -->|"records results"| node_userstore
node_mock -->|"executes submissions"| node_execution
node_readiness -->|"analyzes"| node_questions
node_backend -->|"starts scheduler"| node_pipeline
node_pipeline -->|"syncs records"| node_questions
node_collectors -.->|"provides experiences"| node_parser
node_parser -->|"matches problems"| node_matcher
node_parser -->|"uses templates"| node_templates
node_parser -.->|"builds content"| node_banks
node_student -->|"prepares with"| node_banks

click node_app "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/AuthModal.jsx"
click node_authctx "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/context/AuthContext.jsx"
click node_dsa "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/DSA.jsx"
click node_ide "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/IDE.jsx"
click node_aptitude "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Aptitude.jsx"
click node_interviews "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Interviews.jsx"
click node_companies "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Companies.jsx"
click node_roadmap "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Roadmap.jsx"
click node_tracker "https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Tracker.jsx"
click node_backend "https://github.com/vishesh-0406/sarathi/blob/main/backend/server.js"
click node_auth "https://github.com/vishesh-0406/sarathi/blob/main/backend/controllers/authController.js"
click node_mock "https://github.com/vishesh-0406/sarathi/blob/main/backend/controllers/mockTestController.js"
click node_execution "https://github.com/vishesh-0406/sarathi/blob/main/backend/services/codeExecutionService.js"
click node_readiness "https://github.com/vishesh-0406/sarathi/blob/main/backend/services/aiReadinessService.js"
click node_userstore "https://github.com/vishesh-0406/sarathi/blob/main/backend/models/User.js"
click node_questions "https://github.com/vishesh-0406/sarathi/blob/main/backend/models/Question.js"
click node_pipeline "https://github.com/vishesh-0406/sarathi/blob/main/backend/services/pipelineSyncService.js"
click node_parser "https://github.com/vishesh-0406/sarathi/blob/main/data/processors/experienceParser.js"
click node_collectors "https://github.com/vishesh-0406/sarathi/tree/main/data/raw"
click node_matcher "https://github.com/vishesh-0406/sarathi/blob/main/data/matchers/leetcodeMatcher.js"
click node_banks "https://github.com/vishesh-0406/sarathi/tree/main/data/banks"
click node_templates "https://github.com/vishesh-0406/sarathi/blob/main/data/banks/testCaseTemplates.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_authui,node_authctx toneBlue
class node_dsa,node_ide,node_aptitude,node_interviews,node_companies,node_roadmap,node_tracker toneAmber
class node_backend,node_auth,node_mock,node_execution,node_readiness,node_userstore toneMint
class node_questions,node_pipeline toneRose
class node_parser,node_collectors,node_matcher,node_banks,node_templates,node_student toneIndigo
```

## Components

### Student experience

- [Application shell](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Authentication UI](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/AuthModal.jsx): `frontend/src/components/AuthModal.jsx`
- [Authentication state](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`

### Preparation areas

- [DSA arena](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/DSA.jsx): `frontend/src/components/DSA.jsx`
- [Code workspace](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/IDE.jsx): `frontend/src/components/IDE.jsx`
- [Aptitude arena](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Aptitude.jsx): `frontend/src/components/Aptitude.jsx`
- [Interview navigator](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Interviews.jsx): `frontend/src/components/Interviews.jsx`
- [Company directory](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Companies.jsx): `frontend/src/components/Companies.jsx`
- [Preparation roadmap](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Roadmap.jsx): `frontend/src/components/Roadmap.jsx`
- [Progress tracker](https://github.com/vishesh-0406/sarathi/blob/main/frontend/src/components/Tracker.jsx): `frontend/src/components/Tracker.jsx`

### Platform services

- [HTTP API server](https://github.com/vishesh-0406/sarathi/blob/main/backend/server.js): `backend/server.js`
- [Accounts and profiles](https://github.com/vishesh-0406/sarathi/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Mock assessments](https://github.com/vishesh-0406/sarathi/blob/main/backend/controllers/mockTestController.js): `backend/controllers/mockTestController.js`
- [Code execution](https://github.com/vishesh-0406/sarathi/blob/main/backend/services/codeExecutionService.js): `backend/services/codeExecutionService.js`
- [Readiness analysis](https://github.com/vishesh-0406/sarathi/blob/main/backend/services/aiReadinessService.js): `backend/services/aiReadinessService.js`
- [User records](https://github.com/vishesh-0406/sarathi/blob/main/backend/models/User.js): `backend/models/User.js`

### Question intelligence

- [Question records](https://github.com/vishesh-0406/sarathi/blob/main/backend/models/Question.js): `backend/models/Question.js`
- [Hiring-cycle sync](https://github.com/vishesh-0406/sarathi/blob/main/backend/services/pipelineSyncService.js): `backend/services/pipelineSyncService.js`

### Content pipeline

- [Experience parser](https://github.com/vishesh-0406/sarathi/blob/main/data/processors/experienceParser.js): `data/processors/experienceParser.js`
- [Experience collectors](https://github.com/vishesh-0406/sarathi/tree/main/data/raw): `data/raw`
- [LeetCode matching](https://github.com/vishesh-0406/sarathi/blob/main/data/matchers/leetcodeMatcher.js): `data/matchers/leetcodeMatcher.js`
- [Company question banks](https://github.com/vishesh-0406/sarathi/tree/main/data/banks): `data/banks`
- [Test-case templates](https://github.com/vishesh-0406/sarathi/blob/main/data/banks/testCaseTemplates.js): `data/banks/testCaseTemplates.js`

### Other components

- **Student**

## Connections

- Student → Application shell: uses (evidence: `README.md`)
- Application shell → DSA arena: opens (evidence: `frontend/src/App.jsx`)
- Application shell → Code workspace: opens (evidence: `frontend/src/App.jsx`)
- Application shell → Authentication UI: renders (evidence: `frontend/src/App.jsx`)
- Application shell → Aptitude arena: renders (evidence: `frontend/src/App.jsx`)
- Application shell → Interview navigator: renders (evidence: `frontend/src/App.jsx`)
- Application shell → Company directory: renders (evidence: `frontend/src/App.jsx`)
- Application shell → Preparation roadmap: renders (evidence: `frontend/src/App.jsx`)
- Application shell → Progress tracker: renders (evidence: `frontend/src/App.jsx`)
- Authentication UI → Authentication state: uses (evidence: `frontend/src/components/AuthModal.jsx`)
- Authentication state → HTTP API server: requests auth (evidence: `frontend/src/context/AuthContext.jsx`)
- HTTP API server → Accounts and profiles: routes auth (evidence: `backend/server.js`)
- HTTP API server → Mock assessments: routes assessments (evidence: `backend/server.js`)
- Accounts and profiles → User records: reads/writes (evidence: `backend/controllers/authController.js`)
- Mock assessments → Question records: selects questions (evidence: `backend/controllers/mockTestController.js`)
- Mock assessments → User records: records results (evidence: `backend/controllers/mockTestController.js`)
- Mock assessments → Code execution: executes submissions (evidence: `backend/controllers/mockTestController.js`)
- Readiness analysis → Question records: analyzes (evidence: `backend/services/aiReadinessService.js`)
- HTTP API server → Hiring-cycle sync: starts scheduler (evidence: `backend/server.js`)
- Hiring-cycle sync → Question records: syncs records (evidence: `backend/services/pipelineSyncService.js`)
- Experience collectors → Experience parser: provides experiences (evidence: `README.md`)
- Experience parser → LeetCode matching: matches problems (evidence: `data/processors/experienceParser.js`)
- Experience parser → Test-case templates: uses templates (evidence: `data/processors/experienceParser.js`)
- Experience parser → Company question banks: builds content (evidence: `data/processors/experienceParser.js`)
- Student → Company question banks: prepares with (evidence: `README.md`)
