# ranganamukunda19-dot/campuscare. architecture

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

- Interactive diagram: https://gitdiagram.com/ranganamukunda19-dot/campuscare.
- Repository: https://github.com/ranganamukunda19-dot/campuscare.

## Overview

CampusCare is a hostel-management web application. A user works through the React interface, which calls the FastAPI backend for hostel records and dashboard information; the backend serves domain APIs backed by relational storage. Separate branches provide attendance prediction, in-memory task scheduling, and ETL exports. The excerpts show frontend API calls, backend database access, and ETL/model handoffs; other domain routes and UI capabilities are included from the README, not independently inspected in source.

Main entry points: [`backend/main.py`](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py) (FastAPI backend), [`backend/etl/pipeline.py`](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/pipeline.py) (ETL pipeline), [`frontend/src/App.jsx`](https://github.com/ranganamukunda19-dot/campuscare./blob/main/frontend/src/App.jsx) (CampusCare UI), [`backend/etl/extract.py`](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/extract.py) (Data extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_react["CampusCare UI<br/>[App.jsx]"]
end

subgraph group_api["Hostel APIs"]
  node_api_main["FastAPI backend<br/>[main.py]"]
  node_students["Student management<br/>[main.py]"]
  node_rooms["Room management<br/>[main.py]"]
  node_allocations["Room allocation<br/>[main.py]"]
  node_attendance["Mess attendance<br/>[main.py]"]
  node_complaints["Complaint management<br/>[main.py]"]
  node_dashboard["Dashboard<br/>[main.py]"]
end

subgraph group_data["Data processing"]
  node_database[("Relational database<br/>[database.py]")]
  node_etl_pipeline["ETL pipeline<br/>[pipeline.py]"]
  node_etl_extract["Data extraction<br/>[extract.py]"]
  node_etl_transform["Data transformation<br/>[transform.py]"]
  node_etl_load["CSV export<br/>[load.py]"]
  node_csv_data["Processed CSV files<br/>[load.py]"]
end

subgraph group_extensions["Extensions"]
  node_ml_api["Attendance prediction API<br/>[main.py]"]
  node_ml_model["Attendance model"]
  node_scheduler_api["Scheduling API<br/>[main.py]"]
  node_scheduler["In-memory task scheduler<br/>[scheduler.py]"]
end

node_user(("Hostel user"))

node_user -->|"uses"| node_react
node_react -->|"calls API"| node_api_main
node_api_main -->|"routes requests"| node_students
node_api_main -->|"routes requests"| node_rooms
node_api_main -->|"routes requests"| node_allocations
node_api_main -->|"routes requests"| node_attendance
node_api_main -->|"routes requests"| node_complaints
node_api_main -->|"routes requests"| node_dashboard
node_api_main -->|"queries and updates"| node_database
node_etl_pipeline -->|"calls extraction"| node_etl_extract
node_etl_pipeline -->|"calls transformation"| node_etl_transform
node_etl_pipeline -->|"calls loading"| node_etl_load
node_etl_extract -->|"reads tables"| node_database
node_etl_load -->|"writes CSV"| node_csv_data
node_ml_model -->|"reads attendance CSV"| node_csv_data
node_api_main -->|"routes prediction"| node_ml_api
node_ml_api -->|"calls prediction"| node_ml_model
node_api_main -->|"routes tasks"| node_scheduler_api
node_scheduler_api -->|"delegates tasks"| node_scheduler

click node_react "https://github.com/ranganamukunda19-dot/campuscare./blob/main/frontend/src/App.jsx"
click node_api_main "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_students "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_rooms "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_allocations "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_attendance "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_complaints "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_dashboard "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_database "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/db/database.py"
click node_etl_pipeline "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/pipeline.py"
click node_etl_extract "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/extract.py"
click node_etl_transform "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/transform.py"
click node_etl_load "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/load.py"
click node_csv_data "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/load.py"
click node_ml_api "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_ml_model "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/ml/attendance_model.py"
click node_scheduler_api "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py"
click node_scheduler "https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/scheduling/scheduler.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_react,node_user toneBlue
class node_api_main,node_students,node_rooms,node_allocations,node_attendance,node_complaints,node_dashboard toneAmber
class node_database,node_etl_pipeline,node_etl_extract,node_etl_transform,node_etl_load,node_csv_data toneMint
class node_ml_api,node_ml_model,node_scheduler_api,node_scheduler toneRose
```

## Components

### Web client

- [CampusCare UI](https://github.com/ranganamukunda19-dot/campuscare./blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`

### Hostel APIs

- [FastAPI backend](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [Student management](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [Room management](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [Room allocation](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [Mess attendance](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [Complaint management](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [Dashboard](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`

### Data processing

- [Relational database](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/db/database.py): `backend/db/database.py`
- [ETL pipeline](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/pipeline.py): `backend/etl/pipeline.py`
- [Data extraction](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/extract.py): `backend/etl/extract.py`
- [Data transformation](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/transform.py): `backend/etl/transform.py`
- [CSV export](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/load.py): `backend/etl/load.py`
- [Processed CSV files](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/etl/load.py): `backend/etl/load.py`

### Extensions

- [Attendance prediction API](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [Attendance model](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/ml/attendance_model.py): `backend/ml/attendance_model.py`
- [Scheduling API](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/main.py): `backend/main.py`
- [In-memory task scheduler](https://github.com/ranganamukunda19-dot/campuscare./blob/main/backend/scheduling/scheduler.py): `backend/scheduling/scheduler.py`

### Other components

- **Hostel user**

## Connections

- Hostel user → CampusCare UI: uses (evidence: `README.md`)
- CampusCare UI → FastAPI backend: calls API (evidence: `README.md`)
- FastAPI backend → Student management: routes requests (evidence: `README.md`)
- FastAPI backend → Room management: routes requests (evidence: `README.md`)
- FastAPI backend → Room allocation: routes requests (evidence: `README.md`)
- FastAPI backend → Mess attendance: routes requests (evidence: `README.md`)
- FastAPI backend → Complaint management: routes requests (evidence: `README.md`)
- FastAPI backend → Dashboard: routes requests (evidence: `README.md`)
- FastAPI backend → Relational database: queries and updates (evidence: `backend/main.py`)
- ETL pipeline → Data extraction: calls extraction (evidence: `backend/etl/pipeline.py`)
- ETL pipeline → Data transformation: calls transformation (evidence: `backend/etl/pipeline.py`)
- ETL pipeline → CSV export: calls loading (evidence: `backend/etl/pipeline.py`)
- Data extraction → Relational database: reads tables (evidence: `backend/etl/extract.py`)
- CSV export → Processed CSV files: writes CSV (evidence: `backend/etl/load.py`)
- Attendance model → Processed CSV files: reads attendance CSV (evidence: `backend/ml/attendance_model.py`)
- FastAPI backend → Attendance prediction API: routes prediction (evidence: `README.md`)
- Attendance prediction API → Attendance model: calls prediction (evidence: `backend/main.py`)
- FastAPI backend → Scheduling API: routes tasks (evidence: `README.md`)
- Scheduling API → In-memory task scheduler: delegates tasks (evidence: `backend/main.py`)
