# sanjeev-rs/nexus-campus architecture

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

- Interactive diagram: https://gitdiagram.com/sanjeev-rs/nexus-campus
- Repository: https://github.com/sanjeev-rs/nexus-campus

## Overview

NEXUS is a campus intelligence platform combining student, faculty, and management experiences with a FastAPI backend for academic records, projects, opportunities, and intelligence services. The student workflow spans browsing projects and knowledge, managing a profile, and accessing campus services; the backend exposes these capabilities through versioned API routes and PostgreSQL-backed models. Knowledge ingestion is a distinct workflow: authorized requests schedule research-file processing, while a generic service chunks text, generates embeddings, and stores them. The excerpts establish routing and ingestion relationships; frontend-to-backend calls and most service internals were not shown.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/App.jsx) (Web app), [`backend/app/services/knowledge_ingestion_service.py`](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_ingestion_service.py) (Knowledge ingestion), [`backend/app/api/v1/router.py`](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/api/v1/router.py) (Versioned routes), [`backend/app/api/knowledge_ingestion.py`](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/api/knowledge_ingestion.py) (Ingestion routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Campus experience"]
  node_web_app["Web app<br/>[App.jsx]"]
  node_landing["Landing<br/>[Landing.jsx]"]
  node_student_projects["Student projects"]
  node_project_details["Project details<br/>[ProjectDetails.jsx]"]
  node_project_upload["Project upload<br/>[ProjectUpload.jsx]"]
  node_knowledge_ui["Knowledge pages"]
  node_student_profile["Student profile<br/>[StudentProfile.jsx]"]
  node_faculty_dashboard["Faculty dashboard"]
  node_management_dashboard["Management dashboard"]
  node_knowledge_data["Knowledge catalogue<br/>[knowledgeData.js]"]
end

subgraph group_api["Backend API"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_api_router["Versioned routes<br/>[router.py]"]
  node_domain_routes["Domain routes"]
  node_ingestion_route["Ingestion routes"]
end

subgraph group_intelligence["Intelligence services"]
  node_campus_intelligence["Campus intelligence"]
  node_student_twin["Student twin"]
  node_graph_intelligence["Graph intelligence"]
end

subgraph group_knowledge["Knowledge system"]
  node_knowledge_ingest["Knowledge ingestion"]
  node_ingestion_status["Ingestion status"]
  node_research_processor["Research processor"]
  node_rag_context["RAG context"]
  node_chunking["Text chunking"]
  node_embedding["Embedding generation"]
  node_embedding_store["Embedding storage"]
end

subgraph group_data["Data layer"]
  node_postgres[("PostgreSQL models")]
  node_db_connection["Database connection<br/>[connection.py]"]
end

node_campus_user(("Campus user"))

node_campus_user -->|"opens"| node_web_app
node_web_app -->|"routes to"| node_landing
node_web_app -->|"routes to"| node_student_projects
node_web_app -->|"routes to"| node_project_details
node_web_app -->|"routes to"| node_knowledge_ui
node_web_app -->|"routes to"| node_student_profile
node_web_app -->|"routes to"| node_faculty_dashboard
node_knowledge_ui -->|"reads catalogue"| node_knowledge_data
node_api_app -->|"mounts routes"| node_api_router
node_api_router -->|"registers"| node_domain_routes
node_api_router -->|"registers"| node_ingestion_route
node_ingestion_route -->|"checks status"| node_ingestion_status
node_ingestion_route -->|"schedules processing"| node_research_processor
node_ingestion_status -->|"reads/writes records"| node_postgres
node_knowledge_ingest -->|"chunks text"| node_chunking
node_knowledge_ingest -->|"generates vectors"| node_embedding
node_knowledge_ingest -->|"stores vectors"| node_embedding_store
node_embedding_store -.->|"persists embeddings"| node_postgres
node_db_connection -->|"registers models"| node_postgres

click node_web_app "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/App.jsx"
click node_landing "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Landing/Landing.jsx"
click node_student_projects "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/StudentProjects.jsx"
click node_project_details "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/ProjectDetails/ProjectDetails.jsx"
click node_project_upload "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/ProjectUpload/ProjectUpload.jsx"
click node_knowledge_ui "https://github.com/sanjeev-rs/nexus-campus/tree/main/frontend/src/campus/pages/Student/Knowledge"
click node_student_profile "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/StudentProfile/StudentProfile.jsx"
click node_faculty_dashboard "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Faculty/FacultyDashboard.jsx"
click node_management_dashboard "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Management/ManagementDashboard.jsx"
click node_knowledge_data "https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/Knowledge/knowledgeData.js"
click node_api_app "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/main.py"
click node_api_router "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/api/v1/router.py"
click node_domain_routes "https://github.com/sanjeev-rs/nexus-campus/tree/main/backend/app/api"
click node_ingestion_route "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/api/knowledge_ingestion.py"
click node_campus_intelligence "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/campus_intelligence_engine.py"
click node_student_twin "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/student_twin_engine.py"
click node_graph_intelligence "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/graph_intelligence_engine.py"
click node_knowledge_ingest "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_ingestion_service.py"
click node_ingestion_status "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_ingestion_status_service.py"
click node_research_processor "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/research_ingestion_processor.py"
click node_rag_context "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/rag_context_service.py"
click node_chunking "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_chunking_service.py"
click node_embedding "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/embedding_service.py"
click node_embedding_store "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_embedding_service.py"
click node_postgres "https://github.com/sanjeev-rs/nexus-campus/tree/main/backend/app/models"
click node_db_connection "https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/database/connection.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_web_app,node_landing,node_student_projects,node_project_details,node_project_upload,node_knowledge_ui,node_student_profile,node_faculty_dashboard,node_management_dashboard,node_knowledge_data,node_campus_user toneBlue
class node_api_app,node_api_router,node_domain_routes,node_ingestion_route toneAmber
class node_campus_intelligence,node_student_twin,node_graph_intelligence toneMint
class node_knowledge_ingest,node_ingestion_status,node_research_processor,node_rag_context,node_chunking,node_embedding,node_embedding_store toneRose
class node_postgres,node_db_connection toneIndigo
```

## Components

### Campus experience

- [Web app](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Landing](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Landing/Landing.jsx): `frontend/src/campus/pages/Landing/Landing.jsx`
- [Student projects](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/StudentProjects.jsx): `frontend/src/campus/pages/Student/StudentProjects.jsx`
- [Project details](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/ProjectDetails/ProjectDetails.jsx): `frontend/src/campus/pages/Student/ProjectDetails/ProjectDetails.jsx`
- [Project upload](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/ProjectUpload/ProjectUpload.jsx): `frontend/src/campus/pages/Student/ProjectUpload/ProjectUpload.jsx`
- [Knowledge pages](https://github.com/sanjeev-rs/nexus-campus/tree/main/frontend/src/campus/pages/Student/Knowledge): `frontend/src/campus/pages/Student/Knowledge`
- [Student profile](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/StudentProfile/StudentProfile.jsx): `frontend/src/campus/pages/Student/StudentProfile/StudentProfile.jsx`
- [Faculty dashboard](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Faculty/FacultyDashboard.jsx): `frontend/src/campus/pages/Faculty/FacultyDashboard.jsx`
- [Management dashboard](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Management/ManagementDashboard.jsx): `frontend/src/campus/pages/Management/ManagementDashboard.jsx`
- [Knowledge catalogue](https://github.com/sanjeev-rs/nexus-campus/blob/main/frontend/src/campus/pages/Student/Knowledge/knowledgeData.js): `frontend/src/campus/pages/Student/Knowledge/knowledgeData.js`

### Backend API

- [FastAPI app](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/main.py): `backend/app/main.py`
- [Versioned routes](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/api/v1/router.py): `backend/app/api/v1/router.py`
- [Domain routes](https://github.com/sanjeev-rs/nexus-campus/tree/main/backend/app/api): `backend/app/api`
- [Ingestion routes](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/api/knowledge_ingestion.py): `backend/app/api/knowledge_ingestion.py`

### Intelligence services

- [Campus intelligence](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/campus_intelligence_engine.py): `backend/app/services/campus_intelligence_engine.py`
- [Student twin](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/student_twin_engine.py): `backend/app/services/student_twin_engine.py`
- [Graph intelligence](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/graph_intelligence_engine.py): `backend/app/services/graph_intelligence_engine.py`

### Knowledge system

- [Knowledge ingestion](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_ingestion_service.py): `backend/app/services/knowledge_ingestion_service.py`
- [Ingestion status](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_ingestion_status_service.py): `backend/app/services/knowledge_ingestion_status_service.py`
- [Research processor](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/research_ingestion_processor.py): `backend/app/services/research_ingestion_processor.py`
- [RAG context](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/rag_context_service.py): `backend/app/services/rag_context_service.py`
- [Text chunking](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_chunking_service.py): `backend/app/services/knowledge_chunking_service.py`
- [Embedding generation](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/embedding_service.py): `backend/app/services/embedding_service.py`
- [Embedding storage](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/services/knowledge_embedding_service.py): `backend/app/services/knowledge_embedding_service.py`

### Data layer

- [PostgreSQL models](https://github.com/sanjeev-rs/nexus-campus/tree/main/backend/app/models): `backend/app/models`
- [Database connection](https://github.com/sanjeev-rs/nexus-campus/blob/main/backend/app/database/connection.py): `backend/app/database/connection.py`

### Other components

- **Campus user**

## Connections

- Campus user → Web app: opens (evidence: `frontend/src/App.jsx`)
- Web app → Landing: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Student projects: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Project details: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Knowledge pages: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Student profile: routes to (evidence: `frontend/src/App.jsx`)
- Web app → Faculty dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Knowledge pages → Knowledge catalogue: reads catalogue (evidence: `frontend/src/campus/pages/Student/Knowledge/KnowledgeResearch.jsx`)
- FastAPI app → Versioned routes: mounts routes (evidence: `backend/app/main.py`)
- Versioned routes → Domain routes: registers (evidence: `backend/app/api/v1/router.py`)
- Versioned routes → Ingestion routes: registers (evidence: `backend/app/api/v1/router.py`)
- Ingestion routes → Ingestion status: checks status (evidence: `backend/app/api/knowledge_ingestion.py`)
- Ingestion routes → Research processor: schedules processing (evidence: `backend/app/api/knowledge_ingestion.py`)
- Ingestion status → PostgreSQL models: reads/writes records (evidence: `backend/app/services/knowledge_ingestion_status_service.py`)
- Knowledge ingestion → Text chunking: chunks text (evidence: `backend/app/services/knowledge_ingestion_service.py`)
- Knowledge ingestion → Embedding generation: generates vectors (evidence: `backend/app/services/knowledge_ingestion_service.py`)
- Knowledge ingestion → Embedding storage: stores vectors (evidence: `backend/app/services/knowledge_ingestion_service.py`)
- Embedding storage → PostgreSQL models: persists embeddings
- Database connection → PostgreSQL models: registers models (evidence: `backend/app/database/connection.py`)
