# mxs8513/novalabs architecture

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

- Interactive diagram: https://gitdiagram.com/mxs8513/novalabs
- Repository: https://github.com/mxs8513/novalabs

## Overview

This is a UT Dallas student-support and academic-planning web app. Students enter through the routed interface, use search results and dedicated tools for courses, professors, campus locations, schedules, degree planning, and support routing, and can access login/profile features. The sampled Results component dispatches queries to Nebula and OpenAI services and offers links to relevant tools. The graph preserves the other major screens identified by the route table. Several screens and the Supabase server are represented from the source index; their internal behavior is not established by the excerpts.

Main entry points: [`src/app/routes.ts`](https://github.com/mxs8513/novalabs/blob/main/src/app/routes.ts) (Route table), [`src/app/components/Results.tsx`](https://github.com/mxs8513/novalabs/blob/main/src/app/components/Results.tsx) (Search results), [`src/app/services/nebulaApi.ts`](https://github.com/mxs8513/novalabs/blob/main/src/app/services/nebulaApi.ts) (Nebula API client), [`src/utils/supabase/client.ts`](https://github.com/mxs8513/novalabs/blob/main/src/utils/supabase/client.ts) (Supabase client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Web app"]
  node_entry["App entry<br/>[main.tsx]"]
  node_app_router["App router<br/>[App.tsx]"]
  node_routes["Route table<br/>[routes.ts]"]
  node_layout["App layout<br/>[Layout.tsx]"]
end

subgraph group_student_tools["Student tools"]
  node_home["Home search<br/>[Home.tsx]"]
  node_results["Search results<br/>[Results.tsx]"]
  node_schedule["Schedule<br/>[Schedule.tsx]"]
  node_campus_map["Campus map<br/>[CampusMap.tsx]"]
  node_professor_pick["Professor picker<br/>[ProfessorPick.tsx]"]
  node_support_router["Support routing<br/>[WhoDoIAsk.tsx]"]
  node_degree_planner["Degree planner<br/>[DegreePlanner.tsx]"]
  node_login["Login<br/>[Login.tsx]"]
  node_profile["Profile<br/>[Profile.tsx]"]
end

subgraph group_services["External services"]
  node_nebula["Nebula API client<br/>[nebulaApi.ts]"]
  node_openai_general["AI assistant<br/>[aiService.ts]"]
  node_openai_routing["AI routing client"]
  node_nebula_api["Nebula API"]
  node_openai_api["OpenAI API"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_supabase_api["Supabase service"]
end

subgraph group_backend["Backend storage"]
  node_server["Server function<br/>[index.tsx]"]
  node_kv[("Key-value store<br/>[kv_store.tsx]")]
end

node_student(("Student"))

node_student -->|"opens app"| node_entry
node_entry -->|"renders"| node_app_router
node_app_router -->|"loads routes"| node_routes
node_routes -->|"routes to"| node_layout
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_results
node_routes -->|"routes to"| node_schedule
node_routes -->|"routes to"| node_campus_map
node_routes -->|"routes to"| node_professor_pick
node_routes -->|"routes to"| node_support_router
node_routes -->|"routes to"| node_degree_planner
node_routes -->|"routes to"| node_login
node_routes -->|"routes to"| node_profile
node_home -->|"queries"| node_nebula
node_results -->|"searches"| node_nebula
node_results -->|"asks"| node_openai_general
node_results -->|"links to"| node_campus_map
node_results -->|"links to"| node_schedule
node_results -->|"links to"| node_professor_pick
node_results -->|"links to"| node_support_router
node_results -->|"links to"| node_degree_planner
node_professor_pick -->|"queries"| node_nebula
node_support_router -->|"routes query"| node_openai_routing
node_nebula -->|"requests data"| node_nebula_api
node_openai_general -->|"requests completion"| node_openai_api
node_openai_routing -->|"requests routing"| node_openai_api
node_layout -->|"uses"| node_supabase_client
node_login -->|"uses"| node_supabase_client
node_profile -->|"uses"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase_api
node_server -->|"uses store"| node_kv

click node_entry "https://github.com/mxs8513/novalabs/blob/main/src/main.tsx"
click node_app_router "https://github.com/mxs8513/novalabs/blob/main/src/app/App.tsx"
click node_routes "https://github.com/mxs8513/novalabs/blob/main/src/app/routes.ts"
click node_layout "https://github.com/mxs8513/novalabs/blob/main/src/app/components/Layout.tsx"
click node_home "https://github.com/mxs8513/novalabs/blob/main/src/app/components/Home.tsx"
click node_results "https://github.com/mxs8513/novalabs/blob/main/src/app/components/Results.tsx"
click node_schedule "https://github.com/mxs8513/novalabs/blob/main/src/app/components/Schedule.tsx"
click node_campus_map "https://github.com/mxs8513/novalabs/blob/main/src/app/components/CampusMap.tsx"
click node_professor_pick "https://github.com/mxs8513/novalabs/blob/main/src/app/components/ProfessorPick.tsx"
click node_support_router "https://github.com/mxs8513/novalabs/blob/main/src/app/components/WhoDoIAsk.tsx"
click node_degree_planner "https://github.com/mxs8513/novalabs/blob/main/src/app/components/DegreePlanner.tsx"
click node_login "https://github.com/mxs8513/novalabs/blob/main/src/app/components/Login.tsx"
click node_profile "https://github.com/mxs8513/novalabs/blob/main/src/app/components/Profile.tsx"
click node_nebula "https://github.com/mxs8513/novalabs/blob/main/src/app/services/nebulaApi.ts"
click node_openai_general "https://github.com/mxs8513/novalabs/blob/main/src/app/services/aiService.ts"
click node_openai_routing "https://github.com/mxs8513/novalabs/blob/main/src/app/services/openaiRoutingApi.ts"
click node_supabase_client "https://github.com/mxs8513/novalabs/blob/main/src/utils/supabase/client.ts"
click node_server "https://github.com/mxs8513/novalabs/blob/main/supabase/functions/server/index.tsx"
click node_kv "https://github.com/mxs8513/novalabs/blob/main/supabase/functions/server/kv_store.tsx"

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_entry,node_app_router,node_routes,node_layout toneBlue
class node_home,node_results,node_schedule,node_campus_map,node_professor_pick,node_support_router,node_degree_planner,node_login,node_profile toneAmber
class node_nebula,node_openai_general,node_openai_routing,node_nebula_api,node_openai_api,node_supabase_client,node_supabase_api toneMint
class node_server,node_kv toneRose
class node_student toneIndigo
```

## Components

### Web app

- [App entry](https://github.com/mxs8513/novalabs/blob/main/src/main.tsx): `src/main.tsx`
- [App router](https://github.com/mxs8513/novalabs/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Route table](https://github.com/mxs8513/novalabs/blob/main/src/app/routes.ts): `src/app/routes.ts`
- [App layout](https://github.com/mxs8513/novalabs/blob/main/src/app/components/Layout.tsx): `src/app/components/Layout.tsx`

### Student tools

- [Home search](https://github.com/mxs8513/novalabs/blob/main/src/app/components/Home.tsx): `src/app/components/Home.tsx`
- [Search results](https://github.com/mxs8513/novalabs/blob/main/src/app/components/Results.tsx): `src/app/components/Results.tsx`
- [Schedule](https://github.com/mxs8513/novalabs/blob/main/src/app/components/Schedule.tsx): `src/app/components/Schedule.tsx`
- [Campus map](https://github.com/mxs8513/novalabs/blob/main/src/app/components/CampusMap.tsx): `src/app/components/CampusMap.tsx`
- [Professor picker](https://github.com/mxs8513/novalabs/blob/main/src/app/components/ProfessorPick.tsx): `src/app/components/ProfessorPick.tsx`
- [Support routing](https://github.com/mxs8513/novalabs/blob/main/src/app/components/WhoDoIAsk.tsx): `src/app/components/WhoDoIAsk.tsx`
- [Degree planner](https://github.com/mxs8513/novalabs/blob/main/src/app/components/DegreePlanner.tsx): `src/app/components/DegreePlanner.tsx`
- [Login](https://github.com/mxs8513/novalabs/blob/main/src/app/components/Login.tsx): `src/app/components/Login.tsx`
- [Profile](https://github.com/mxs8513/novalabs/blob/main/src/app/components/Profile.tsx): `src/app/components/Profile.tsx`

### External services

- [Nebula API client](https://github.com/mxs8513/novalabs/blob/main/src/app/services/nebulaApi.ts): `src/app/services/nebulaApi.ts`
- [AI assistant](https://github.com/mxs8513/novalabs/blob/main/src/app/services/aiService.ts): `src/app/services/aiService.ts`
- [AI routing client](https://github.com/mxs8513/novalabs/blob/main/src/app/services/openaiRoutingApi.ts): `src/app/services/openaiRoutingApi.ts`
- **Nebula API**
- **OpenAI API**
- [Supabase client](https://github.com/mxs8513/novalabs/blob/main/src/utils/supabase/client.ts): `src/utils/supabase/client.ts`
- **Supabase service**

### Backend storage

- [Server function](https://github.com/mxs8513/novalabs/blob/main/supabase/functions/server/index.tsx): `supabase/functions/server/index.tsx`
- [Key-value store](https://github.com/mxs8513/novalabs/blob/main/supabase/functions/server/kv_store.tsx): `supabase/functions/server/kv_store.tsx`

### Other components

- **Student**

## Connections

- Student → App entry: opens app (evidence: `src/main.tsx`)
- App entry → App router: renders (evidence: `src/main.tsx`)
- App router → Route table: loads routes (evidence: `src/app/App.tsx`)
- Route table → App layout: routes to (evidence: `src/app/routes.ts`)
- Route table → Home search: routes to (evidence: `src/app/routes.ts`)
- Route table → Search results: routes to (evidence: `src/app/routes.ts`)
- Route table → Schedule: routes to (evidence: `src/app/routes.ts`)
- Route table → Campus map: routes to (evidence: `src/app/routes.ts`)
- Route table → Professor picker: routes to (evidence: `src/app/routes.ts`)
- Route table → Support routing: routes to (evidence: `src/app/routes.ts`)
- Route table → Degree planner: routes to (evidence: `src/app/routes.ts`)
- Route table → Login: routes to (evidence: `src/app/routes.ts`)
- Route table → Profile: routes to (evidence: `src/app/routes.ts`)
- Home search → Nebula API client: queries (evidence: `src/app/components/Home.tsx`)
- Search results → Nebula API client: searches (evidence: `src/app/components/Results.tsx`)
- Search results → AI assistant: asks (evidence: `src/app/components/Results.tsx`)
- Search results → Campus map: links to (evidence: `src/app/components/Results.tsx`)
- Search results → Schedule: links to (evidence: `src/app/components/Results.tsx`)
- Search results → Professor picker: links to (evidence: `src/app/components/Results.tsx`)
- Search results → Support routing: links to (evidence: `src/app/components/Results.tsx`)
- Search results → Degree planner: links to (evidence: `src/app/components/Results.tsx`)
- Professor picker → Nebula API client: queries (evidence: `src/app/components/ProfessorPick.tsx`)
- Support routing → AI routing client: routes query (evidence: `src/app/components/WhoDoIAsk.tsx`)
- Nebula API client → Nebula API: requests data (evidence: `src/app/services/nebulaApi.ts`)
- AI assistant → OpenAI API: requests completion (evidence: `src/app/services/aiService.ts`)
- AI routing client → OpenAI API: requests routing (evidence: `src/app/services/openaiRoutingApi.ts`)
- App layout → Supabase client: uses (evidence: `src/app/components/Layout.tsx`)
- Login → Supabase client: uses (evidence: `src/app/components/Login.tsx`)
- Profile → Supabase client: uses (evidence: `src/app/components/Profile.tsx`)
- Supabase client → Supabase service: connects to (evidence: `src/utils/supabase/client.ts`)
- Server function → Key-value store: uses store (evidence: `supabase/functions/server/index.tsx`)
