# anindya357/unicircle architecture

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

- Interactive diagram: https://gitdiagram.com/anindya357/unicircle
- Repository: https://github.com/anindya357/unicircle

## Overview

UniCircle is a CUET digital-campus platform. Its user-facing scope spans campus discovery, identity, community, clubs and events, news, transport, resource sharing, notifications, and an AI assistant. The backend exposes feature APIs through a central router and persists domain data through SQLAlchemy/PostgreSQL; the frontend provides corresponding feature experiences. The README describes some capabilities as planned, and unsampled module internals are represented at their existing directory paths. Edges are limited to relationships visible in the README or SOURCE INDEX; frontend-to-backend wiring is not asserted.

Main entry points: [`backend/app/api/router.py`](https://github.com/anindya357/unicircle/blob/main/backend/app/api/router.py) (API entry router), [`backend/app/db/models.py`](https://github.com/anindya357/unicircle/blob/main/backend/app/db/models.py) (Campus data models), [`backend/app/modules/clubs/router.py`](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/clubs/router.py) (Clubs and events), [`backend/app/modules/notifications`](https://github.com/anindya357/unicircle/tree/main/backend/app/modules/notifications) (Notifications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Campus home<br/>[home-page.tsx]"]
  node_identity_ui["Identity experience<br/>[auth-page.tsx]"]
  node_campus_ui["Campus explorer"]
  node_clubs_ui["Clubs and events<br/>[club-event-hub.tsx]"]
  node_directory_ui["Campus directory<br/>[directory-page.tsx]"]
  node_forum_ui["Community forum<br/>[forum-page.tsx]"]
  node_news_ui["Campus news<br/>[news-page.tsx]"]
  node_transport_ui["Transport<br/>[transport-page.tsx]"]
  node_resources_ui["Resource sharing"]
  node_assistant_ui["AI assistant"]
  node_notifications_ui["Notifications"]
end

subgraph group_api["Campus API"]
  node_api_entry["API entry router<br/>[router.py]"]
  node_auth_api["Authentication<br/>[router.py]"]
  node_clubs_api["Clubs and events<br/>[router.py]"]
  node_directory_api["Directory<br/>[router.py]"]
  node_forum_api["Forum<br/>[router.py]"]
  node_news_api["News publishing<br/>[router.py]"]
  node_transport_api["Transport<br/>[router.py]"]
  node_resources_api["Resource requests<br/>[router.py]"]
  node_campus_api["Campus information"]
  node_assistant_api["Assistant and ingestion"]
  node_notifications_api["Notifications"]
  node_admin_api["Administration"]
  node_rag_ingest["Knowledge ingestion<br/>[ingest.py]"]
end

subgraph group_platform["Platform services"]
  node_auth_core["Access control<br/>[auth.py]"]
  node_otp_email["OTP and email<br/>[otp.py]"]
  node_audit["Audit trail<br/>[audit.py]"]
end

subgraph group_data["Persistence"]
  node_database_session["Database sessions<br/>[session.py]"]
  node_domain_models[("Campus data models<br/>[models.py]")]
end

node_campus_user(("Campus user"))
node_postgres[("PostgreSQL")]
node_cuet_site["CUET source site"]

node_campus_user -->|"uses"| node_home
node_api_entry -->|"routes to"| node_auth_api
node_api_entry -->|"routes to"| node_clubs_api
node_api_entry -->|"routes to"| node_directory_api
node_api_entry -->|"routes to"| node_forum_api
node_api_entry -->|"routes to"| node_news_api
node_api_entry -->|"routes to"| node_transport_api
node_api_entry -->|"routes to"| node_resources_api
node_api_entry -->|"routes to"| node_campus_api
node_api_entry -->|"routes to"| node_assistant_api
node_api_entry -->|"routes to"| node_notifications_api
node_api_entry -->|"routes to"| node_admin_api
node_auth_core -->|"gets sessions"| node_database_session
node_auth_core -->|"checks identity"| node_auth_api
node_otp_email -->|"supports verification"| node_auth_api
node_clubs_api -->|"reads and writes"| node_domain_models
node_clubs_api -.->|"uses sessions"| node_database_session
node_directory_api -->|"queries"| node_domain_models
node_forum_api -->|"reads and writes"| node_domain_models
node_news_api -->|"reads and writes"| node_domain_models
node_transport_api -->|"reads and writes"| node_domain_models
node_resources_api -->|"reads and writes"| node_domain_models
node_assistant_api -->|"uses persisted data"| node_domain_models
node_assistant_api -.->|"includes ingestion"| node_rag_ingest
node_rag_ingest -->|"crawls sources"| node_cuet_site
node_database_session -->|"binds sessions"| node_domain_models
node_domain_models -.->|"stores records"| node_postgres
node_news_api -->|"publishes alerts"| node_notifications_api
node_clubs_api -->|"references repository"| node_notifications_api
node_notifications_api -->|"uses notification records"| node_domain_models

click node_home "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/home/components/home-page.tsx"
click node_identity_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/auth/components/auth-page.tsx"
click node_campus_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/campus-explorer/components/campus-explorer-page.tsx"
click node_clubs_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/clubs-events/components/club-event-hub.tsx"
click node_directory_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/directory/components/directory-page.tsx"
click node_forum_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/forum/components/forum-page.tsx"
click node_news_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/news/components/news-page.tsx"
click node_transport_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/transport/components/transport-page.tsx"
click node_resources_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/resources/components/resource-hub-page.tsx"
click node_assistant_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/assistant/components/campus-assistant-page.tsx"
click node_notifications_ui "https://github.com/anindya357/unicircle/blob/main/frontend/src/features/notifications/components/notification-list.tsx"
click node_api_entry "https://github.com/anindya357/unicircle/blob/main/backend/app/api/router.py"
click node_auth_api "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/auth/router.py"
click node_clubs_api "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/clubs/router.py"
click node_directory_api "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/directory/router.py"
click node_forum_api "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/forum/router.py"
click node_news_api "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/news/router.py"
click node_transport_api "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/transport/router.py"
click node_resources_api "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/resources/router.py"
click node_campus_api "https://github.com/anindya357/unicircle/tree/main/backend/app/modules/campus"
click node_assistant_api "https://github.com/anindya357/unicircle/tree/main/backend/app/modules/assistant"
click node_notifications_api "https://github.com/anindya357/unicircle/tree/main/backend/app/modules/notifications"
click node_admin_api "https://github.com/anindya357/unicircle/tree/main/backend/app/modules/admin"
click node_auth_core "https://github.com/anindya357/unicircle/blob/main/backend/app/core/auth.py"
click node_otp_email "https://github.com/anindya357/unicircle/blob/main/backend/app/core/otp.py"
click node_audit "https://github.com/anindya357/unicircle/blob/main/backend/app/core/audit.py"
click node_rag_ingest "https://github.com/anindya357/unicircle/blob/main/backend/app/modules/assistant/ingest.py"
click node_database_session "https://github.com/anindya357/unicircle/blob/main/backend/app/db/session.py"
click node_domain_models "https://github.com/anindya357/unicircle/blob/main/backend/app/db/models.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_home,node_identity_ui,node_campus_ui,node_clubs_ui,node_directory_ui,node_forum_ui,node_news_ui,node_transport_ui,node_resources_ui,node_assistant_ui,node_notifications_ui,node_campus_user toneBlue
class node_api_entry,node_auth_api,node_clubs_api,node_directory_api,node_forum_api,node_news_api,node_transport_api,node_resources_api,node_campus_api,node_assistant_api,node_notifications_api,node_admin_api,node_rag_ingest,node_postgres toneAmber
class node_auth_core,node_otp_email,node_audit toneMint
class node_database_session,node_domain_models toneRose
class node_cuet_site toneIndigo
```

## Components

### Web experience

- [Campus home](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/home/components/home-page.tsx): `frontend/src/features/home/components/home-page.tsx`
- [Identity experience](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/auth/components/auth-page.tsx): `frontend/src/features/auth/components/auth-page.tsx`
- [Campus explorer](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/campus-explorer/components/campus-explorer-page.tsx): `frontend/src/features/campus-explorer/components/campus-explorer-page.tsx`
- [Clubs and events](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/clubs-events/components/club-event-hub.tsx): `frontend/src/features/clubs-events/components/club-event-hub.tsx`
- [Campus directory](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/directory/components/directory-page.tsx): `frontend/src/features/directory/components/directory-page.tsx`
- [Community forum](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/forum/components/forum-page.tsx): `frontend/src/features/forum/components/forum-page.tsx`
- [Campus news](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/news/components/news-page.tsx): `frontend/src/features/news/components/news-page.tsx`
- [Transport](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/transport/components/transport-page.tsx): `frontend/src/features/transport/components/transport-page.tsx`
- [Resource sharing](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/resources/components/resource-hub-page.tsx): `frontend/src/features/resources/components/resource-hub-page.tsx`
- [AI assistant](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/assistant/components/campus-assistant-page.tsx): `frontend/src/features/assistant/components/campus-assistant-page.tsx`
- [Notifications](https://github.com/anindya357/unicircle/blob/main/frontend/src/features/notifications/components/notification-list.tsx): `frontend/src/features/notifications/components/notification-list.tsx`

### Campus API

- [API entry router](https://github.com/anindya357/unicircle/blob/main/backend/app/api/router.py): `backend/app/api/router.py`
- [Authentication](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/auth/router.py): `backend/app/modules/auth/router.py`
- [Clubs and events](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/clubs/router.py): `backend/app/modules/clubs/router.py`
- [Directory](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/directory/router.py): `backend/app/modules/directory/router.py`
- [Forum](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/forum/router.py): `backend/app/modules/forum/router.py`
- [News publishing](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/news/router.py): `backend/app/modules/news/router.py`
- [Transport](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/transport/router.py): `backend/app/modules/transport/router.py`
- [Resource requests](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/resources/router.py): `backend/app/modules/resources/router.py`
- [Campus information](https://github.com/anindya357/unicircle/tree/main/backend/app/modules/campus): `backend/app/modules/campus`
- [Assistant and ingestion](https://github.com/anindya357/unicircle/tree/main/backend/app/modules/assistant): `backend/app/modules/assistant`
- [Notifications](https://github.com/anindya357/unicircle/tree/main/backend/app/modules/notifications): `backend/app/modules/notifications`
- [Administration](https://github.com/anindya357/unicircle/tree/main/backend/app/modules/admin): `backend/app/modules/admin`
- [Knowledge ingestion](https://github.com/anindya357/unicircle/blob/main/backend/app/modules/assistant/ingest.py): `backend/app/modules/assistant/ingest.py`

### Platform services

- [Access control](https://github.com/anindya357/unicircle/blob/main/backend/app/core/auth.py): `backend/app/core/auth.py`
- [OTP and email](https://github.com/anindya357/unicircle/blob/main/backend/app/core/otp.py): `backend/app/core/otp.py`
- [Audit trail](https://github.com/anindya357/unicircle/blob/main/backend/app/core/audit.py): `backend/app/core/audit.py`

### Persistence

- [Database sessions](https://github.com/anindya357/unicircle/blob/main/backend/app/db/session.py): `backend/app/db/session.py`
- [Campus data models](https://github.com/anindya357/unicircle/blob/main/backend/app/db/models.py): `backend/app/db/models.py`

### Other components

- **Campus user**
- **PostgreSQL**
- **CUET source site**

## Connections

- Campus user → Campus home: uses (evidence: `README.md`)
- API entry router → Authentication: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Clubs and events: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Directory: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Forum: routes to (evidence: `backend/app/api/router.py`)
- API entry router → News publishing: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Transport: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Resource requests: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Campus information: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Assistant and ingestion: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Notifications: routes to (evidence: `backend/app/api/router.py`)
- API entry router → Administration: routes to (evidence: `backend/app/api/router.py`)
- Access control → Database sessions: gets sessions (evidence: `backend/app/core/auth.py`)
- Access control → Authentication: checks identity (evidence: `backend/app/core/auth.py`)
- OTP and email → Authentication: supports verification
- Clubs and events → Campus data models: reads and writes (evidence: `backend/app/modules/clubs/router.py`)
- Clubs and events → Database sessions: uses sessions (evidence: `backend/app/modules/clubs/router.py`)
- Directory → Campus data models: queries (evidence: `backend/app/modules/directory/router.py`)
- Forum → Campus data models: reads and writes (evidence: `backend/app/modules/forum/router.py`)
- News publishing → Campus data models: reads and writes (evidence: `backend/app/modules/news/router.py`)
- Transport → Campus data models: reads and writes (evidence: `backend/app/modules/transport/router.py`)
- Resource requests → Campus data models: reads and writes (evidence: `backend/app/modules/resources/router.py`)
- Assistant and ingestion → Campus data models: uses persisted data (evidence: `backend/app/modules/assistant/ingest.py`)
- Assistant and ingestion → Knowledge ingestion: includes ingestion (evidence: `backend/app/modules/assistant/ingest.py`)
- Knowledge ingestion → CUET source site: crawls sources (evidence: `backend/app/modules/assistant/ingest.py`)
- Database sessions → Campus data models: binds sessions (evidence: `backend/app/db/session.py`)
- Campus data models → PostgreSQL: stores records (evidence: `README.md`)
- News publishing → Notifications: publishes alerts (evidence: `backend/app/modules/news/router.py`)
- Clubs and events → Notifications: references repository (evidence: `backend/app/modules/clubs/router.py`)
- Notifications → Campus data models: uses notification records (evidence: `backend/app/modules/notifications/repository.py`)
