# mahimap1/lumen architecture

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

- Interactive diagram: https://gitdiagram.com/mahimap1/lumen
- Repository: https://github.com/mahimap1/lumen

## Overview

Lumen is a student study and career-planning application. Users explore degree plans, alumni pathways, and career data, or create a course-, skill-, or career-focused chat session; the chat can return interactive learning widgets, while separate visualization tools include HTML and Manim-based outputs. The frontend also keeps view, session, and widget state locally. The README provides no product detail, and several source excerpts are partial, so the graph omits uncertain backend wiring and includes only relations supported by the tree or sampled code.

Main entry points: [`frontend/src/App.jsx`](https://github.com/mahimap1/lumen/blob/main/frontend/src/App.jsx) (App navigation), [`backend/main.py`](https://github.com/mahimap1/lumen/blob/main/backend/main.py) (FastAPI routes), [`backend/services/backboard_service.py`](https://github.com/mahimap1/lumen/blob/main/backend/services/backboard_service.py) (Study assistant), [`backend/services/sqlite_service.py`](https://github.com/mahimap1/lumen/blob/main/backend/services/sqlite_service.py) (Read-only SQL)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Student interface"]
  node_app["App navigation<br/>[App.jsx]"]
  node_session_modal["Session setup"]
  node_chat_view["Study chat"]
  node_plan_view["Four-year plan"]
  node_pathways_view["Alumni pathways"]
  node_career_view["Career dashboard"]
end

subgraph group_learning["Study and visualization"]
  node_archive["Visual archive<br/>[VisualArchive.jsx]"]
  node_widget_data["Curated ML widgets<br/>[mlWidgets.js]"]
  node_manim["Animation service<br/>[manim_service.py]"]
end

subgraph group_careers["Career insights"]
  node_career_service["Career mappings<br/>[career_service.py]"]
  node_career_db["Career queries<br/>[career_db.py]"]
end

subgraph group_backend["Backend services"]
  node_api["Frontend API<br/>[api.js]"]
  node_http_api["FastAPI routes<br/>[main.py]"]
  node_backboard["Study assistant"]
  node_gemini["Gemini capabilities<br/>[gemini_service.py]"]
end

subgraph group_state["Data and integrations"]
  node_sqlite_service["Read-only SQL<br/>[sqlite_service.py]"]
  node_campus_db[("Campus database")]
  node_local_storage[("Browser storage")]
end

node_student(("Student"))
node_backboard_external["Backboard service"]
node_gemini_external["Google Gemini"]

node_student -->|"uses"| node_app
node_app -->|"shows"| node_plan_view
node_app -->|"shows"| node_pathways_view
node_app -->|"shows"| node_career_view
node_app -->|"shows"| node_archive
node_app -->|"shows"| node_chat_view
node_app -->|"opens"| node_session_modal
node_app -->|"creates sessions"| node_api
node_app -->|"saves view and widgets"| node_local_storage
node_chat_view -->|"sends messages"| node_api
node_archive -->|"uses curated content"| node_widget_data
node_api -->|"requests"| node_http_api
node_http_api -->|"delegates study chat"| node_backboard
node_backboard -.->|"manages threads"| node_backboard_external
node_backboard -.->|"generates fallback replies"| node_gemini_external
node_backboard -->|"queries campus data"| node_sqlite_service
node_http_api -->|"generates HTML widgets"| node_gemini
node_http_api -->|"loads career data"| node_career_db
node_http_api -->|"uses career mappings"| node_career_service
node_http_api -->|"runs dashboard and profile queries"| node_sqlite_service
node_http_api -->|"requests animations"| node_manim
node_career_db -->|"queries campus data"| node_sqlite_service
node_sqlite_service -->|"reads"| node_campus_db

click node_app "https://github.com/mahimap1/lumen/blob/main/frontend/src/App.jsx"
click node_session_modal "https://github.com/mahimap1/lumen/blob/main/frontend/src/components/NewSessionModal.jsx"
click node_chat_view "https://github.com/mahimap1/lumen/blob/main/frontend/src/components/chat/ChatSessionView.jsx"
click node_plan_view "https://github.com/mahimap1/lumen/blob/main/frontend/src/components/FourYearPlanView.jsx"
click node_pathways_view "https://github.com/mahimap1/lumen/blob/main/frontend/src/components/AlumniPathwaysView.jsx"
click node_career_view "https://github.com/mahimap1/lumen/blob/main/frontend/src/components/CareerDashboard.jsx"
click node_archive "https://github.com/mahimap1/lumen/blob/main/frontend/src/components/VisualArchive.jsx"
click node_widget_data "https://github.com/mahimap1/lumen/blob/main/frontend/src/data/mlWidgets.js"
click node_api "https://github.com/mahimap1/lumen/blob/main/frontend/src/services/api.js"
click node_http_api "https://github.com/mahimap1/lumen/blob/main/backend/main.py"
click node_backboard "https://github.com/mahimap1/lumen/blob/main/backend/services/backboard_service.py"
click node_gemini "https://github.com/mahimap1/lumen/blob/main/backend/services/gemini_service.py"
click node_manim "https://github.com/mahimap1/lumen/blob/main/backend/services/manim_service.py"
click node_career_service "https://github.com/mahimap1/lumen/blob/main/backend/services/career_service.py"
click node_career_db "https://github.com/mahimap1/lumen/blob/main/backend/services/career_db.py"
click node_sqlite_service "https://github.com/mahimap1/lumen/blob/main/backend/services/sqlite_service.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_app,node_session_modal,node_chat_view,node_plan_view,node_pathways_view,node_career_view toneBlue
class node_archive,node_widget_data,node_manim toneAmber
class node_career_service,node_career_db toneMint
class node_api,node_http_api,node_backboard,node_gemini toneRose
class node_sqlite_service,node_campus_db,node_local_storage,node_student,node_backboard_external,node_gemini_external toneIndigo
```

## Components

### Student interface

- [App navigation](https://github.com/mahimap1/lumen/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Session setup](https://github.com/mahimap1/lumen/blob/main/frontend/src/components/NewSessionModal.jsx): `frontend/src/components/NewSessionModal.jsx`
- [Study chat](https://github.com/mahimap1/lumen/blob/main/frontend/src/components/chat/ChatSessionView.jsx): `frontend/src/components/chat/ChatSessionView.jsx`
- [Four-year plan](https://github.com/mahimap1/lumen/blob/main/frontend/src/components/FourYearPlanView.jsx): `frontend/src/components/FourYearPlanView.jsx`
- [Alumni pathways](https://github.com/mahimap1/lumen/blob/main/frontend/src/components/AlumniPathwaysView.jsx): `frontend/src/components/AlumniPathwaysView.jsx`
- [Career dashboard](https://github.com/mahimap1/lumen/blob/main/frontend/src/components/CareerDashboard.jsx): `frontend/src/components/CareerDashboard.jsx`

### Study and visualization

- [Visual archive](https://github.com/mahimap1/lumen/blob/main/frontend/src/components/VisualArchive.jsx): `frontend/src/components/VisualArchive.jsx`
- [Curated ML widgets](https://github.com/mahimap1/lumen/blob/main/frontend/src/data/mlWidgets.js): `frontend/src/data/mlWidgets.js`
- [Animation service](https://github.com/mahimap1/lumen/blob/main/backend/services/manim_service.py): `backend/services/manim_service.py`

### Career insights

- [Career mappings](https://github.com/mahimap1/lumen/blob/main/backend/services/career_service.py): `backend/services/career_service.py`
- [Career queries](https://github.com/mahimap1/lumen/blob/main/backend/services/career_db.py): `backend/services/career_db.py`

### Backend services

- [Frontend API](https://github.com/mahimap1/lumen/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [FastAPI routes](https://github.com/mahimap1/lumen/blob/main/backend/main.py): `backend/main.py`
- [Study assistant](https://github.com/mahimap1/lumen/blob/main/backend/services/backboard_service.py): `backend/services/backboard_service.py`
- [Gemini capabilities](https://github.com/mahimap1/lumen/blob/main/backend/services/gemini_service.py): `backend/services/gemini_service.py`

### Data and integrations

- [Read-only SQL](https://github.com/mahimap1/lumen/blob/main/backend/services/sqlite_service.py): `backend/services/sqlite_service.py`
- **Campus database**
- **Browser storage**

### Other components

- **Student**
- **Backboard service**
- **Google Gemini**

## Connections

- Student → App navigation: uses
- App navigation → Four-year plan: shows
- App navigation → Alumni pathways: shows
- App navigation → Career dashboard: shows
- App navigation → Visual archive: shows
- App navigation → Study chat: shows
- App navigation → Session setup: opens
- App navigation → Frontend API: creates sessions
- App navigation → Browser storage: saves view and widgets
- Study chat → Frontend API: sends messages
- Visual archive → Curated ML widgets: uses curated content
- Frontend API → FastAPI routes: requests
- FastAPI routes → Study assistant: delegates study chat
- Study assistant → Backboard service: manages threads
- Study assistant → Google Gemini: generates fallback replies
- Study assistant → Read-only SQL: queries campus data
- FastAPI routes → Gemini capabilities: generates HTML widgets
- FastAPI routes → Career queries: loads career data
- FastAPI routes → Career mappings: uses career mappings
- FastAPI routes → Read-only SQL: runs dashboard and profile queries
- FastAPI routes → Animation service: requests animations
- Career queries → Read-only SQL: queries campus data
- Read-only SQL → Campus database: reads
