# brian7704/opentakserver architecture

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

- Interactive diagram: https://gitdiagram.com/brian7704/opentakserver
- Repository: https://github.com/brian7704/opentakserver

## Overview

OpenTAKServer is a TAK interoperability server. The principal workflow is: ATAK-family clients connect over TCP or TLS, handlers authenticate and publish CoT through RabbitMQ, the parser persists operational data and emits live updates to the WebUI. REST/MARTI APIs expose the same domain state, while certificate enrollment, Meshtastic, plugins, Mumble, LDAP, missions, packages, and video provide distinct capabilities. Some API registrations and consumers were inferred from documented structure; unsampled call paths are intentionally limited.

Main entry points: [`opentakserver/extensions.py`](https://github.com/brian7704/opentakserver/blob/master/opentakserver/extensions.py) (Operational Database), [`opentakserver/eud_handler/EudHandler.py`](https://github.com/brian7704/opentakserver/blob/master/opentakserver/eud_handler/EudHandler.py) (CoT Session Handler), [`opentakserver/models/user.py`](https://github.com/brian7704/opentakserver/blob/master/opentakserver/models/user.py) (User Authentication), [`opentakserver/cot_parser/cot_parser.py`](https://github.com/brian7704/opentakserver/blob/master/opentakserver/cot_parser/cot_parser.py) (CoT Parser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingress["Ingress and Transport"]
  node_app["Application Factory<br/>[app.py]"]
  node_eud_tcp["TCP EUD Server<br/>[eud_handler.py]"]
  node_eud_ssl["TLS EUD Handler<br/>[EudHandlerSSL.py]"]
  node_eud_handler["CoT Session Handler<br/>[EudHandler.py]"]
end

subgraph group_processing["CoT Processing and State"]
  node_cot_parser["CoT Parser<br/>[cot_parser.py]"]
  node_database[("Operational Database<br/>[extensions.py]")]
  node_socketio["Live SocketIO<br/>[extensions.py]"]
end

subgraph group_apis["APIs and Product Features"]
  node_marti_api["MARTI APIs<br/>[marti_api.py]"]
  node_ots_api["OTS APIs<br/>[api.py]"]
  node_mission_api["Mission API<br/>[mission_api.py]"]
  node_package_api["Package APIs<br/>[package_api.py]"]
  node_video_api["Video API<br/>[video_api.py]"]
end

subgraph group_integrations["External Integrations"]
  node_meshtastic_controller["Meshtastic Controller"]
  node_plugin_manager["Plugin Manager<br/>[PluginManager.py]"]
  node_mumble_auth["Mumble Authenticator"]
end

subgraph group_security["Identity and Certificates"]
  node_certificate_api["Certificate Enrollment"]
  node_certificate_authority["Certificate Authority"]
  node_auth_users["User Authentication<br/>[user.py]"]
end

node_tak_clients(("TAK Clients"))
node_web_ui(("WebUI"))
node_mumble(("Mumble Server"))
node_ldap["LDAP Directory"]
node_rabbitmq["RabbitMQ"]
node_mediamtx["MediaMTX"]
node_meshtastic(("Meshtastic Devices"))

node_app -->|"starts server"| node_eud_tcp
node_tak_clients -->|"sends CoT"| node_eud_tcp
node_tak_clients -->|"sends TLS CoT"| node_eud_ssl
node_eud_ssl -->|"extends handler"| node_eud_handler
node_eud_tcp -->|"dispatches sessions"| node_eud_handler
node_eud_handler -->|"authenticates users"| node_auth_users
node_eud_handler -->|"publishes CoT"| node_rabbitmq
node_rabbitmq -->|"dispatches CoT"| node_cot_parser
node_cot_parser -->|"stores state"| node_database
node_cot_parser -->|"emits updates"| node_socketio
node_socketio -->|"streams events"| node_web_ui
node_web_ui -->|"calls endpoints"| node_ots_api
node_web_ui -->|"calls endpoints"| node_marti_api
node_ots_api -->|"reads and writes"| node_database
node_marti_api -->|"reads and writes"| node_database
node_mission_api -->|"manages missions"| node_database
node_package_api -->|"manages packages"| node_database
node_video_api -->|"manages streams"| node_database
node_video_api -.->|"controls streaming"| node_mediamtx
node_certificate_api -->|"authenticates request"| node_auth_users
node_certificate_api -->|"signs certificates"| node_certificate_authority
node_meshtastic -->|"sends packets"| node_meshtastic_controller
node_meshtastic_controller -->|"publishes messages"| node_rabbitmq
node_meshtastic_controller -->|"stores points"| node_database
node_web_ui -->|"manages plugins"| node_plugin_manager
node_plugin_manager -->|"stores metadata"| node_database
node_mumble -.->|"authenticates login"| node_mumble_auth
node_mumble_auth -->|"checks credentials"| node_auth_users
node_auth_users -.->|"delegates identity"| node_ldap

click node_app "https://github.com/brian7704/opentakserver/blob/master/opentakserver/app.py"
click node_eud_tcp "https://github.com/brian7704/opentakserver/blob/master/opentakserver/eud_handler/eud_handler.py"
click node_eud_ssl "https://github.com/brian7704/opentakserver/blob/master/opentakserver/eud_handler/EudHandlerSSL.py"
click node_eud_handler "https://github.com/brian7704/opentakserver/blob/master/opentakserver/eud_handler/EudHandler.py"
click node_cot_parser "https://github.com/brian7704/opentakserver/blob/master/opentakserver/cot_parser/cot_parser.py"
click node_database "https://github.com/brian7704/opentakserver/blob/master/opentakserver/extensions.py"
click node_socketio "https://github.com/brian7704/opentakserver/blob/master/opentakserver/extensions.py"
click node_marti_api "https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/marti_api/marti_api.py"
click node_ots_api "https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/api.py"
click node_mission_api "https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/mission_api.py"
click node_package_api "https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/package_api.py"
click node_video_api "https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/video_api.py"
click node_certificate_api "https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/marti_api/certificate_enrollment_api.py"
click node_certificate_authority "https://github.com/brian7704/opentakserver/blob/master/opentakserver/certificate_authority.py"
click node_auth_users "https://github.com/brian7704/opentakserver/blob/master/opentakserver/models/user.py"
click node_meshtastic_controller "https://github.com/brian7704/opentakserver/blob/master/opentakserver/controllers/meshtastic_controller.py"
click node_plugin_manager "https://github.com/brian7704/opentakserver/blob/master/opentakserver/plugins/PluginManager.py"
click node_mumble_auth "https://github.com/brian7704/opentakserver/blob/master/opentakserver/mumble/mumble_authenticator.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_app,node_eud_tcp,node_eud_ssl,node_eud_handler,node_tak_clients,node_web_ui toneBlue
class node_cot_parser,node_database,node_socketio toneAmber
class node_marti_api,node_ots_api,node_mission_api,node_package_api,node_video_api,node_mumble toneMint
class node_meshtastic_controller,node_plugin_manager,node_mumble_auth toneRose
class node_certificate_api,node_certificate_authority,node_auth_users,node_ldap,node_rabbitmq,node_mediamtx,node_meshtastic toneIndigo
```

## Components

### Ingress and Transport

- [Application Factory](https://github.com/brian7704/opentakserver/blob/master/opentakserver/app.py): `opentakserver/app.py`
- [TCP EUD Server](https://github.com/brian7704/opentakserver/blob/master/opentakserver/eud_handler/eud_handler.py): `opentakserver/eud_handler/eud_handler.py`
- [TLS EUD Handler](https://github.com/brian7704/opentakserver/blob/master/opentakserver/eud_handler/EudHandlerSSL.py): `opentakserver/eud_handler/EudHandlerSSL.py`
- [CoT Session Handler](https://github.com/brian7704/opentakserver/blob/master/opentakserver/eud_handler/EudHandler.py): `opentakserver/eud_handler/EudHandler.py`

### CoT Processing and State

- [CoT Parser](https://github.com/brian7704/opentakserver/blob/master/opentakserver/cot_parser/cot_parser.py): `opentakserver/cot_parser/cot_parser.py`
- [Operational Database](https://github.com/brian7704/opentakserver/blob/master/opentakserver/extensions.py): `opentakserver/extensions.py`
- [Live SocketIO](https://github.com/brian7704/opentakserver/blob/master/opentakserver/extensions.py): `opentakserver/extensions.py`

### APIs and Product Features

- [MARTI APIs](https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/marti_api/marti_api.py): `opentakserver/blueprints/marti_api/marti_api.py`
- [OTS APIs](https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/api.py): `opentakserver/blueprints/ots_api/api.py`
- [Mission API](https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/mission_api.py): `opentakserver/blueprints/ots_api/mission_api.py`
- [Package APIs](https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/package_api.py): `opentakserver/blueprints/ots_api/package_api.py`
- [Video API](https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/ots_api/video_api.py): `opentakserver/blueprints/ots_api/video_api.py`

### External Integrations

- [Meshtastic Controller](https://github.com/brian7704/opentakserver/blob/master/opentakserver/controllers/meshtastic_controller.py): `opentakserver/controllers/meshtastic_controller.py`
- [Plugin Manager](https://github.com/brian7704/opentakserver/blob/master/opentakserver/plugins/PluginManager.py): `opentakserver/plugins/PluginManager.py`
- [Mumble Authenticator](https://github.com/brian7704/opentakserver/blob/master/opentakserver/mumble/mumble_authenticator.py): `opentakserver/mumble/mumble_authenticator.py`

### Identity and Certificates

- [Certificate Enrollment](https://github.com/brian7704/opentakserver/blob/master/opentakserver/blueprints/marti_api/certificate_enrollment_api.py): `opentakserver/blueprints/marti_api/certificate_enrollment_api.py`
- [Certificate Authority](https://github.com/brian7704/opentakserver/blob/master/opentakserver/certificate_authority.py): `opentakserver/certificate_authority.py`
- [User Authentication](https://github.com/brian7704/opentakserver/blob/master/opentakserver/models/user.py): `opentakserver/models/user.py`

### Other components

- **TAK Clients**
- **WebUI**
- **Mumble Server**
- **LDAP Directory**
- **RabbitMQ**
- **MediaMTX**
- **Meshtastic Devices**

## Connections

- Application Factory → TCP EUD Server: starts server
- TAK Clients → TCP EUD Server: sends CoT
- TAK Clients → TLS EUD Handler: sends TLS CoT
- TLS EUD Handler → CoT Session Handler: extends handler
- TCP EUD Server → CoT Session Handler: dispatches sessions
- CoT Session Handler → User Authentication: authenticates users
- CoT Session Handler → RabbitMQ: publishes CoT
- RabbitMQ → CoT Parser: dispatches CoT
- CoT Parser → Operational Database: stores state
- CoT Parser → Live SocketIO: emits updates
- Live SocketIO → WebUI: streams events
- WebUI → OTS APIs: calls endpoints
- WebUI → MARTI APIs: calls endpoints
- OTS APIs → Operational Database: reads and writes
- MARTI APIs → Operational Database: reads and writes
- Mission API → Operational Database: manages missions
- Package APIs → Operational Database: manages packages
- Video API → Operational Database: manages streams
- Video API → MediaMTX: controls streaming
- Certificate Enrollment → User Authentication: authenticates request
- Certificate Enrollment → Certificate Authority: signs certificates
- Meshtastic Devices → Meshtastic Controller: sends packets
- Meshtastic Controller → RabbitMQ: publishes messages
- Meshtastic Controller → Operational Database: stores points
- WebUI → Plugin Manager: manages plugins
- Plugin Manager → Operational Database: stores metadata
- Mumble Server → Mumble Authenticator: authenticates login
- Mumble Authenticator → User Authentication: checks credentials
- User Authentication → LDAP Directory: delegates identity
