# lukasmacalusso/uct-map architecture

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

- Interactive diagram: https://gitdiagram.com/lukasmacalusso/uct-map
- Repository: https://github.com/lukasmacalusso/uct-map

## Overview

UCT Map is a campus platform spanning a React web client and .NET microservices. The user-facing workflow begins in the web app, where routed views expose campus mapping, incident and lost-item reporting, and academic scheduling; API services then handle those domain requests. Campus management also supports administrative editing, while Identity provides authentication and roles. The README documents mobile support and map navigation, but the supplied mobile tree contains platform runners rather than product screens. Several backend persistence and gateway-routing connections are not shown in sampled source, so those links are omitted or marked unverified.

Main entry points: [`src/frontend/src/router/AppRouter.tsx`](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/router/AppRouter.tsx) (Feature routes), [`src/backend/ApiGateway/ApiGateway.API/Program.cs`](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/ApiGateway/ApiGateway.API/Program.cs) (API gateway), [`src/backend/Services/Campus/Campus.Application/Handlers`](https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Campus/Campus.Application/Handlers) (Campus handlers), [`src/frontend/src/api/httpClient.ts`](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/api/httpClient.ts) (HTTP client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web client"]
  node_webapp["Web application<br/>[App.tsx]"]
  node_routes["Feature routes<br/>[AppRouter.tsx]"]
  node_map["Interactive map<br/>[ShowcaseView.tsx]"]
  node_webfeatures["Reports, objects, contacts, schedule"]
  node_editor["Map editor"]
  node_api["HTTP client<br/>[httpClient.ts]"]
  node_authclient["Authentication client<br/>[authService.ts]"]
  node_campusclient["Campus client and queries<br/>[useCampus.ts]"]
end

subgraph group_gateway["API gateway"]
  node_gatewayapp["API gateway<br/>[Program.cs]"]
end

subgraph group_identity["Identity service"]
  node_identityapi["Identity endpoints"]
  node_identityhandlers["Login, registration, roles<br/>[Handlers]"]
  node_identitydata["Users and roles<br/>[User.cs]"]
end

subgraph group_campus["Campus service"]
  node_campusapi["Campus API"]
  node_campushandlers["Campus handlers<br/>[Handlers]"]
  node_campusdomain["Campus map domain<br/>[Campus.cs]"]
  node_campusstore[("Campus database<br/>[CampusDbContext.cs]")]
end

subgraph group_incident["Incident service"]
  node_incidentapi["Reports and lost-item APIs<br/>[Controllers]"]
  node_incidenthandlers["Incident handlers<br/>[Handlers]"]
  node_incidentstore[("Incident MongoDB<br/>[MongoDbContext.cs]")]
end

subgraph group_schedule["Schedule service"]
  node_scheduleapi["Schedule API"]
  node_schedulehandlers["Meeting and office-hour handlers<br/>[Handlers]"]
  node_schedulestore[("Schedule database")]
end

node_users(("Campus users"))
node_mobile["Mobile app"]

node_users -->|"use"| node_webapp
node_webapp -.->|"renders"| node_routes
node_routes -->|"routes to"| node_map
node_routes -->|"routes to"| node_webfeatures
node_routes -->|"routes to"| node_editor
node_routes -.->|"login flow"| node_authclient
node_campusclient -->|"sends requests"| node_api
node_authclient -->|"sends requests"| node_api
node_api -->|"sends API calls"| node_gatewayapp
node_gatewayapp -.->|"routes requests"| node_identityapi
node_gatewayapp -.->|"routes requests"| node_campusapi
node_gatewayapp -.->|"routes requests"| node_incidentapi
node_gatewayapp -.->|"routes requests"| node_scheduleapi
node_identityapi -->|"executes"| node_identityhandlers
node_identityhandlers -->|"uses"| node_identitydata
node_campusapi -->|"calls"| node_campushandlers
node_campushandlers -.->|"uses"| node_campusdomain
node_campushandlers -.->|"persists via"| node_campusstore
node_incidentapi -->|"dispatches to"| node_incidenthandlers
node_incidenthandlers -.->|"persists via"| node_incidentstore
node_scheduleapi -->|"calls"| node_schedulehandlers
node_schedulehandlers -.->|"persists via"| node_schedulestore
node_users -->|"use"| node_mobile

click node_webapp "https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/App.tsx"
click node_routes "https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/router/AppRouter.tsx"
click node_map "https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/views/ShowcaseView.tsx"
click node_webfeatures "https://github.com/lukasmacalusso/uct-map/tree/main/src/frontend/src/views"
click node_editor "https://github.com/lukasmacalusso/uct-map/tree/main/src/frontend/src/views/editor"
click node_api "https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/api/httpClient.ts"
click node_authclient "https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/services/authService.ts"
click node_campusclient "https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/hooks/useCampus.ts"
click node_gatewayapp "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/ApiGateway/ApiGateway.API/Program.cs"
click node_identityapi "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Identity/Identity.API/Controllers/IdentityController.cs"
click node_identityhandlers "https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Identity/Identity.Application/Handlers"
click node_identitydata "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Identity/Identity.Domain/Entities/User.cs"
click node_campusapi "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Campus/Campus.API/Controllers/BuildingController.cs"
click node_campushandlers "https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Campus/Campus.Application/Handlers"
click node_campusdomain "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Campus/Campus.Domain/Entities/Campus.cs"
click node_campusstore "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Campus/Campus.Infrastructure/Persistence/CampusDbContext.cs"
click node_incidentapi "https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Incident/Incident.API/Controllers"
click node_incidenthandlers "https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Incident/Incident.Application/Handlers"
click node_incidentstore "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Incident/Incident.Infrastructure/Persistence/MongoDbContext.cs"
click node_scheduleapi "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Schedule/Schedule.API/Controllers/MeetingsController.cs"
click node_schedulehandlers "https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Schedule/Schedule.Application/Handlers"
click node_schedulestore "https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Schedule/Schedule.Infrastructure/Persistence/ScheduleDbContext.cs"
click node_mobile "https://github.com/lukasmacalusso/uct-map/tree/main/src/mobile"

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_webapp,node_routes,node_map,node_webfeatures,node_editor,node_api,node_authclient,node_campusclient,node_users toneBlue
class node_gatewayapp toneAmber
class node_identityapi,node_identityhandlers,node_identitydata toneMint
class node_campusapi,node_campushandlers,node_campusdomain,node_campusstore toneRose
class node_incidentapi,node_incidenthandlers,node_incidentstore toneIndigo
class node_scheduleapi,node_schedulehandlers,node_schedulestore,node_mobile toneTeal
```

## Components

### Web client

- [Web application](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/App.tsx): `src/frontend/src/App.tsx`
- [Feature routes](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/router/AppRouter.tsx): `src/frontend/src/router/AppRouter.tsx`
- [Interactive map](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/views/ShowcaseView.tsx): `src/frontend/src/views/ShowcaseView.tsx`
- [Reports, objects, contacts, schedule](https://github.com/lukasmacalusso/uct-map/tree/main/src/frontend/src/views): `src/frontend/src/views`
- [Map editor](https://github.com/lukasmacalusso/uct-map/tree/main/src/frontend/src/views/editor): `src/frontend/src/views/editor`
- [HTTP client](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/api/httpClient.ts): `src/frontend/src/api/httpClient.ts`
- [Authentication client](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/services/authService.ts): `src/frontend/src/services/authService.ts`
- [Campus client and queries](https://github.com/lukasmacalusso/uct-map/blob/main/src/frontend/src/hooks/useCampus.ts): `src/frontend/src/hooks/useCampus.ts`

### API gateway

- [API gateway](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/ApiGateway/ApiGateway.API/Program.cs): `src/backend/ApiGateway/ApiGateway.API/Program.cs`

### Identity service

- [Identity endpoints](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Identity/Identity.API/Controllers/IdentityController.cs): `src/backend/Services/Identity/Identity.API/Controllers/IdentityController.cs`
- [Login, registration, roles](https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Identity/Identity.Application/Handlers): `src/backend/Services/Identity/Identity.Application/Handlers`
- [Users and roles](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Identity/Identity.Domain/Entities/User.cs): `src/backend/Services/Identity/Identity.Domain/Entities/User.cs`

### Campus service

- [Campus API](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Campus/Campus.API/Controllers/BuildingController.cs): `src/backend/Services/Campus/Campus.API/Controllers/BuildingController.cs`
- [Campus handlers](https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Campus/Campus.Application/Handlers): `src/backend/Services/Campus/Campus.Application/Handlers`
- [Campus map domain](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Campus/Campus.Domain/Entities/Campus.cs): `src/backend/Services/Campus/Campus.Domain/Entities/Campus.cs`
- [Campus database](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Campus/Campus.Infrastructure/Persistence/CampusDbContext.cs): `src/backend/Services/Campus/Campus.Infrastructure/Persistence/CampusDbContext.cs`

### Incident service

- [Reports and lost-item APIs](https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Incident/Incident.API/Controllers): `src/backend/Services/Incident/Incident.API/Controllers`
- [Incident handlers](https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Incident/Incident.Application/Handlers): `src/backend/Services/Incident/Incident.Application/Handlers`
- [Incident MongoDB](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Incident/Incident.Infrastructure/Persistence/MongoDbContext.cs): `src/backend/Services/Incident/Incident.Infrastructure/Persistence/MongoDbContext.cs`

### Schedule service

- [Schedule API](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Schedule/Schedule.API/Controllers/MeetingsController.cs): `src/backend/Services/Schedule/Schedule.API/Controllers/MeetingsController.cs`
- [Meeting and office-hour handlers](https://github.com/lukasmacalusso/uct-map/tree/main/src/backend/Services/Schedule/Schedule.Application/Handlers): `src/backend/Services/Schedule/Schedule.Application/Handlers`
- [Schedule database](https://github.com/lukasmacalusso/uct-map/blob/main/src/backend/Services/Schedule/Schedule.Infrastructure/Persistence/ScheduleDbContext.cs): `src/backend/Services/Schedule/Schedule.Infrastructure/Persistence/ScheduleDbContext.cs`

### Other components

- **Campus users**
- [Mobile app](https://github.com/lukasmacalusso/uct-map/tree/main/src/mobile): `src/mobile`

## Connections

- Campus users → Web application: use (evidence: `README.md`)
- Web application → Feature routes: renders
- Feature routes → Interactive map: routes to (evidence: `src/frontend/src/router/AppRouter.tsx`)
- Feature routes → Reports, objects, contacts, schedule: routes to (evidence: `src/frontend/src/router/AppRouter.tsx`)
- Feature routes → Map editor: routes to (evidence: `src/frontend/src/router/AppRouter.tsx`)
- Feature routes → Authentication client: login flow
- Campus client and queries → HTTP client: sends requests
- Authentication client → HTTP client: sends requests (evidence: `src/frontend/src/services/authService.ts`)
- HTTP client → API gateway: sends API calls (evidence: `README.md`)
- API gateway → Identity endpoints: routes requests
- API gateway → Campus API: routes requests
- API gateway → Reports and lost-item APIs: routes requests
- API gateway → Schedule API: routes requests
- Identity endpoints → Login, registration, roles: executes (evidence: `src/backend/Services/Identity/Identity.API/Controllers/IdentityController.cs`)
- Login, registration, roles → Users and roles: uses (evidence: `src/backend/Services/Identity/Identity.API/Controllers/IdentityController.cs`)
- Campus API → Campus handlers: calls (evidence: `src/backend/Services/Campus/Campus.API/Controllers/BuildingController.cs`)
- Campus handlers → Campus map domain: uses (evidence: `src/backend/Services/Campus/Campus.Application/Handlers/BuildingHandler.cs`)
- Campus handlers → Campus database: persists via
- Reports and lost-item APIs → Incident handlers: dispatches to (evidence: `src/backend/Services/Incident/Incident.API/Controllers/LostObjectsController.cs`)
- Incident handlers → Incident MongoDB: persists via
- Schedule API → Meeting and office-hour handlers: calls (evidence: `src/backend/Services/Schedule/Schedule.API/Controllers/MeetingsController.cs`)
- Meeting and office-hour handlers → Schedule database: persists via
- Campus users → Mobile app: use (evidence: `README.md`)
