# utmist/misty architecture

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

- Interactive diagram: https://gitdiagram.com/utmist/misty
- Repository: https://github.com/utmist/misty

## Overview

UTMIST Ops Platform preserves organizational identity, teams, and institutional documents through HTTP services and a Discord frontend. Members link and verify identities, then use commands to browse or manage teams and documentation; admins can seed people and manage records. Separate services provide email verification, document fetching, LLM chat/embeddings, and live meeting transcription and minutes. The excerpts show Discord dispatch, document-ingest orchestration, and shared service authentication; other service internals are represented at their documented boundaries.

Main entry points: [`discord-bot/src/router.js`](https://github.com/utmist/misty/blob/staging/discord-bot/src/router.js) (Discord bot), [`packages/auth/platform_auth/factory.py`](https://github.com/utmist/misty/blob/staging/packages/auth/platform_auth/factory.py) (API-key auth), [`services/documentation-system/src/ingest.py`](https://github.com/utmist/misty/blob/staging/services/documentation-system/src/ingest.py) (URL ingestion), [`services/meeting/src/sessions.py`](https://github.com/utmist/misty/blob/staging/services/meeting/src/sessions.py) (Recording sessions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discord["Discord experience"]
  node_discord_bot["Discord bot<br/>[router.js]"]
  node_identity["Identity policy<br/>[policy.js]"]
  node_directory_client["Directory client<br/>[directoryClient.js]"]
  node_doc_commands["Document commands<br/>[docService.js]"]
  node_meeting_client["Bot meeting client<br/>[meetingClient.js]"]
end

subgraph group_directory_docs["Directory and knowledge"]
  node_team_tracking["People and teams API<br/>[teams.py]"]
  node_team_store[("Directory storage<br/>[postgres.py]")]
  node_docs_api["Documentation API<br/>[docs.py]"]
  node_doc_ingest["URL ingestion<br/>[ingest.py]"]
  node_fetch_registry["Source fetchers<br/>[registry.py]"]
  node_doc_storage[("Document storage<br/>[postgres.py]")]
end

subgraph group_integrations["Internal integrations"]
  node_connectors_api["Google fetch API<br/>[fetch.py]"]
  node_google_sources["Google sources<br/>[google.py]"]
  node_verification_api["Email verification API<br/>[verification.py]"]
  node_verification_store[("Verification codes<br/>[postgres.py]")]
  node_llm_api["Chat and embeddings<br/>[chat.py]"]
  node_llm_provider["LLM providers"]
end

subgraph group_meeting["Meeting workflow"]
  node_meeting_api["Meeting service<br/>[meetings.py]"]
  node_meeting_sessions["Recording sessions<br/>[sessions.py]"]
  node_transcription["Speech transcription<br/>[transcribe.py]"]
  node_minutes["Minutes generation<br/>[minutes.py]"]
end

subgraph group_auth["Shared authentication"]
  node_platform_auth["API-key auth<br/>[factory.py]"]
end

node_members(("Members and admins"))

node_members -->|"use commands"| node_discord_bot
node_discord_bot -->|"authorize requests"| node_identity
node_discord_bot -->|"resolve identity"| node_directory_client
node_directory_client -->|"request directory data"| node_team_tracking
node_discord_bot -->|"dispatch commands"| node_doc_commands
node_doc_commands -->|"manage documents"| node_docs_api
node_discord_bot -->|"verify email codes"| node_verification_api
node_discord_bot -->|"record meetings"| node_meeting_client
node_meeting_client -->|"send meeting requests"| node_meeting_api
node_team_tracking -.->|"persist records"| node_team_store
node_docs_api -->|"ingest URLs"| node_doc_ingest
node_doc_ingest -->|"fetch content"| node_fetch_registry
node_doc_ingest -->|"store documents"| node_doc_storage
node_fetch_registry -.->|"fetch Google sources"| node_connectors_api
node_connectors_api -->|"dispatch fetch"| node_google_sources
node_verification_api -.->|"persist codes"| node_verification_store
node_meeting_api -.->|"manage sessions"| node_meeting_sessions
node_meeting_sessions -.->|"transcribe audio"| node_transcription
node_meeting_sessions -.->|"generate minutes"| node_minutes
node_llm_api -.->|"invoke provider"| node_llm_provider
node_platform_auth -->|"authenticate API"| node_llm_api
node_platform_auth -->|"audit and authenticate"| node_team_tracking
node_platform_auth -->|"authenticate API"| node_docs_api
node_platform_auth -->|"authenticate API"| node_verification_api
node_platform_auth -->|"authenticate API"| node_connectors_api

click node_discord_bot "https://github.com/utmist/misty/blob/staging/discord-bot/src/router.js"
click node_identity "https://github.com/utmist/misty/blob/staging/discord-bot/src/auth/policy.js"
click node_directory_client "https://github.com/utmist/misty/blob/staging/discord-bot/src/clients/directoryClient.js"
click node_team_tracking "https://github.com/utmist/misty/blob/staging/services/team-tracking/src/api/routers/teams.py"
click node_team_store "https://github.com/utmist/misty/blob/staging/services/team-tracking/src/storage/postgres.py"
click node_doc_commands "https://github.com/utmist/misty/blob/staging/discord-bot/src/services/docService.js"
click node_docs_api "https://github.com/utmist/misty/blob/staging/services/documentation-system/src/api/routers/docs.py"
click node_doc_ingest "https://github.com/utmist/misty/blob/staging/services/documentation-system/src/ingest.py"
click node_fetch_registry "https://github.com/utmist/misty/blob/staging/services/documentation-system/src/fetch/registry.py"
click node_doc_storage "https://github.com/utmist/misty/blob/staging/services/documentation-system/src/storage/postgres.py"
click node_connectors_api "https://github.com/utmist/misty/blob/staging/services/connectors/src/api/routers/fetch.py"
click node_google_sources "https://github.com/utmist/misty/blob/staging/services/connectors/src/sources/google.py"
click node_verification_api "https://github.com/utmist/misty/blob/staging/services/verification/src/api/routers/verification.py"
click node_verification_store "https://github.com/utmist/misty/blob/staging/services/verification/src/storage/postgres.py"
click node_llm_api "https://github.com/utmist/misty/blob/staging/services/llm/src/api/routers/chat.py"
click node_llm_provider "https://github.com/utmist/misty/blob/staging/services/llm/src/providers/bedrock_converse.py"
click node_meeting_client "https://github.com/utmist/misty/blob/staging/discord-bot/src/meeting/meetingClient.js"
click node_meeting_api "https://github.com/utmist/misty/blob/staging/services/meeting/src/api/routers/meetings.py"
click node_meeting_sessions "https://github.com/utmist/misty/blob/staging/services/meeting/src/sessions.py"
click node_transcription "https://github.com/utmist/misty/blob/staging/services/meeting/src/stt/transcribe.py"
click node_minutes "https://github.com/utmist/misty/blob/staging/services/meeting/src/pipeline/minutes.py"
click node_platform_auth "https://github.com/utmist/misty/blob/staging/packages/auth/platform_auth/factory.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_discord_bot,node_identity,node_directory_client,node_doc_commands,node_meeting_client toneBlue
class node_team_tracking,node_team_store,node_docs_api,node_doc_ingest,node_fetch_registry,node_doc_storage toneAmber
class node_connectors_api,node_google_sources,node_verification_api,node_verification_store,node_llm_api,node_llm_provider toneMint
class node_meeting_api,node_meeting_sessions,node_transcription,node_minutes toneRose
class node_platform_auth,node_members toneIndigo
```

## Components

### Discord experience

- [Discord bot](https://github.com/utmist/misty/blob/staging/discord-bot/src/router.js): `discord-bot/src/router.js`
- [Identity policy](https://github.com/utmist/misty/blob/staging/discord-bot/src/auth/policy.js): `discord-bot/src/auth/policy.js`
- [Directory client](https://github.com/utmist/misty/blob/staging/discord-bot/src/clients/directoryClient.js): `discord-bot/src/clients/directoryClient.js`
- [Document commands](https://github.com/utmist/misty/blob/staging/discord-bot/src/services/docService.js): `discord-bot/src/services/docService.js`
- [Bot meeting client](https://github.com/utmist/misty/blob/staging/discord-bot/src/meeting/meetingClient.js): `discord-bot/src/meeting/meetingClient.js`

### Directory and knowledge

- [People and teams API](https://github.com/utmist/misty/blob/staging/services/team-tracking/src/api/routers/teams.py): `services/team-tracking/src/api/routers/teams.py`
- [Directory storage](https://github.com/utmist/misty/blob/staging/services/team-tracking/src/storage/postgres.py): `services/team-tracking/src/storage/postgres.py`
- [Documentation API](https://github.com/utmist/misty/blob/staging/services/documentation-system/src/api/routers/docs.py): `services/documentation-system/src/api/routers/docs.py`
- [URL ingestion](https://github.com/utmist/misty/blob/staging/services/documentation-system/src/ingest.py): `services/documentation-system/src/ingest.py`
- [Source fetchers](https://github.com/utmist/misty/blob/staging/services/documentation-system/src/fetch/registry.py): `services/documentation-system/src/fetch/registry.py`
- [Document storage](https://github.com/utmist/misty/blob/staging/services/documentation-system/src/storage/postgres.py): `services/documentation-system/src/storage/postgres.py`

### Internal integrations

- [Google fetch API](https://github.com/utmist/misty/blob/staging/services/connectors/src/api/routers/fetch.py): `services/connectors/src/api/routers/fetch.py`
- [Google sources](https://github.com/utmist/misty/blob/staging/services/connectors/src/sources/google.py): `services/connectors/src/sources/google.py`
- [Email verification API](https://github.com/utmist/misty/blob/staging/services/verification/src/api/routers/verification.py): `services/verification/src/api/routers/verification.py`
- [Verification codes](https://github.com/utmist/misty/blob/staging/services/verification/src/storage/postgres.py): `services/verification/src/storage/postgres.py`
- [Chat and embeddings](https://github.com/utmist/misty/blob/staging/services/llm/src/api/routers/chat.py): `services/llm/src/api/routers/chat.py`
- [LLM providers](https://github.com/utmist/misty/blob/staging/services/llm/src/providers/bedrock_converse.py): `services/llm/src/providers/bedrock_converse.py`

### Meeting workflow

- [Meeting service](https://github.com/utmist/misty/blob/staging/services/meeting/src/api/routers/meetings.py): `services/meeting/src/api/routers/meetings.py`
- [Recording sessions](https://github.com/utmist/misty/blob/staging/services/meeting/src/sessions.py): `services/meeting/src/sessions.py`
- [Speech transcription](https://github.com/utmist/misty/blob/staging/services/meeting/src/stt/transcribe.py): `services/meeting/src/stt/transcribe.py`
- [Minutes generation](https://github.com/utmist/misty/blob/staging/services/meeting/src/pipeline/minutes.py): `services/meeting/src/pipeline/minutes.py`

### Shared authentication

- [API-key auth](https://github.com/utmist/misty/blob/staging/packages/auth/platform_auth/factory.py): `packages/auth/platform_auth/factory.py`

### Other components

- **Members and admins**

## Connections

- Members and admins → Discord bot: use commands (evidence: `README.md`)
- Discord bot → Identity policy: authorize requests (evidence: `discord-bot/src/router.js`)
- Discord bot → Directory client: resolve identity (evidence: `discord-bot/src/router.js`)
- Directory client → People and teams API: request directory data (evidence: `README.md`)
- Discord bot → Document commands: dispatch commands (evidence: `README.md`)
- Document commands → Documentation API: manage documents (evidence: `README.md`)
- Discord bot → Email verification API: verify email codes (evidence: `README.md`)
- Discord bot → Bot meeting client: record meetings (evidence: `README.md`)
- Bot meeting client → Meeting service: send meeting requests (evidence: `README.md`)
- People and teams API → Directory storage: persist records
- Documentation API → URL ingestion: ingest URLs (evidence: `services/documentation-system/src/api/routers/docs.py`)
- URL ingestion → Source fetchers: fetch content (evidence: `services/documentation-system/src/ingest.py`)
- URL ingestion → Document storage: store documents (evidence: `services/documentation-system/src/ingest.py`)
- Source fetchers → Google fetch API: fetch Google sources
- Google fetch API → Google sources: dispatch fetch (evidence: `services/connectors/src/api/routers/fetch.py`)
- Email verification API → Verification codes: persist codes
- Meeting service → Recording sessions: manage sessions
- Recording sessions → Speech transcription: transcribe audio
- Recording sessions → Minutes generation: generate minutes
- Chat and embeddings → LLM providers: invoke provider
- API-key auth → Chat and embeddings: authenticate API
- API-key auth → People and teams API: audit and authenticate
- API-key auth → Documentation API: authenticate API
- API-key auth → Email verification API: authenticate API
- API-key auth → Google fetch API: authenticate API
