# reodite/reogent architecture

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

- Interactive diagram: https://gitdiagram.com/reodite/reogent
- Repository: https://github.com/reodite/reogent

## Overview

Reodite is a conversational campus-information and student-planning application. A student enters through the chat workspace; the chat API authenticates and validates the request, then streams an agent response that can use registered campus-data tools and persist the exchange. Separate tool workspaces support course lookup, prerequisite exploration, maps and routes, calendars, degree planning, and schedules. The README documents Postgres, Meilisearch, and multiple LLM providers. Some feature routes and integrations are unsampled, so links to them are included only where the README or indexed references support them.

Main entry points: [`app/api/chat/route.ts`](https://github.com/reodite/reogent/blob/main/app/api/chat/route.ts) (Chat endpoint), [`src/server/search.ts`](https://github.com/reodite/reogent/blob/main/src/server/search.ts) (Campus search), [`app/api/courses/route.ts`](https://github.com/reodite/reogent/blob/main/app/api/courses/route.ts) (Course search API), [`app/api/schedule/route.ts`](https://github.com/reodite/reogent/blob/main/app/api/schedule/route.ts) (Saved schedules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversation["Chat and agent"]
  node_chat_ui["Chat workspace<br/>[chat-panel.tsx]"]
  node_chat_api["Chat endpoint<br/>[route.ts]"]
  node_agent_stream["Agent streaming<br/>[stream.ts]"]
  node_tool_registry["Campus tools<br/>[index.ts]"]
  node_llm_adapters["LLM adapters<br/>[index.ts]"]
end

subgraph group_campus["Campus information"]
  node_course_lookup["Course lookup"]
  node_course_search_api["Course search API<br/>[route.ts]"]
  node_campus_map["Campus map<br/>[campus-map.tsx]"]
  node_route_api["Walking routes<br/>[route.ts]"]
  node_calendar_api["Campus calendar<br/>[route.ts]"]
end

subgraph group_planning["Student planning"]
  node_prereq_tree["Prerequisite explorer"]
  node_degree_planner["Degree planner"]
  node_schedule_planner["Schedule planner"]
  node_schedule_api["Saved schedules<br/>[route.ts]"]
  node_pulse["Pulse community<br/>[pulse-feed.tsx]"]
end

subgraph group_platform["Identity and data"]
  node_auth["JWT authentication<br/>[auth.ts]"]
  node_sessions[("Chat sessions<br/>[store.ts]")]
  node_search[("Campus search<br/>[search.ts]")]
  node_postgres[("Postgres")]
  node_meilisearch[("Meilisearch")]
end

node_student(("Student"))
node_llm_provider{{"LLM providers"}}

node_student -->|"asks questions"| node_chat_ui
node_chat_ui -.->|"sends chat"| node_chat_api
node_chat_api -->|"authenticates"| node_auth
node_chat_api -->|"streams through"| node_agent_stream
node_chat_api -->|"loads tools"| node_tool_registry
node_agent_stream -.->|"generates with"| node_llm_adapters
node_llm_adapters -.->|"calls model"| node_llm_provider
node_chat_api -->|"persists exchanges"| node_sessions
node_tool_registry -.->|"queries datasets"| node_search
node_search -->|"searches indexes"| node_meilisearch
node_student -->|"explores courses"| node_course_lookup
node_course_lookup -.->|"searches courses"| node_course_search_api
node_course_search_api -->|"authenticates"| node_auth
node_course_search_api -->|"queries courses"| node_search
node_student -->|"explores campus"| node_campus_map
node_campus_map -.->|"requests route"| node_route_api
node_student -->|"views dates"| node_calendar_api
node_calendar_api -->|"reads event indexes"| node_search
node_student -->|"checks prerequisites"| node_prereq_tree
node_student -.->|"plans degree"| node_degree_planner
node_student -->|"builds schedule"| node_schedule_planner
node_schedule_planner -.->|"saves schedule"| node_schedule_api
node_schedule_api -->|"authenticates"| node_auth
node_schedule_api -.->|"stores schedule"| node_postgres
node_student -.->|"shares feedback"| node_pulse
node_sessions -->|"stores sessions"| node_postgres

click node_chat_ui "https://github.com/reodite/reogent/blob/main/src/components/chat/chat-panel.tsx"
click node_chat_api "https://github.com/reodite/reogent/blob/main/app/api/chat/route.ts"
click node_agent_stream "https://github.com/reodite/reogent/blob/main/src/server/agent/stream.ts"
click node_tool_registry "https://github.com/reodite/reogent/blob/main/src/server/modules/index.ts"
click node_llm_adapters "https://github.com/reodite/reogent/blob/main/src/server/llm/index.ts"
click node_course_lookup "https://github.com/reodite/reogent/blob/main/src/components/course-lookup/course-lookup-pane.tsx"
click node_course_search_api "https://github.com/reodite/reogent/blob/main/app/api/courses/route.ts"
click node_campus_map "https://github.com/reodite/reogent/blob/main/src/components/map/campus-map.tsx"
click node_route_api "https://github.com/reodite/reogent/blob/main/app/api/route/route.ts"
click node_calendar_api "https://github.com/reodite/reogent/blob/main/app/api/calendar/route.ts"
click node_prereq_tree "https://github.com/reodite/reogent/blob/main/src/components/prereq-tree/prereq-tree-pane.tsx"
click node_degree_planner "https://github.com/reodite/reogent/blob/main/src/components/degree-planner/degree-planner-pane.tsx"
click node_schedule_planner "https://github.com/reodite/reogent/blob/main/src/components/schedule-planner/schedule-planner-pane.tsx"
click node_schedule_api "https://github.com/reodite/reogent/blob/main/app/api/schedule/route.ts"
click node_pulse "https://github.com/reodite/reogent/blob/main/src/components/pulse/pulse-feed.tsx"
click node_auth "https://github.com/reodite/reogent/blob/main/src/server/auth.ts"
click node_sessions "https://github.com/reodite/reogent/blob/main/src/server/sessions/store.ts"
click node_search "https://github.com/reodite/reogent/blob/main/src/server/search.ts"

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_chat_ui,node_chat_api,node_agent_stream,node_tool_registry,node_llm_adapters toneBlue
class node_course_lookup,node_course_search_api,node_campus_map,node_route_api,node_calendar_api toneAmber
class node_prereq_tree,node_degree_planner,node_schedule_planner,node_schedule_api,node_pulse toneMint
class node_auth,node_sessions,node_search,node_postgres,node_meilisearch toneRose
class node_student,node_llm_provider toneIndigo
```

## Components

### Chat and agent

- [Chat workspace](https://github.com/reodite/reogent/blob/main/src/components/chat/chat-panel.tsx): `src/components/chat/chat-panel.tsx`
- [Chat endpoint](https://github.com/reodite/reogent/blob/main/app/api/chat/route.ts): `app/api/chat/route.ts`
- [Agent streaming](https://github.com/reodite/reogent/blob/main/src/server/agent/stream.ts): `src/server/agent/stream.ts`
- [Campus tools](https://github.com/reodite/reogent/blob/main/src/server/modules/index.ts): `src/server/modules/index.ts`
- [LLM adapters](https://github.com/reodite/reogent/blob/main/src/server/llm/index.ts): `src/server/llm/index.ts`

### Campus information

- [Course lookup](https://github.com/reodite/reogent/blob/main/src/components/course-lookup/course-lookup-pane.tsx): `src/components/course-lookup/course-lookup-pane.tsx`
- [Course search API](https://github.com/reodite/reogent/blob/main/app/api/courses/route.ts): `app/api/courses/route.ts`
- [Campus map](https://github.com/reodite/reogent/blob/main/src/components/map/campus-map.tsx): `src/components/map/campus-map.tsx`
- [Walking routes](https://github.com/reodite/reogent/blob/main/app/api/route/route.ts): `app/api/route/route.ts`
- [Campus calendar](https://github.com/reodite/reogent/blob/main/app/api/calendar/route.ts): `app/api/calendar/route.ts`

### Student planning

- [Prerequisite explorer](https://github.com/reodite/reogent/blob/main/src/components/prereq-tree/prereq-tree-pane.tsx): `src/components/prereq-tree/prereq-tree-pane.tsx`
- [Degree planner](https://github.com/reodite/reogent/blob/main/src/components/degree-planner/degree-planner-pane.tsx): `src/components/degree-planner/degree-planner-pane.tsx`
- [Schedule planner](https://github.com/reodite/reogent/blob/main/src/components/schedule-planner/schedule-planner-pane.tsx): `src/components/schedule-planner/schedule-planner-pane.tsx`
- [Saved schedules](https://github.com/reodite/reogent/blob/main/app/api/schedule/route.ts): `app/api/schedule/route.ts`
- [Pulse community](https://github.com/reodite/reogent/blob/main/src/components/pulse/pulse-feed.tsx): `src/components/pulse/pulse-feed.tsx`

### Identity and data

- [JWT authentication](https://github.com/reodite/reogent/blob/main/src/server/auth.ts): `src/server/auth.ts`
- [Chat sessions](https://github.com/reodite/reogent/blob/main/src/server/sessions/store.ts): `src/server/sessions/store.ts`
- [Campus search](https://github.com/reodite/reogent/blob/main/src/server/search.ts): `src/server/search.ts`
- **Postgres**
- **Meilisearch**

### Other components

- **Student**
- **LLM providers**

## Connections

- Student → Chat workspace: asks questions
- Chat workspace → Chat endpoint: sends chat
- Chat endpoint → JWT authentication: authenticates (evidence: `app/api/chat/route.ts`)
- Chat endpoint → Agent streaming: streams through (evidence: `app/api/chat/route.ts`)
- Chat endpoint → Campus tools: loads tools (evidence: `app/api/chat/route.ts`)
- Agent streaming → LLM adapters: generates with
- LLM adapters → LLM providers: calls model
- Chat endpoint → Chat sessions: persists exchanges (evidence: `app/api/chat/route.ts`)
- Campus tools → Campus search: queries datasets
- Campus search → Meilisearch: searches indexes
- Student → Course lookup: explores courses
- Course lookup → Course search API: searches courses
- Course search API → JWT authentication: authenticates (evidence: `app/api/courses/route.ts`)
- Course search API → Campus search: queries courses (evidence: `app/api/courses/route.ts`)
- Student → Campus map: explores campus
- Campus map → Walking routes: requests route
- Student → Campus calendar: views dates
- Campus calendar → Campus search: reads event indexes (evidence: `app/api/calendar/route.ts`)
- Student → Prerequisite explorer: checks prerequisites
- Student → Degree planner: plans degree
- Student → Schedule planner: builds schedule
- Schedule planner → Saved schedules: saves schedule
- Saved schedules → JWT authentication: authenticates (evidence: `app/api/schedule/route.ts`)
- Saved schedules → Postgres: stores schedule
- Student → Pulse community: shares feedback
- Chat sessions → Postgres: stores sessions
