# likhitpvs-dev/smartcampushub architecture

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

- Interactive diagram: https://gitdiagram.com/likhitpvs-dev/smartcampushub
- Repository: https://github.com/likhitpvs-dev/smartcampushub

## Overview

SmartCampusHub is a campus-management web application for events, student registrations, hackathon teams, announcements, and user management. Its likely user journey begins in the web interface and reaches backend API routes for those campus services, with PostgreSQL as the documented database. The tree identifies dedicated backend modules for each capability, plus configuration, database, and query layers. Source excerpts are empty, so runtime wiring and specific calls cannot be verified; dashed, unevidenced links indicate only the documented product shape, not inspected control flow.

Main entry points: [`backend/app/main.py`](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/main.py) (API application), [`frontend/index.html`](https://github.com/likhitpvs-dev/smartcampushub/blob/main/frontend/index.html) (Web interface), [`backend/app/db.py`](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/db.py) (Database access), [`backend/app/queries`](https://github.com/likhitpvs-dev/smartcampushub/tree/main/backend/app/queries) (Query layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_frontend["Web interface<br/>[index.html]"]
end

subgraph group_api["Backend API"]
  node_api_entry["API application<br/>[main.py]"]
end

subgraph group_campus["Campus services"]
  node_auth["Authentication<br/>[auth.py]"]
  node_users["User management<br/>[users.py]"]
  node_announcements["Announcements<br/>[announcements.py]"]
  node_events["Events<br/>[events.py]"]
  node_registrations["Registrations<br/>[registrations.py]"]
  node_teams["Hackathon teams<br/>[teams.py]"]
end

subgraph group_data["Data layer"]
  node_config["Configuration<br/>[config.py]"]
  node_db["Database access<br/>[db.py]"]
  node_queries["Query layer"]
end

node_user(("Campus user"))
node_postgres[("PostgreSQL")]

node_user -.->|"uses"| node_frontend
node_frontend -.->|"calls API"| node_api_entry
node_api_entry -.->|"routes to"| node_auth
node_api_entry -.->|"routes to"| node_users
node_api_entry -.->|"routes to"| node_announcements
node_api_entry -.->|"routes to"| node_events
node_api_entry -.->|"routes to"| node_registrations
node_api_entry -.->|"routes to"| node_teams
node_db -.->|"accesses"| node_postgres
node_queries -.->|"queries"| node_postgres

click node_frontend "https://github.com/likhitpvs-dev/smartcampushub/blob/main/frontend/index.html"
click node_api_entry "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/main.py"
click node_auth "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/auth.py"
click node_users "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/users.py"
click node_announcements "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/announcements.py"
click node_events "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/events.py"
click node_registrations "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/registrations.py"
click node_teams "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/teams.py"
click node_config "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/config.py"
click node_db "https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/db.py"
click node_queries "https://github.com/likhitpvs-dev/smartcampushub/tree/main/backend/app/queries"

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_frontend,node_user toneBlue
class node_api_entry,node_postgres toneAmber
class node_auth,node_users,node_announcements,node_events,node_registrations,node_teams toneMint
class node_config,node_db,node_queries toneRose
```

## Components

### Web interface

- [Web interface](https://github.com/likhitpvs-dev/smartcampushub/blob/main/frontend/index.html): `frontend/index.html`

### Backend API

- [API application](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/main.py): `backend/app/main.py`

### Campus services

- [Authentication](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [User management](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/users.py): `backend/app/routers/users.py`
- [Announcements](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/announcements.py): `backend/app/routers/announcements.py`
- [Events](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/events.py): `backend/app/routers/events.py`
- [Registrations](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/registrations.py): `backend/app/routers/registrations.py`
- [Hackathon teams](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/routers/teams.py): `backend/app/routers/teams.py`

### Data layer

- [Configuration](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/config.py): `backend/app/config.py`
- [Database access](https://github.com/likhitpvs-dev/smartcampushub/blob/main/backend/app/db.py): `backend/app/db.py`
- [Query layer](https://github.com/likhitpvs-dev/smartcampushub/tree/main/backend/app/queries): `backend/app/queries`

### Other components

- **Campus user**
- **PostgreSQL**

## Connections

- Campus user → Web interface: uses
- Web interface → API application: calls API
- API application → Authentication: routes to
- API application → User management: routes to
- API application → Announcements: routes to
- API application → Events: routes to
- API application → Registrations: routes to
- API application → Hackathon teams: routes to
- Database access → PostgreSQL: accesses
- Query layer → PostgreSQL: queries
