# harshitcore/placement-buddy architecture

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

- Interactive diagram: https://gitdiagram.com/harshitcore/placement-buddy
- Repository: https://github.com/harshitcore/placement-buddy

## Overview

#### Purpose and Current Scope
Placement Buddy is a role-oriented placement-support platform for students, TPO staff, professors, and alumni. The implemented repository is primarily a React frontend prototype; backend directories are placeholders and the README labels the API and AI services as future work.

#### Application Entry and Client Runtime
Vite bootstraps the TypeScript/React client from `frontend/src/main.tsx`, which mounts the root application in `frontend/src/app.tsx`. Styling is split between global styles in `frontend/src/index.css`, application styles in `frontend/src/App.css`, and component-local CSS where present. The frontend runs through Vite, configured at `frontend/vite.config.ts`.

#### Routing and Access Boundary
Client-side routes are centralized in `frontend/src/routes/AppRoutes.tsx`. `frontend/src/routes/ProtectedRoute.tsx` is the intended route authorization boundary, while authentication state is provided through `frontend/src/context/AuthContext.tsx`. This establishes the core control flow: application bootstrap → auth context → route selection/protection → role-specific page.

#### Role-Specific Dashboards
Separate dashboard pages model the platform’s major user roles:
- Student: `frontend/src/pages/Student/StudentDashboard.tsx`
- TPO: `frontend/src/pages/TPO/TPODashboard.tsx`
- Professor: `frontend/src/pages/Professor/ProfessorDashboard.tsx`
- Alumni: `frontend/src/pages/Alumni/AlumniDashboard.tsx`

These pages are the primary feature-composition boundary and should receive role-specific data and actions from service/API layers rather than owning transport logic.

#### Shared Dashboard Shell and UI Layer
Authenticated experiences are structured by `frontend/src/components/layout/DashboardLayout.tsx`, with navigation and top-level controls in `frontend/src/components/layout/Sidebar.tsx` and `frontend/src/components/layout/Topbar.tsx`. Menu definitions reside in `frontend/src/constants/sidebarMenu.ts`. Reusable primitives under `frontend/src/components/layout/ui/` provide a common presentation layer for forms and dashboard modules.

#### Functional Feature Modules
Student placement workflows are represented as independent dashboard components: ATS/resume feedback in `frontend/src/components/dashboard/ATSScoreCard.tsx`, applications in `frontend/src/components/dashboard/AppliedCompanies.tsx`, company opportunities in `frontend/src/components/dashboard/CompanyOpportunities.tsx`, mentoring in `frontend/src/components/dashboard/MentorConnect.tsx`, and scheduling in `frontend/src/components/dashboard/PlacementCalendar.tsx`. Authentication forms are isolated under `frontend/src/components/auth/`.

#### Service, Backend, and Data Boundaries
The frontend defines client service seams in `frontend/src/services/authService.ts` and `frontend/src/services/dashboardService.ts`; these should become the sole browser-to-API transport boundary. The `backend/app/models`, `backend/app/routes`, and `backend/app/services` structure anticipates layered API implementation but currently contains no application code. The planned infrastructure is a Node.js/Express API plus Python FastAPI AI microservices, likely for ATS scoring. Persistent data design is anchored by `database/schema.sql`.

