# web-team-iiti-gymkhana/tpc-backend architecture

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

- Interactive diagram: https://gitdiagram.com/web-team-iiti-gymkhana/tpc-backend
- Repository: https://github.com/web-team-iiti-gymkhana/tpc-backend

## Overview

TPC Backend is a NestJS API for technical-placement operations. Users authenticate and then access role-specific workflows: students browse opportunities and manage applications, registrations, and resumes; recruiters manage jobs and provide feedback; placement staff administer seasons, companies, events, offers, and approvals. Controllers delegate to domain services, with Sequelize-backed models and shared services forming the internal data and integration layer. The README describes these architectural roles; source excerpts and the SOURCE INDEX support the shown controller-to-service calls. Several documented-by-tree capabilities are included, but their internal wiring was not sampled.

Main entry points: [`src/job/job.controller.ts`](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/job/job.controller.ts) (Jobs and exports), [`src/services/FileService.ts`](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/services/FileService.ts) (File service), [`src/student-view/students/student.controller.ts`](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/student-view/students/student.controller.ts) (Student portal), [`src/recruiter-view/recruiter-view.controller.ts`](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/recruiter-view/recruiter-view.controller.ts) (Recruiter portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["API and identity"]
  node_auth["Authentication<br/>[auth.controller.ts]"]
end

subgraph group_placement["Placement operations"]
  node_company["Companies"]
  node_program["Programs"]
  node_season["Seasons"]
  node_jobs["Jobs and exports<br/>[job.controller.ts]"]
  node_events["Events and applications"]
  node_offers["Offers<br/>[offer.service.ts]"]
  node_externalopp["External opportunities"]
  node_facultyapproval["Faculty approvals"]
  node_resumes["Resume management"]
  node_registrations["Season registrations"]
  node_salary["Salary data"]
  node_analytics["Analytics dashboard"]
end

subgraph group_portals["Role-based portals"]
  node_studentportal["Student portal"]
  node_studentdata["Student records<br/>[student.service.ts]"]
  node_recruiterportal["Recruiter portal"]
  node_recruiterdata["Recruiter workflows"]
  node_facultyportal["Faculty portal"]
  node_tpcportal["TPC member portal"]
  node_interviews["Interview experiences<br/>[ie.controller.ts]"]
end

subgraph group_data["Data and shared services"]
  node_storage[("Sequelize models<br/>[index.ts]")]
  node_files["File service<br/>[FileService.ts]"]
  node_email["Email service<br/>[EmailService.ts]"]
  node_ppo["PPO synchronization<br/>[PPOSyncService.ts]"]
end

node_client(("API clients"))

node_client -->|"sends requests"| node_auth
node_client -->|"sends requests"| node_company
node_client -->|"sends requests"| node_program
node_client -->|"sends requests"| node_season
node_client -->|"sends requests"| node_jobs
node_client -->|"sends requests"| node_events
node_client -->|"sends requests"| node_studentportal
node_client -->|"sends requests"| node_recruiterportal
node_company -->|"delegates to service"| node_company
node_program -->|"delegates to service"| node_program
node_season -->|"delegates to service"| node_season
node_jobs -->|"delegates to service"| node_jobs
node_jobs -->|"reads files"| node_files
node_events -->|"delegates to service"| node_events
node_externalopp -->|"delegates to service"| node_externalopp
node_facultyapproval -->|"delegates to service"| node_facultyapproval
node_studentportal -->|"delegates to"| node_studentdata
node_studentportal -->|"deletes files"| node_files
node_recruiterportal -->|"delegates to"| node_recruiterdata
node_recruiterportal -.->|"uploads files"| node_files
node_auth -->|"sends login email"| node_email
node_resumes -->|"uploads and deletes"| node_files
node_registrations -->|"delegates to service"| node_registrations
node_facultyportal -->|"delegates to service"| node_facultyportal
node_tpcportal -->|"delegates to service"| node_tpcportal
node_interviews -.->|"delegates to service"| node_interviews
node_salary -->|"delegates to service"| node_salary

click node_auth "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/auth/auth.controller.ts"
click node_company "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/company/company.controller.ts"
click node_program "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/program/program.controller.ts"
click node_season "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/season/season.controller.ts"
click node_jobs "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/job/job.controller.ts"
click node_events "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/event/event.controller.ts"
click node_offers "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/offers/offer.service.ts"
click node_externalopp "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/externalOpportunities/externalOpportunities.controller.ts"
click node_facultyapproval "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/facultyApproval/facultyApproval.controller.ts"
click node_studentportal "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/student-view/students/student.controller.ts"
click node_studentdata "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/student-view/students/student.service.ts"
click node_recruiterportal "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/recruiter-view/recruiter-view.controller.ts"
click node_recruiterdata "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/recruiter-view/recruiter-view.service.ts"
click node_facultyportal "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/faculty-view/faculty-view.controller.ts"
click node_tpcportal "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/tpc-member-view/tpc-member-view.service.ts"
click node_resumes "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/resume/resume.controller.ts"
click node_registrations "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/registrations/registrations.controller.ts"
click node_interviews "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/student-view/interview-experiences/ie.controller.ts"
click node_salary "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/salary/salary.controller.ts"
click node_storage "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/db/models/index.ts"
click node_files "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/services/FileService.ts"
click node_email "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/services/EmailService.ts"
click node_ppo "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/services/PPOSyncService.ts"
click node_analytics "https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/analytics-dashboard/analytics-dashboard.controller.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_auth,node_client toneBlue
class node_company,node_program,node_season,node_jobs,node_events,node_offers,node_externalopp,node_facultyapproval,node_resumes,node_registrations,node_salary,node_analytics toneAmber
class node_studentportal,node_studentdata,node_recruiterportal,node_recruiterdata,node_facultyportal,node_tpcportal,node_interviews toneMint
class node_storage,node_files,node_email,node_ppo toneRose
```

## Components

### API and identity

- [Authentication](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/auth/auth.controller.ts): `src/auth/auth.controller.ts`

### Placement operations

- [Companies](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/company/company.controller.ts): `src/company/company.controller.ts`
- [Programs](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/program/program.controller.ts): `src/program/program.controller.ts`
- [Seasons](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/season/season.controller.ts): `src/season/season.controller.ts`
- [Jobs and exports](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/job/job.controller.ts): `src/job/job.controller.ts`
- [Events and applications](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/event/event.controller.ts): `src/event/event.controller.ts`
- [Offers](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/offers/offer.service.ts): `src/offers/offer.service.ts`
- [External opportunities](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/externalOpportunities/externalOpportunities.controller.ts): `src/externalOpportunities/externalOpportunities.controller.ts`
- [Faculty approvals](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/facultyApproval/facultyApproval.controller.ts): `src/facultyApproval/facultyApproval.controller.ts`
- [Resume management](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/resume/resume.controller.ts): `src/resume/resume.controller.ts`
- [Season registrations](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/registrations/registrations.controller.ts): `src/registrations/registrations.controller.ts`
- [Salary data](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/salary/salary.controller.ts): `src/salary/salary.controller.ts`
- [Analytics dashboard](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/analytics-dashboard/analytics-dashboard.controller.ts): `src/analytics-dashboard/analytics-dashboard.controller.ts`

### Role-based portals

- [Student portal](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/student-view/students/student.controller.ts): `src/student-view/students/student.controller.ts`
- [Student records](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/student-view/students/student.service.ts): `src/student-view/students/student.service.ts`
- [Recruiter portal](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/recruiter-view/recruiter-view.controller.ts): `src/recruiter-view/recruiter-view.controller.ts`
- [Recruiter workflows](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/recruiter-view/recruiter-view.service.ts): `src/recruiter-view/recruiter-view.service.ts`
- [Faculty portal](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/faculty-view/faculty-view.controller.ts): `src/faculty-view/faculty-view.controller.ts`
- [TPC member portal](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/tpc-member-view/tpc-member-view.service.ts): `src/tpc-member-view/tpc-member-view.service.ts`
- [Interview experiences](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/student-view/interview-experiences/ie.controller.ts): `src/student-view/interview-experiences/ie.controller.ts`

### Data and shared services

- [Sequelize models](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/db/models/index.ts): `src/db/models/index.ts`
- [File service](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/services/FileService.ts): `src/services/FileService.ts`
- [Email service](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/services/EmailService.ts): `src/services/EmailService.ts`
- [PPO synchronization](https://github.com/web-team-iiti-gymkhana/tpc-backend/blob/develop/src/services/PPOSyncService.ts): `src/services/PPOSyncService.ts`

### Other components

- **API clients**

## Connections

- API clients → Authentication: sends requests
- API clients → Companies: sends requests
- API clients → Programs: sends requests
- API clients → Seasons: sends requests
- API clients → Jobs and exports: sends requests
- API clients → Events and applications: sends requests
- API clients → Student portal: sends requests
- API clients → Recruiter portal: sends requests
- Companies → Companies: delegates to service (evidence: `src/company/company.controller.ts`)
- Programs → Programs: delegates to service (evidence: `src/program/program.controller.ts`)
- Seasons → Seasons: delegates to service (evidence: `src/season/season.controller.ts`)
- Jobs and exports → Jobs and exports: delegates to service (evidence: `src/job/job.controller.ts`)
- Jobs and exports → File service: reads files (evidence: `src/job/job.controller.ts`)
- Events and applications → Events and applications: delegates to service (evidence: `src/event/event.controller.ts`)
- External opportunities → External opportunities: delegates to service (evidence: `src/externalOpportunities/externalOpportunities.controller.ts`)
- Faculty approvals → Faculty approvals: delegates to service (evidence: `src/facultyApproval/facultyApproval.controller.ts`)
- Student portal → Student records: delegates to (evidence: `src/student-view/students/student.controller.ts`)
- Student portal → File service: deletes files (evidence: `src/student-view/students/student.controller.ts`)
- Recruiter portal → Recruiter workflows: delegates to (evidence: `src/recruiter-view/recruiter-view.controller.ts`)
- Recruiter portal → File service: uploads files
- Authentication → Email service: sends login email (evidence: `src/auth/auth.controller.ts`)
- Resume management → File service: uploads and deletes (evidence: `src/resume/resume.controller.ts`)
- Season registrations → Season registrations: delegates to service (evidence: `src/registrations/registrations.controller.ts`)
- Faculty portal → Faculty portal: delegates to service (evidence: `src/faculty-view/faculty-view.controller.ts`)
- TPC member portal → TPC member portal: delegates to service (evidence: `src/tpc-member-view/tpc-member-view.controller.ts`)
- Interview experiences → Interview experiences: delegates to service
- Salary data → Salary data: delegates to service (evidence: `src/salary/salary.controller.ts`)
