# capstone-collaboration-group/monteai architecture

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

- Interactive diagram: https://gitdiagram.com/capstone-collaboration-group/monteai
- Repository: https://github.com/capstone-collaboration-group/monteai

## Overview

MonteAI is an institutional research assistant and thesis repository delivered through web, mobile, and desktop clients, backed by an ASP.NET API. Users authenticate and use thesis, research-group, schedule, announcement, and chat features; thesis submission and review form a central repository workflow. The server also provides the documented RAG assistant. The excerpts show selected client wiring, review handling, and persistence; other feature links are omitted or marked unverified where their implementation was not sampled.

Main entry points: [`apps/web/src/App.tsx`](https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/web/src/App.tsx) (Web app), [`server/Controllers/ChatController.cs`](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Controllers/ChatController.cs) (Assistant chat), [`apps/web/src/lib/authService.ts`](https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/web/src/lib/authService.ts) (Client authentication), [`server/Data/AppDbContext.cs`](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Data/AppDbContext.cs) (Application database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Client applications"]
  node_web["Web app<br/>[App.tsx]"]
  node_mobile["Mobile app<br/>[home.tsx]"]
  node_desktop["Desktop app<br/>[App.tsx]"]
end

subgraph group_shared["Shared client services"]
  node_client_auth["Client authentication<br/>[authService.ts]"]
  node_shared_api["API service package<br/>[client.ts]"]
end

subgraph group_domain["Research workflows"]
  node_thesis["Thesis repository"]
  node_submission["Thesis submission"]
  node_review["Review decisions"]
  node_groups["Research groups"]
  node_schedule["Defense schedules<br/>[scheduleService.ts]"]
  node_announcements["Announcements"]
  node_chat["Assistant chat<br/>[ChatController.cs]"]
end

subgraph group_server["API and services"]
  node_api["HTTP API<br/>[Program.cs]"]
  node_chat_service["Chat sessions"]
  node_review_service["Review service<br/>[ReviewService.cs]"]
  node_group_repository["Group repository"]
end

subgraph group_data_ai["Persistence and AI"]
  node_ai_agent["RAG agent"]
  node_retrieval["Retrieval models<br/>[Chunk.cs]"]
  node_database[("Application database<br/>[AppDbContext.cs]")]
end

node_user(("Research community"))

node_user -->|"uses"| node_web
node_user -->|"uses"| node_mobile
node_user -->|"uses"| node_desktop
node_web -->|"configures"| node_client_auth
node_desktop -->|"configures"| node_client_auth
node_client_auth -->|"uses"| node_shared_api
node_mobile -->|"registers profiles"| node_api
node_web -.->|"offers thesis access"| node_thesis
node_web -.->|"offers submission"| node_submission
node_web -.->|"offers groups"| node_groups
node_web -.->|"offers schedules"| node_schedule
node_web -.->|"offers announcements"| node_announcements
node_web -.->|"offers chat"| node_chat
node_api -->|"configures"| node_database
node_review -->|"calls"| node_review_service
node_review_service -.->|"persists reviews"| node_database
node_groups -->|"calls"| node_group_repository
node_group_repository -->|"queries"| node_database
node_chat -.->|"delegates"| node_chat_service
node_chat -.->|"uses RAG"| node_ai_agent
node_ai_agent -.->|"uses retrieval"| node_retrieval

click node_web "https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/web/src/App.tsx"
click node_mobile "https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/mobile/app/(tabs)/home.tsx"
click node_desktop "https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/desktop/src/App.tsx"
click node_client_auth "https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/web/src/lib/authService.ts"
click node_shared_api "https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/client.ts"
click node_thesis "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Controllers/ThesisController.cs"
click node_submission "https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/submission/submissionService.ts"
click node_review "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Controllers/ReviewController.cs"
click node_groups "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/User/ResearchGroupService.cs"
click node_schedule "https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/schedule/scheduleService.ts"
click node_announcements "https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/announcement/announcementService.ts"
click node_chat "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Controllers/ChatController.cs"
click node_api "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Program.cs"
click node_chat_service "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/Chat/ChatSessionService.cs"
click node_review_service "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/Theses/ReviewService.cs"
click node_group_repository "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Repositories/ResearchGroupRepository.cs"
click node_ai_agent "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/AI/MonteAiAgentService.cs"
click node_retrieval "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Models/Retrieval/Chunk.cs"
click node_database "https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Data/AppDbContext.cs"

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,node_mobile,node_desktop toneBlue
class node_client_auth,node_shared_api toneAmber
class node_thesis,node_submission,node_review,node_groups,node_schedule,node_announcements,node_chat toneMint
class node_api,node_chat_service,node_review_service,node_group_repository toneRose
class node_ai_agent,node_retrieval,node_database,node_user toneIndigo
```

## Components

### Client applications

- [Web app](https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/web/src/App.tsx): `apps/web/src/App.tsx`
- [Mobile app](https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/mobile/app/(tabs)/home.tsx): `apps/mobile/app/(tabs)/home.tsx`
- [Desktop app](https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/desktop/src/App.tsx): `apps/desktop/src/App.tsx`

### Shared client services

- [Client authentication](https://github.com/capstone-collaboration-group/monteai/blob/dev/apps/web/src/lib/authService.ts): `apps/web/src/lib/authService.ts`
- [API service package](https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/client.ts): `packages/api/src/client.ts`

### Research workflows

- [Thesis repository](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Controllers/ThesisController.cs): `server/Controllers/ThesisController.cs`
- [Thesis submission](https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/submission/submissionService.ts): `packages/api/src/submission/submissionService.ts`
- [Review decisions](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Controllers/ReviewController.cs): `server/Controllers/ReviewController.cs`
- [Research groups](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/User/ResearchGroupService.cs): `server/Services/User/ResearchGroupService.cs`
- [Defense schedules](https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/schedule/scheduleService.ts): `packages/api/src/schedule/scheduleService.ts`
- [Announcements](https://github.com/capstone-collaboration-group/monteai/blob/dev/packages/api/src/announcement/announcementService.ts): `packages/api/src/announcement/announcementService.ts`
- [Assistant chat](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Controllers/ChatController.cs): `server/Controllers/ChatController.cs`

### API and services

- [HTTP API](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Program.cs): `server/Program.cs`
- [Chat sessions](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/Chat/ChatSessionService.cs): `server/Services/Chat/ChatSessionService.cs`
- [Review service](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/Theses/ReviewService.cs): `server/Services/Theses/ReviewService.cs`
- [Group repository](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Repositories/ResearchGroupRepository.cs): `server/Repositories/ResearchGroupRepository.cs`

### Persistence and AI

- [RAG agent](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Services/AI/MonteAiAgentService.cs): `server/Services/AI/MonteAiAgentService.cs`
- [Retrieval models](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Models/Retrieval/Chunk.cs): `server/Models/Retrieval/Chunk.cs`
- [Application database](https://github.com/capstone-collaboration-group/monteai/blob/dev/server/Data/AppDbContext.cs): `server/Data/AppDbContext.cs`

### Other components

- **Research community**

## Connections

- Research community → Web app: uses
- Research community → Mobile app: uses
- Research community → Desktop app: uses
- Web app → Client authentication: configures (evidence: `apps/web/src/lib/authService.ts`)
- Desktop app → Client authentication: configures
- Client authentication → API service package: uses (evidence: `apps/web/src/lib/authService.ts`)
- Mobile app → HTTP API: registers profiles
- Web app → Thesis repository: offers thesis access (evidence: `apps/web/src/App.tsx`)
- Web app → Thesis submission: offers submission (evidence: `apps/web/src/App.tsx`)
- Web app → Research groups: offers groups (evidence: `apps/web/src/App.tsx`)
- Web app → Defense schedules: offers schedules (evidence: `apps/web/src/App.tsx`)
- Web app → Announcements: offers announcements (evidence: `apps/web/src/App.tsx`)
- Web app → Assistant chat: offers chat (evidence: `apps/web/src/App.tsx`)
- HTTP API → Application database: configures (evidence: `server/Program.cs`)
- Review decisions → Review service: calls (evidence: `server/Controllers/ReviewController.cs`)
- Review service → Application database: persists reviews
- Research groups → Group repository: calls (evidence: `server/Services/User/ResearchGroupService.cs`)
- Group repository → Application database: queries (evidence: `server/Repositories/ResearchGroupRepository.cs`)
- Assistant chat → Chat sessions: delegates
- Assistant chat → RAG agent: uses RAG
- RAG agent → Retrieval models: uses retrieval
