# gavali197/pcw_application architecture

> Architecture diagram of the GitHub repository gavali197/pcw_application, 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/gavali197/pcw_application
- Repository: https://github.com/gavali197/pcw_application

## Overview

The repository appears intended as a placement-cell application: its backend has student/committee authentication and data models for companies, job drives, student profiles, applications, audit logs, and notifications. The checked-in frontend is still a Vite starter screen, and the server does not mount the user routes (their mount is commented out). The graph separates implemented auth/runtime wiring from modeled placement domains; unsampled models are included by their indexed paths, without assuming operational workflows.

Main entry points: [`PCW_Application/Server/models/JobDrive.js`](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/JobDrive.js) (Job drives), [`PCW_Application/Server/models/User.js`](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/User.js) (User accounts), [`PCW_Application/Server/models/Application.js`](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/Application.js) (Applications), [`PCW_Application/Server/controllers/UserController.js`](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/controllers/UserController.js) (User controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Frontend"]
  node_app["Starter screen<br/>[App.jsx]"]
  node_mount["React entry<br/>[main.jsx]"]
end

subgraph group_api["Server and auth"]
  node_server["Express server<br/>[Index.js]"]
  node_user_routes["User routes<br/>[UserRoute.js]"]
  node_user_controller["User controller<br/>[UserController.js]"]
  node_auth_middleware["Token and roles<br/>[authMiddleware.js]"]
end

subgraph group_placement["Placement data"]
  node_user_model["User accounts<br/>[User.js]"]
  node_application_model["Applications<br/>[Application.js]"]
  node_drive_model["Job drives<br/>[JobDrive.js]"]
  node_company_model["Companies<br/>[Company.js]"]
  node_profile_model["Student profiles<br/>[StudentProfile.js]"]
  node_audit_model["Audit logs<br/>[AuditLog.js]"]
  node_notification_model["Notifications<br/>[Notification.js]"]
end

subgraph group_storage["Database"]
  node_db_helper["DB connector<br/>[Db.js]"]
  node_mongodb[("MongoDB")]
end

node_browser(("Browser user"))

node_browser -.->|"views"| node_app
node_mount -->|"renders"| node_app
node_user_routes -->|"dispatches"| node_user_controller
node_user_controller -->|"queries and creates"| node_user_model
node_auth_middleware -->|"loads user"| node_user_model
node_server -->|"connects via"| node_db_helper
node_db_helper -->|"connects"| node_mongodb
node_application_model -->|"references drive"| node_drive_model
node_application_model -->|"references profile"| node_profile_model
node_drive_model -->|"references creator"| node_user_model
node_drive_model -->|"references company"| node_company_model

click node_app "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Frontend/src/App.jsx"
click node_mount "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Frontend/src/main.jsx"
click node_server "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/Index.js"
click node_user_routes "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/routes/UserRoute.js"
click node_user_controller "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/controllers/UserController.js"
click node_auth_middleware "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/Middleware/authMiddleware.js"
click node_user_model "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/User.js"
click node_application_model "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/Application.js"
click node_drive_model "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/JobDrive.js"
click node_company_model "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/Company.js"
click node_profile_model "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/StudentProfile.js"
click node_audit_model "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/AuditLog.js"
click node_notification_model "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/Notification.js"
click node_db_helper "https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/utils/Db.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_mount,node_browser toneBlue
class node_server,node_user_routes,node_user_controller,node_auth_middleware toneAmber
class node_user_model,node_application_model,node_drive_model,node_company_model,node_profile_model,node_audit_model,node_notification_model toneMint
class node_db_helper,node_mongodb toneRose
```

## Components

### Frontend

- [Starter screen](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Frontend/src/App.jsx): `PCW_Application/Frontend/src/App.jsx`
- [React entry](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Frontend/src/main.jsx): `PCW_Application/Frontend/src/main.jsx`

### Server and auth

- [Express server](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/Index.js): `PCW_Application/Server/Index.js`
- [User routes](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/routes/UserRoute.js): `PCW_Application/Server/routes/UserRoute.js`
- [User controller](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/controllers/UserController.js): `PCW_Application/Server/controllers/UserController.js`
- [Token and roles](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/Middleware/authMiddleware.js): `PCW_Application/Server/Middleware/authMiddleware.js`

### Placement data

- [User accounts](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/User.js): `PCW_Application/Server/models/User.js`
- [Applications](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/Application.js): `PCW_Application/Server/models/Application.js`
- [Job drives](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/JobDrive.js): `PCW_Application/Server/models/JobDrive.js`
- [Companies](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/Company.js): `PCW_Application/Server/models/Company.js`
- [Student profiles](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/StudentProfile.js): `PCW_Application/Server/models/StudentProfile.js`
- [Audit logs](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/AuditLog.js): `PCW_Application/Server/models/AuditLog.js`
- [Notifications](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/models/Notification.js): `PCW_Application/Server/models/Notification.js`

### Database

- [DB connector](https://github.com/gavali197/pcw_application/blob/master/PCW_Application/Server/utils/Db.js): `PCW_Application/Server/utils/Db.js`
- **MongoDB**

### Other components

- **Browser user**

## Connections

- Browser user → Starter screen: views
- React entry → Starter screen: renders (evidence: `PCW_Application/Frontend/src/main.jsx`)
- User routes → User controller: dispatches (evidence: `PCW_Application/Server/routes/UserRoute.js`)
- User controller → User accounts: queries and creates (evidence: `PCW_Application/Server/controllers/UserController.js`)
- Token and roles → User accounts: loads user (evidence: `PCW_Application/Server/Middleware/authMiddleware.js`)
- Express server → DB connector: connects via (evidence: `PCW_Application/Server/Index.js`)
- DB connector → MongoDB: connects (evidence: `PCW_Application/Server/utils/Db.js`)
- Applications → Job drives: references drive (evidence: `PCW_Application/Server/models/Application.js`)
- Applications → Student profiles: references profile (evidence: `PCW_Application/Server/models/Application.js`)
- Job drives → User accounts: references creator (evidence: `PCW_Application/Server/models/JobDrive.js`)
- Job drives → Companies: references company (evidence: `PCW_Application/Server/models/JobDrive.js`)
