# byrohithreddy/i-r-o-n architecture

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

- Interactive diagram: https://gitdiagram.com/byrohithreddy/i-r-o-n
- Repository: https://github.com/byrohithreddy/i-r-o-n

## Overview

I.R.O.N. is a campus recruitment operations platform. Students discover drives and apply; TPO staff maintain student records and configure drives; coordinators batch candidates; HR evaluates rounds and final selections become placement records. The client uses a shared storage/API layer, with Cloudflare Pages and D1 documented as the production backend and a Node/SQLite server as the local runtime. Some workflow details and service connections are documented in the README but their implementation was not sampled, so those links are cited to the README.

Main entry points: [`src/services/storage.ts`](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/services/storage.ts) (Client data layer), [`src/App.tsx`](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/App.tsx) (Role-based app), [`src/components/hr/HrEvaluationView.tsx`](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/hr/HrEvaluationView.tsx) (HR evaluation), [`src/components/public/PublicHome.tsx`](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/public/PublicHome.tsx) (Public drive portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Role-based app<br/>[App.tsx]"]
  node_public["Public drive portal<br/>[PublicHome.tsx]"]
end

subgraph group_operations["Recruitment operations"]
  node_apply["Student applications"]
  node_master["Student master"]
  node_driveadmin["Drive configuration<br/>[TpoDrives.tsx]"]
  node_coordinator["Candidate batching"]
  node_hr["HR evaluation"]
end

subgraph group_insights["Reporting and lifecycle"]
  node_placement["Placement records"]
  node_analytics["Drive analytics"]
  node_expiry["Drive expiry archive<br/>[TpoDataExpiry.tsx]"]
  node_export["Spreadsheet export<br/>[excelExport.ts]"]
end

subgraph group_backend["API and persistence"]
  node_storage["Client data layer<br/>[storage.ts]"]
  node_api["API client<br/>[api.ts]"]
  node_edge["Pages API handler<br/>[&#91;&#91;route&#93;&#93;.ts]"]
  node_local["Local API server<br/>[server.ts]"]
  node_routes["API routes<br/>[routes.ts]"]
  node_db["Database access<br/>[db.ts]"]
  node_d1[("Cloudflare D1<br/>[schema.sql]")]
end

node_users(("Students and staff"))

node_users -->|"use"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_master
node_app -->|"routes to"| node_driveadmin
node_app -->|"routes to"| node_coordinator
node_app -->|"routes to"| node_hr
node_public -->|"opens"| node_apply
node_public -->|"reads drives"| node_storage
node_apply -->|"submits application"| node_storage
node_master -->|"manages records"| node_storage
node_driveadmin -->|"manages drives"| node_storage
node_coordinator -->|"manages batches"| node_storage
node_hr -->|"saves evaluations"| node_storage
node_placement -->|"reads placements"| node_storage
node_analytics -->|"reads metrics"| node_storage
node_analytics -->|"exports reports"| node_export
node_expiry -->|"archives drives"| node_storage
node_storage -->|"calls"| node_api
node_api -->|"requests"| node_edge
node_edge -->|"uses"| node_d1
node_local -->|"mounts"| node_routes
node_routes -->|"queries"| node_db
node_coordinator -->|"hands off candidates"| node_hr
node_hr -->|"records final selections"| node_placement

click node_app "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/App.tsx"
click node_public "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/public/PublicHome.tsx"
click node_apply "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/public/StudentApplyModal.tsx"
click node_master "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoStudentMaster.tsx"
click node_driveadmin "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoDrives.tsx"
click node_coordinator "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/coordinator/CoordinatorView.tsx"
click node_hr "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/hr/HrEvaluationView.tsx"
click node_placement "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoPlacedStudents.tsx"
click node_analytics "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoDriveAnalytics.tsx"
click node_expiry "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoDataExpiry.tsx"
click node_export "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/services/excelExport.ts"
click node_storage "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/services/storage.ts"
click node_api "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/services/api.ts"
click node_edge "https://github.com/byrohithreddy/i-r-o-n/blob/main/functions/api/%5B%5Broute%5D%5D.ts"
click node_local "https://github.com/byrohithreddy/i-r-o-n/blob/main/server.ts"
click node_routes "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/server/routes.ts"
click node_db "https://github.com/byrohithreddy/i-r-o-n/blob/main/src/server/db.ts"
click node_d1 "https://github.com/byrohithreddy/i-r-o-n/blob/main/schema.sql"

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_public toneBlue
class node_apply,node_master,node_driveadmin,node_coordinator,node_hr toneAmber
class node_placement,node_analytics,node_expiry,node_export toneMint
class node_storage,node_api,node_edge,node_local,node_routes,node_db,node_d1 toneRose
class node_users toneIndigo
```

## Components

### Web client

- [Role-based app](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/App.tsx): `src/App.tsx`
- [Public drive portal](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/public/PublicHome.tsx): `src/components/public/PublicHome.tsx`

### Recruitment operations

- [Student applications](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/public/StudentApplyModal.tsx): `src/components/public/StudentApplyModal.tsx`
- [Student master](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoStudentMaster.tsx): `src/components/tpo/TpoStudentMaster.tsx`
- [Drive configuration](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoDrives.tsx): `src/components/tpo/TpoDrives.tsx`
- [Candidate batching](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/coordinator/CoordinatorView.tsx): `src/components/coordinator/CoordinatorView.tsx`
- [HR evaluation](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/hr/HrEvaluationView.tsx): `src/components/hr/HrEvaluationView.tsx`

### Reporting and lifecycle

- [Placement records](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoPlacedStudents.tsx): `src/components/tpo/TpoPlacedStudents.tsx`
- [Drive analytics](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoDriveAnalytics.tsx): `src/components/tpo/TpoDriveAnalytics.tsx`
- [Drive expiry archive](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/components/tpo/TpoDataExpiry.tsx): `src/components/tpo/TpoDataExpiry.tsx`
- [Spreadsheet export](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/services/excelExport.ts): `src/services/excelExport.ts`

### API and persistence

- [Client data layer](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [API client](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/services/api.ts): `src/services/api.ts`
- [Pages API handler](https://github.com/byrohithreddy/i-r-o-n/blob/main/functions/api/%5B%5Broute%5D%5D.ts): `functions/api/[[route]].ts`
- [Local API server](https://github.com/byrohithreddy/i-r-o-n/blob/main/server.ts): `server.ts`
- [API routes](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/server/routes.ts): `src/server/routes.ts`
- [Database access](https://github.com/byrohithreddy/i-r-o-n/blob/main/src/server/db.ts): `src/server/db.ts`
- [Cloudflare D1](https://github.com/byrohithreddy/i-r-o-n/blob/main/schema.sql): `schema.sql`

### Other components

- **Students and staff**

## Connections

- Students and staff → Role-based app: use (evidence: `README.md`)
- Role-based app → Public drive portal: routes to (evidence: `src/App.tsx`)
- Role-based app → Student master: routes to (evidence: `src/App.tsx`)
- Role-based app → Drive configuration: routes to (evidence: `src/App.tsx`)
- Role-based app → Candidate batching: routes to (evidence: `src/App.tsx`)
- Role-based app → HR evaluation: routes to (evidence: `src/App.tsx`)
- Public drive portal → Student applications: opens (evidence: `src/components/public/PublicHome.tsx`)
- Public drive portal → Client data layer: reads drives (evidence: `src/components/public/PublicHome.tsx`)
- Student applications → Client data layer: submits application (evidence: `src/components/public/StudentApplyModal.tsx`)
- Student master → Client data layer: manages records (evidence: `src/components/tpo/TpoStudentMaster.tsx`)
- Drive configuration → Client data layer: manages drives (evidence: `src/components/tpo/TpoDrives.tsx`)
- Candidate batching → Client data layer: manages batches (evidence: `src/components/coordinator/CoordinatorView.tsx`)
- HR evaluation → Client data layer: saves evaluations (evidence: `src/components/hr/HrEvaluationView.tsx`)
- Placement records → Client data layer: reads placements (evidence: `src/components/tpo/TpoPlacedStudents.tsx`)
- Drive analytics → Client data layer: reads metrics (evidence: `src/components/tpo/TpoDriveAnalytics.tsx`)
- Drive analytics → Spreadsheet export: exports reports (evidence: `src/components/tpo/TpoDriveAnalytics.tsx`)
- Drive expiry archive → Client data layer: archives drives (evidence: `src/components/tpo/TpoDataExpiry.tsx`)
- Client data layer → API client: calls (evidence: `src/services/storage.ts`)
- API client → Pages API handler: requests (evidence: `README.md`)
- Pages API handler → Cloudflare D1: uses (evidence: `README.md`)
- Local API server → API routes: mounts (evidence: `server.ts`)
- API routes → Database access: queries (evidence: `src/server/routes.ts`)
- Candidate batching → HR evaluation: hands off candidates (evidence: `README.md`)
- HR evaluation → Placement records: records final selections (evidence: `README.md`)
