# wahabu14/tanzanitesat-v6 architecture

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

- Interactive diagram: https://gitdiagram.com/wahabu14/tanzanitesat-v6
- Repository: https://github.com/wahabu14/tanzanitesat-v6

## Overview

TANZANITESAT is a multi-operator CubeSat ground-station web application. Operators authenticate, take control, connect to a modem, and receive parsed and physics-enriched telemetry through live SSE updates; the system also records session CSVs and serves history and operational tools. The README documents distinct dashboard, telemetry, mapping, tracking, attitude, orbit, payload, logs, and administration capabilities. Some route and service implementations were not sampled, so the graph shows documented feature areas without inferring their internal wiring.

Main entry points: [`tansat/acquisition.py`](https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/acquisition.py) (Acquisition service), [`app/routes/api.py`](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/api.py) (Operations API), [`tansat/db.py`](https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/db.py) (Database access), [`app/routes/admin.py`](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/admin.py) (Admin routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_pages["Page routes<br/>[pages.py]"]
  node_views["Operational views"]
  node_stream_client["Live stream client<br/>[stream.js]"]
  node_charts["Telemetry charts<br/>[charts.js]"]
end

subgraph group_operations["Ground operations"]
  node_api["Operations API<br/>[api.py]"]
  node_admin["Admin routes<br/>[admin.py]"]
  node_acquisition["Acquisition service<br/>[acquisition.py]"]
end

subgraph group_domain["Telemetry processing"]
  node_parser["Wire parser<br/>[parser.py]"]
  node_physics["Physics algorithms<br/>[physics.py]"]
end

subgraph group_identity["Identity and records"]
  node_auth_routes["Login routes<br/>[auth.py]"]
  node_auth["Authentication<br/>[auth.py]"]
  node_db["Database access<br/>[db.py]"]
end

node_operator(("Operator"))
node_browser["Web browser"]
node_modem["Serial modem"]
node_postgres[("PostgreSQL")]
node_session_files["Session CSV files"]
node_firmware_files["Firmware uploads"]

node_operator -->|"uses"| node_browser
node_browser -->|"submits credentials"| node_auth_routes
node_auth_routes -->|"checks password"| node_auth
node_auth_routes -->|"reads and audits"| node_db
node_auth -->|"loads user"| node_db
node_browser -->|"requests pages"| node_pages
node_pages -->|"renders"| node_views
node_browser -->|"requests operations"| node_api
node_stream_client -->|"opens SSE"| node_api
node_api -->|"reads and controls"| node_acquisition
node_acquisition -->|"reads and writes"| node_modem
node_acquisition -->|"parses lines"| node_parser
node_acquisition -->|"derives telemetry"| node_physics
node_acquisition -->|"logs sessions"| node_session_files
node_api -->|"streams events"| node_browser
node_browser -->|"updates live views"| node_views
node_browser -->|"renders charts"| node_charts
node_admin -->|"manages settings and accounts"| node_db
node_admin -->|"syncs configuration"| node_acquisition
node_admin -->|"saves uploads"| node_firmware_files
node_api -->|"audits actions"| node_db
node_db -->|"reads and writes"| node_postgres

click node_pages "https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/pages.py"
click node_views "https://github.com/wahabu14/tanzanitesat-v6/tree/main/app/templates"
click node_stream_client "https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/static/js/stream.js"
click node_charts "https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/static/js/charts.js"
click node_api "https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/api.py"
click node_admin "https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/admin.py"
click node_acquisition "https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/acquisition.py"
click node_parser "https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/parser.py"
click node_physics "https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/physics.py"
click node_auth_routes "https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/auth.py"
click node_auth "https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/auth.py"
click node_db "https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/db.py"
click node_session_files "https://github.com/wahabu14/tanzanitesat-v6/tree/main/data"
click node_firmware_files "https://github.com/wahabu14/tanzanitesat-v6/tree/main/data"

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_pages,node_views,node_stream_client,node_charts,node_browser toneBlue
class node_api,node_admin,node_acquisition,node_postgres toneAmber
class node_parser,node_physics toneMint
class node_auth_routes,node_auth,node_db toneRose
class node_operator,node_modem toneIndigo
class node_session_files,node_firmware_files toneTeal
```

## Components

### Web experience

- [Page routes](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/pages.py): `app/routes/pages.py`
- [Operational views](https://github.com/wahabu14/tanzanitesat-v6/tree/main/app/templates): `app/templates`
- [Live stream client](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/static/js/stream.js): `app/static/js/stream.js`
- [Telemetry charts](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/static/js/charts.js): `app/static/js/charts.js`

### Ground operations

- [Operations API](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/api.py): `app/routes/api.py`
- [Admin routes](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/admin.py): `app/routes/admin.py`
- [Acquisition service](https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/acquisition.py): `tansat/acquisition.py`

### Telemetry processing

- [Wire parser](https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/parser.py): `tansat/parser.py`
- [Physics algorithms](https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/physics.py): `tansat/physics.py`

### Identity and records

- [Login routes](https://github.com/wahabu14/tanzanitesat-v6/blob/main/app/routes/auth.py): `app/routes/auth.py`
- [Authentication](https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/auth.py): `tansat/auth.py`
- [Database access](https://github.com/wahabu14/tanzanitesat-v6/blob/main/tansat/db.py): `tansat/db.py`

### Other components

- **Operator**
- **Web browser**
- **Serial modem**
- **PostgreSQL**
- [Session CSV files](https://github.com/wahabu14/tanzanitesat-v6/tree/main/data): `data`
- [Firmware uploads](https://github.com/wahabu14/tanzanitesat-v6/tree/main/data): `data`

## Connections

- Operator → Web browser: uses
- Web browser → Login routes: submits credentials
- Login routes → Authentication: checks password
- Login routes → Database access: reads and audits
- Authentication → Database access: loads user
- Web browser → Page routes: requests pages
- Page routes → Operational views: renders
- Web browser → Operations API: requests operations
- Live stream client → Operations API: opens SSE
- Operations API → Acquisition service: reads and controls
- Acquisition service → Serial modem: reads and writes
- Acquisition service → Wire parser: parses lines
- Acquisition service → Physics algorithms: derives telemetry
- Acquisition service → Session CSV files: logs sessions
- Operations API → Web browser: streams events
- Web browser → Operational views: updates live views
- Web browser → Telemetry charts: renders charts
- Admin routes → Database access: manages settings and accounts
- Admin routes → Acquisition service: syncs configuration
- Admin routes → Firmware uploads: saves uploads
- Operations API → Database access: audits actions
- Database access → PostgreSQL: reads and writes