Main entry points: [`frontend/src/routes/AppRoutes.tsx`](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/routes/AppRoutes.tsx) (App Routes), [`frontend/src/app.tsx`](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/app.tsx) (Root App), [`frontend/src/components/layout/DashboardLayout.tsx`](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/components/layout/DashboardLayout.tsx) (Dashboard Shell), [`frontend/src/context/AuthContext.tsx`](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/context/AuthContext.tsx) (Auth Context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React Client"]
  node_vite{{"Vite Runtime<br/>build runtime<br/>[vite.config.ts]"}}
  node_main["Client Entry<br/>React bootstrap<br/>[main.tsx]"]
  node_app["Root App<br/>application root<br/>[app.tsx]"]
  node_dashboard_layout["Dashboard Shell<br/>shared layout"]
  node_navigation["Sidebar and Topbar<br/>navigation UI<br/>[Sidebar.tsx]"]
  node_shared_ui["Layout UI Primitives<br/>presentation components"]
  node_client_services["Client Services<br/>transport seam<br/>[authService.ts]"]
end

subgraph group_auth["Access Control"]
  node_auth_context["Auth Context<br/>auth state<br/>[AuthContext.tsx]"]
  node_routes["App Routes<br/>route registry<br/>[AppRoutes.tsx]"]
  node_protected_route["Protected Route<br/>authorization boundary<br/>[ProtectedRoute.tsx]"]
end

subgraph group_dashboards["Role Experiences"]
  node_student_dashboard["Student Dashboard<br/>role page"]
  node_tpo_dashboard["TPO Dashboard<br/>role page<br/>[TPODashboard.tsx]"]
  node_professor_dashboard["Professor Dashboard<br/>role page"]
  node_alumni_dashboard["Alumni Dashboard<br/>role page"]
  node_student_features["Student Placement Modules<br/>dashboard components<br/>[ATSScoreCard.tsx]"]
end

subgraph group_future["Planned Backend"]
  node_api{{"Express API<br/>planned API"}}
  node_ai_services{{"FastAPI AI Services<br/>planned microservices"}}
  node_database[("Database Schema<br/>persistent data design<br/>[schema.sql]")]
end

node_vite -->|"boots"| node_main
node_main -->|"mounts"| node_app
node_app -->|"provides state"| node_auth_context
node_app -->|"renders"| node_routes
node_routes -->|"guards routes"| node_protected_route
node_auth_context -->|"supplies auth"| node_protected_route
node_protected_route -->|"admits authenticated views"| node_dashboard_layout
node_dashboard_layout -->|"composes"| node_navigation
node_dashboard_layout -->|"uses"| node_shared_ui
node_routes -->|"selects by role"| node_student_dashboard
node_routes -->|"selects by role"| node_tpo_dashboard
node_routes -->|"selects by role"| node_professor_dashboard
node_routes -->|"selects by role"| node_alumni_dashboard
node_student_dashboard -->|"composes"| node_student_features
node_auth_context -->|"auth operations"| node_client_services
node_student_dashboard -.->|"data and actions"| node_client_services
node_client_services -.->|"future API calls"| node_api
node_api -.->|"delegates ATS scoring"| node_ai_services
node_api -.->|"persists data"| node_database

click node_vite "https://github.com/harshitcore/placement-buddy/blob/main/frontend/vite.config.ts"
click node_main "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/main.tsx"
click node_app "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/app.tsx"
click node_auth_context "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/context/AuthContext.tsx"
click node_routes "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/routes/AppRoutes.tsx"
click node_protected_route "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/routes/ProtectedRoute.tsx"
click node_dashboard_layout "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/components/layout/DashboardLayout.tsx"
click node_navigation "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/components/layout/Sidebar.tsx"
click node_student_dashboard "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/Student/StudentDashboard.tsx"
click node_tpo_dashboard "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/TPO/TPODashboard.tsx"
click node_professor_dashboard "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/Professor/ProfessorDashboard.tsx"
click node_alumni_dashboard "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/Alumni/AlumniDashboard.tsx"
click node_student_features "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/components/dashboard/ATSScoreCard.tsx"
click node_client_services "https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/services/authService.ts"
click node_api "https://github.com/harshitcore/placement-buddy/tree/main/backend/app/routes"
click node_database "https://github.com/harshitcore/placement-buddy/blob/main/database/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_vite,node_main,node_app,node_dashboard_layout,node_navigation,node_shared_ui,node_client_services toneBlue
class node_auth_context,node_routes,node_protected_route toneAmber
class node_student_dashboard,node_tpo_dashboard,node_professor_dashboard,node_alumni_dashboard,node_student_features toneMint
class node_api,node_ai_services,node_database toneRose
```

## Components

### React Client

Implemented Vite frontend prototype.

- [Vite Runtime](https://github.com/harshitcore/placement-buddy/blob/main/frontend/vite.config.ts): build runtime · `frontend/vite.config.ts`
- [Client Entry](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/main.tsx): React bootstrap · `frontend/src/main.tsx`
- [Root App](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/app.tsx): application root · `frontend/src/app.tsx`
- [Dashboard Shell](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/components/layout/DashboardLayout.tsx): shared layout · `frontend/src/components/layout/DashboardLayout.tsx`
- [Sidebar and Topbar](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/components/layout/Sidebar.tsx): navigation UI · Menu definitions are in the sidebar constants. · `frontend/src/components/layout/Sidebar.tsx`
- **Layout UI Primitives**: presentation components
- [Client Services](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/services/authService.ts): transport seam · Intended sole browser-to-API boundary. · `frontend/src/services/authService.ts`

### Access Control

- [Auth Context](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/context/AuthContext.tsx): auth state · Provides client authentication state. · `frontend/src/context/AuthContext.tsx`
- [App Routes](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/routes/AppRoutes.tsx): route registry · `frontend/src/routes/AppRoutes.tsx`
- [Protected Route](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/routes/ProtectedRoute.tsx): authorization boundary · `frontend/src/routes/ProtectedRoute.tsx`

### Role Experiences

- [Student Dashboard](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/Student/StudentDashboard.tsx): role page · `frontend/src/pages/Student/StudentDashboard.tsx`
- [TPO Dashboard](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/TPO/TPODashboard.tsx): role page · `frontend/src/pages/TPO/TPODashboard.tsx`
- [Professor Dashboard](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/Professor/ProfessorDashboard.tsx): role page · `frontend/src/pages/Professor/ProfessorDashboard.tsx`
- [Alumni Dashboard](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/pages/Alumni/AlumniDashboard.tsx): role page · `frontend/src/pages/Alumni/AlumniDashboard.tsx`
- [Student Placement Modules](https://github.com/harshitcore/placement-buddy/blob/main/frontend/src/components/dashboard/ATSScoreCard.tsx): dashboard components · ATS, applications, opportunities, mentoring, and calendar workflows. · `frontend/src/components/dashboard/ATSScoreCard.tsx`

### Planned Backend

Backend and AI services are future work.

- [Express API](https://github.com/harshitcore/placement-buddy/tree/main/backend/app/routes): planned API · Layered routes, services, and models are placeholders. · `backend/app/routes`
- **FastAPI AI Services**: planned microservices · Planned ATS scoring capability.
- [Database Schema](https://github.com/harshitcore/placement-buddy/blob/main/database/schema.sql): persistent data design · `database/schema.sql`

## Connections

- Vite Runtime → Client Entry: boots
- Client Entry → Root App: mounts
- Root App → Auth Context: provides state
- Root App → App Routes: renders
- App Routes → Protected Route: guards routes
- Auth Context → Protected Route: supplies auth
- Protected Route → Dashboard Shell: admits authenticated views
- Dashboard Shell → Sidebar and Topbar: composes
- Dashboard Shell → Layout UI Primitives: uses
- App Routes → Student Dashboard: selects by role
- App Routes → TPO Dashboard: selects by role
- App Routes → Professor Dashboard: selects by role
- App Routes → Alumni Dashboard: selects by role
- Student Dashboard → Student Placement Modules: composes
- Auth Context → Client Services: auth operations
- Student Dashboard → Client Services: data and actions
- Client Services → Express API: future API calls
- Express API → FastAPI AI Services: delegates ATS scoring
- Express API → Database Schema: persists data
