# rohit-48566/smart-placements-assistance architecture

> Architecture diagram of the GitHub repository rohit-48566/smart-placements-assistance, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rohit-48566/smart-placements-assistance
- Repository: https://github.com/rohit-48566/smart-placements-assistance

## Overview

Smart Placement Assistance serves students with company and placement information through analytics pages and an AI chatbot, while administrators maintain placement, company-statistics, and insights data. The frontend routes users to these features and communicates with a FastAPI backend; backend handlers delegate to domain services, which use ChromaDB and, for chatbot answers, embedding/NLP and an Ollama model. The chatbot and controller paths are supported by sampled source; frontend API wiring and several service implementations were not sampled, so those connections are shown only at the supported module boundary.

Main entry points: [`backend/services/chatbot_service.py`](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/chatbot_service.py) (Chatbot answering), [`backend/routes/user_routes.py`](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/routes/user_routes.py) (User routes), [`frontend/src/App.js`](https://github.com/rohit-48566/smart-placements-assistance/blob/main/frontend/src/App.js) (Frontend router), [`backend/app.py`](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/app.py) (FastAPI app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Student and admin UI"]
  node_appui["Frontend router<br/>[App.js]"]
  node_studentpages["Student pages"]
  node_adminpages["Admin pages"]
  node_frontendapi["API client<br/>[api.js]"]
end

subgraph group_api["Backend API"]
  node_fastapi["FastAPI app<br/>[app.py]"]
  node_useroutes["User routes<br/>[user_routes.py]"]
  node_authroutes["Auth routes<br/>[auth_routes.py]"]
  node_chatcontroller["Chatbot handler"]
  node_dashcontroller["Dashboard handler"]
  node_insightcontroller["Insights handler"]
  node_authcontroller["Login handler<br/>[auth_controller.py]"]
end

subgraph group_services["Domain services"]
  node_chatservice["Chatbot answering<br/>[chatbot_service.py]"]
  node_dashservice["Dashboard data"]
  node_insightservice["Company insights"]
  node_authservice["Token creation<br/>[auth_service.py]"]
end

subgraph group_data["Data and AI"]
  node_chromadb[("ChromaDB collections<br/>[database.py]")]
  node_embedding["Embedding model<br/>[embedding_model.py]"]
  node_nlp["Entity extraction<br/>[nlp.py]"]
  node_cache["Response cache<br/>[cache.py]"]
end

node_student(("Student"))
node_admin(("Administrator"))
node_ollama["Ollama model"]

node_student -->|"uses"| node_appui
node_admin -->|"uses"| node_appui
node_appui -->|"routes to"| node_studentpages
node_appui -->|"routes to"| node_adminpages
node_studentpages -->|"requests data"| node_frontendapi
node_adminpages -->|"manages data"| node_frontendapi
node_frontendapi -->|"calls API"| node_fastapi
node_fastapi -->|"mounts"| node_useroutes
node_fastapi -->|"mounts"| node_authroutes
node_useroutes -->|"mounts"| node_chatcontroller
node_useroutes -->|"mounts"| node_dashcontroller
node_useroutes -->|"mounts"| node_insightcontroller
node_chatcontroller -->|"calls"| node_chatservice
node_dashcontroller -->|"calls"| node_dashservice
node_insightcontroller -->|"calls"| node_insightservice
node_authroutes -->|"mounts"| node_authcontroller
node_authcontroller -->|"creates token"| node_authservice
node_chatservice -->|"queries collections"| node_chromadb
node_chatservice -->|"encodes query"| node_embedding
node_chatservice -->|"extracts entities"| node_nlp
node_chatservice -->|"checks and sets"| node_cache
node_chatservice -->|"sends prompt"| node_ollama
node_dashservice -->|"accesses collections"| node_chromadb
node_insightservice -->|"accesses collections"| node_chromadb

click node_appui "https://github.com/rohit-48566/smart-placements-assistance/blob/main/frontend/src/App.js"
click node_studentpages "https://github.com/rohit-48566/smart-placements-assistance/tree/main/frontend/src/pages"
click node_adminpages "https://github.com/rohit-48566/smart-placements-assistance/tree/main/frontend/src/pages/admin"
click node_frontendapi "https://github.com/rohit-48566/smart-placements-assistance/blob/main/frontend/src/services/api.js"
click node_fastapi "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/app.py"
click node_useroutes "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/routes/user_routes.py"
click node_authroutes "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/routes/auth_routes.py"
click node_chatcontroller "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/chatbot_controller.py"
click node_dashcontroller "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/dashboard_controller.py"
click node_insightcontroller "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/company_insights_controller.py"
click node_authcontroller "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/auth_controller.py"
click node_chatservice "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/chatbot_service.py"
click node_dashservice "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/dashboard_service.py"
click node_insightservice "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/company_insights_service.py"
click node_authservice "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/auth_service.py"
click node_chromadb "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/database.py"
click node_embedding "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/utils/embedding_model.py"
click node_nlp "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/utils/nlp.py"
click node_cache "https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/utils/cache.py"

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_appui,node_studentpages,node_adminpages,node_frontendapi toneBlue
class node_fastapi,node_useroutes,node_authroutes,node_chatcontroller,node_dashcontroller,node_insightcontroller,node_authcontroller toneAmber
class node_chatservice,node_dashservice,node_insightservice,node_authservice toneMint
class node_chromadb,node_embedding,node_nlp,node_cache toneRose
class node_student,node_admin,node_ollama toneIndigo
```

## Components

### Student and admin UI

- [Frontend router](https://github.com/rohit-48566/smart-placements-assistance/blob/main/frontend/src/App.js): `frontend/src/App.js`
- [Student pages](https://github.com/rohit-48566/smart-placements-assistance/tree/main/frontend/src/pages): `frontend/src/pages`
- [Admin pages](https://github.com/rohit-48566/smart-placements-assistance/tree/main/frontend/src/pages/admin): `frontend/src/pages/admin`
- [API client](https://github.com/rohit-48566/smart-placements-assistance/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Backend API

- [FastAPI app](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/app.py): `backend/app.py`
- [User routes](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/routes/user_routes.py): `backend/routes/user_routes.py`
- [Auth routes](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/routes/auth_routes.py): `backend/routes/auth_routes.py`
- [Chatbot handler](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/chatbot_controller.py): `backend/controllers/chatbot_controller.py`
- [Dashboard handler](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/dashboard_controller.py): `backend/controllers/dashboard_controller.py`
- [Insights handler](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/company_insights_controller.py): `backend/controllers/company_insights_controller.py`
- [Login handler](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/controllers/auth_controller.py): `backend/controllers/auth_controller.py`

### Domain services

- [Chatbot answering](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/chatbot_service.py): `backend/services/chatbot_service.py`
- [Dashboard data](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/dashboard_service.py): `backend/services/dashboard_service.py`
- [Company insights](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/company_insights_service.py): `backend/services/company_insights_service.py`
- [Token creation](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/services/auth_service.py): `backend/services/auth_service.py`

### Data and AI

- [ChromaDB collections](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/database.py): `backend/database.py`
- [Embedding model](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/utils/embedding_model.py): `backend/utils/embedding_model.py`
- [Entity extraction](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/utils/nlp.py): `backend/utils/nlp.py`
- [Response cache](https://github.com/rohit-48566/smart-placements-assistance/blob/main/backend/utils/cache.py): `backend/utils/cache.py`

### Other components

- **Student**
- **Administrator**
- **Ollama model**

## Connections

- Student → Frontend router: uses
- Administrator → Frontend router: uses
- Frontend router → Student pages: routes to
- Frontend router → Admin pages: routes to
- Student pages → API client: requests data
- Admin pages → API client: manages data
- API client → FastAPI app: calls API
- FastAPI app → User routes: mounts
- FastAPI app → Auth routes: mounts
- User routes → Chatbot handler: mounts
- User routes → Dashboard handler: mounts
- User routes → Insights handler: mounts
- Chatbot handler → Chatbot answering: calls
- Dashboard handler → Dashboard data: calls
- Insights handler → Company insights: calls
- Auth routes → Login handler: mounts
- Login handler → Token creation: creates token
- Chatbot answering → ChromaDB collections: queries collections
- Chatbot answering → Embedding model: encodes query
- Chatbot answering → Entity extraction: extracts entities
- Chatbot answering → Response cache: checks and sets
- Chatbot answering → Ollama model: sends prompt
- Dashboard data → ChromaDB collections: accesses collections
- Company insights → ChromaDB collections: accesses collections
