# mathewmusango/emuplane architecture

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

- Interactive diagram: https://gitdiagram.com/mathewmusango/emuplane
- Repository: https://github.com/mathewmusango/emuplane

## Overview

Emuplane is a console, control API, and AWS-compatible gateway in front of an emulator—not an emulator itself. The main workflow is to sign in, choose an account and region, manage S3/IAM resources through the console’s control API, or send AWS-compatible requests through the gateway to the emulator. The control also owns account and access-key data in emulator-hosted DynamoDB. README statements establish the product boundaries; source excerpts and the index identify the UI and control modules, but do not expose all server-side dispatch details.

Main entry points: [`web/src/App.jsx`](https://github.com/mathewmusango/emuplane/blob/main/web/src/App.jsx) (Console routes), [`control/app.py`](https://github.com/mathewmusango/emuplane/blob/main/control/app.py) (Control API), [`web/src/api.ts`](https://github.com/mathewmusango/emuplane/blob/main/web/src/api.ts) (Control API client), [`web/src/context.jsx`](https://github.com/mathewmusango/emuplane/blob/main/web/src/context.jsx) (Session context)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Console"]
  node_web_app["Console routes<br/>[App.jsx]"]
  node_session["Session context<br/>[context.jsx]"]
  node_shell["Console shell<br/>[Shell.jsx]"]
  node_api_client["Control API client<br/>[api.ts]"]
  node_services["Service navigation<br/>[Services.jsx]"]
  node_catalogue["Service catalogue"]
  node_s3_pages["S3 management<br/>[BucketDetail.jsx]"]
  node_access_pages["Access points<br/>[AccessPoints.jsx]"]
  node_iam_pages["IAM management<br/>[IAMSection.jsx]"]
  node_sign_in["Sign-in<br/>[SignIn.jsx]"]
end

subgraph group_control["Control plane"]
  node_control_app["Control API<br/>[app.py]"]
  node_console_ops["AWS operations<br/>[console.py]"]
  node_bucket_ops["Bucket operations<br/>[buckets.py]"]
  node_access_ops["Access-point operations<br/>[accesspoints.py]"]
end

subgraph group_gateway["AWS gateway"]
  node_gateway_app["AWS gateway<br/>[app.py]"]
  node_backend["Backend routing<br/>[backends.py]"]
  node_signature["Request signing<br/>[signed.py]"]
end

subgraph group_state["Control state"]
  node_dynamo["DynamoDB access<br/>[dynamo.py]"]
  node_store[("Control records<br/>[store.py]")]
end

subgraph group_setup["First setup"]
  node_bootstrap["Table bootstrap<br/>[apply.py]"]
end

node_operator(("Console user"))
node_aws_client(("AWS client"))
node_emulator["AWS emulator"]

node_operator -->|"uses"| node_web_app
node_web_app -->|"provides session"| node_session
node_web_app -->|"routes to"| node_services
node_web_app -->|"routes to"| node_s3_pages
node_web_app -->|"routes to"| node_access_pages
node_web_app -->|"routes to"| node_iam_pages
node_web_app -->|"routes to"| node_sign_in
node_session -->|"fetches metadata"| node_api_client
node_services -->|"groups services"| node_catalogue
node_s3_pages -->|"requests S3 data"| node_api_client
node_access_pages -->|"requests access points"| node_api_client
node_iam_pages -->|"requests IAM data"| node_api_client
node_api_client -->|"calls control API"| node_control_app
node_sign_in -->|"signs in"| node_control_app
node_aws_client -->|"sends AWS requests"| node_gateway_app
node_gateway_app -->|"forwards requests"| node_emulator
node_control_app -->|"uses emulator"| node_emulator
node_bootstrap -->|"creates tables"| node_emulator
node_control_app -.->|"serves operations"| node_console_ops
node_control_app -.->|"handles buckets"| node_bucket_ops
node_control_app -.->|"handles access points"| node_access_ops
node_gateway_app -.->|"routes via"| node_backend
node_gateway_app -.->|"verifies signatures"| node_signature
node_control_app -.->|"persists control data"| node_store
node_store -.->|"uses"| node_dynamo
node_dynamo -.->|"reads and writes"| node_emulator

click node_web_app "https://github.com/mathewmusango/emuplane/blob/main/web/src/App.jsx"
click node_session "https://github.com/mathewmusango/emuplane/blob/main/web/src/context.jsx"
click node_shell "https://github.com/mathewmusango/emuplane/blob/main/web/src/components/Shell.jsx"
click node_api_client "https://github.com/mathewmusango/emuplane/blob/main/web/src/api.ts"
click node_services "https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/Services.jsx"
click node_catalogue "https://github.com/mathewmusango/emuplane/blob/main/web/src/serviceCatalogue.js"
click node_s3_pages "https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/BucketDetail.jsx"
click node_access_pages "https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/AccessPoints.jsx"
click node_iam_pages "https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/IAMSection.jsx"
click node_sign_in "https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/SignIn.jsx"
click node_control_app "https://github.com/mathewmusango/emuplane/blob/main/control/app.py"
click node_console_ops "https://github.com/mathewmusango/emuplane/blob/main/control/console.py"
click node_bucket_ops "https://github.com/mathewmusango/emuplane/blob/main/control/buckets.py"
click node_access_ops "https://github.com/mathewmusango/emuplane/blob/main/control/accesspoints.py"
click node_gateway_app "https://github.com/mathewmusango/emuplane/blob/main/control/app.py"
click node_backend "https://github.com/mathewmusango/emuplane/blob/main/control/backends.py"
click node_signature "https://github.com/mathewmusango/emuplane/blob/main/control/signed.py"
click node_dynamo "https://github.com/mathewmusango/emuplane/blob/main/control/dynamo.py"
click node_store "https://github.com/mathewmusango/emuplane/blob/main/control/store.py"
click node_bootstrap "https://github.com/mathewmusango/emuplane/blob/main/bootstrap/apply.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_web_app,node_session,node_shell,node_api_client,node_services,node_catalogue,node_s3_pages,node_access_pages,node_iam_pages,node_sign_in,node_operator,node_aws_client toneBlue
class node_control_app,node_console_ops,node_bucket_ops,node_access_ops toneAmber
class node_gateway_app,node_backend,node_signature toneMint
class node_dynamo,node_store toneRose
class node_bootstrap,node_emulator toneIndigo
```

## Components

### Console

- [Console routes](https://github.com/mathewmusango/emuplane/blob/main/web/src/App.jsx): `web/src/App.jsx`
- [Session context](https://github.com/mathewmusango/emuplane/blob/main/web/src/context.jsx): `web/src/context.jsx`
- [Console shell](https://github.com/mathewmusango/emuplane/blob/main/web/src/components/Shell.jsx): `web/src/components/Shell.jsx`
- [Control API client](https://github.com/mathewmusango/emuplane/blob/main/web/src/api.ts): `web/src/api.ts`
- [Service navigation](https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/Services.jsx): `web/src/pages/Services.jsx`
- [Service catalogue](https://github.com/mathewmusango/emuplane/blob/main/web/src/serviceCatalogue.js): `web/src/serviceCatalogue.js`
- [S3 management](https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/BucketDetail.jsx): `web/src/pages/BucketDetail.jsx`
- [Access points](https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/AccessPoints.jsx): `web/src/pages/AccessPoints.jsx`
- [IAM management](https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/IAMSection.jsx): `web/src/pages/IAMSection.jsx`
- [Sign-in](https://github.com/mathewmusango/emuplane/blob/main/web/src/pages/SignIn.jsx): `web/src/pages/SignIn.jsx`

### Control plane

- [Control API](https://github.com/mathewmusango/emuplane/blob/main/control/app.py): `control/app.py`
- [AWS operations](https://github.com/mathewmusango/emuplane/blob/main/control/console.py): `control/console.py`
- [Bucket operations](https://github.com/mathewmusango/emuplane/blob/main/control/buckets.py): `control/buckets.py`
- [Access-point operations](https://github.com/mathewmusango/emuplane/blob/main/control/accesspoints.py): `control/accesspoints.py`

### AWS gateway

- [AWS gateway](https://github.com/mathewmusango/emuplane/blob/main/control/app.py): `control/app.py`
- [Backend routing](https://github.com/mathewmusango/emuplane/blob/main/control/backends.py): `control/backends.py`
- [Request signing](https://github.com/mathewmusango/emuplane/blob/main/control/signed.py): `control/signed.py`

### Control state

- [DynamoDB access](https://github.com/mathewmusango/emuplane/blob/main/control/dynamo.py): `control/dynamo.py`
- [Control records](https://github.com/mathewmusango/emuplane/blob/main/control/store.py): `control/store.py`

### First setup

- [Table bootstrap](https://github.com/mathewmusango/emuplane/blob/main/bootstrap/apply.py): `bootstrap/apply.py`

### Other components

- **Console user**
- **AWS client**
- **AWS emulator**

## Connections

- Console user → Console routes: uses (evidence: `README.md`)
- Console routes → Session context: provides session (evidence: `web/src/App.jsx`)
- Console routes → Service navigation: routes to (evidence: `web/src/App.jsx`)
- Console routes → S3 management: routes to (evidence: `web/src/App.jsx`)
- Console routes → Access points: routes to (evidence: `web/src/App.jsx`)
- Console routes → IAM management: routes to (evidence: `web/src/App.jsx`)
- Console routes → Sign-in: routes to (evidence: `web/src/App.jsx`)
- Session context → Control API client: fetches metadata (evidence: `web/src/context.jsx`)
- Service navigation → Service catalogue: groups services (evidence: `web/src/pages/Services.jsx`)
- S3 management → Control API client: requests S3 data (evidence: `web/src/pages/BucketDetail.jsx`)
- Access points → Control API client: requests access points (evidence: `web/src/pages/AccessPoints.jsx`)
- IAM management → Control API client: requests IAM data (evidence: `web/src/pages/IAMSection.jsx`)
- Control API client → Control API: calls control API (evidence: `README.md`)
- Sign-in → Control API: signs in
- AWS client → AWS gateway: sends AWS requests (evidence: `README.md`)
- AWS gateway → AWS emulator: forwards requests (evidence: `README.md`)
- Control API → AWS emulator: uses emulator (evidence: `README.md`)
- Table bootstrap → AWS emulator: creates tables (evidence: `README.md`)
- Control API → AWS operations: serves operations (evidence: `control/app.py`)
- Control API → Bucket operations: handles buckets (evidence: `control/app.py`)
- Control API → Access-point operations: handles access points (evidence: `control/app.py`)
- AWS gateway → Backend routing: routes via (evidence: `control/app.py`)
- AWS gateway → Request signing: verifies signatures (evidence: `control/app.py`)
- Control API → Control records: persists control data (evidence: `control/app.py`)
- Control records → DynamoDB access: uses (evidence: `control/store.py`)
- DynamoDB access → AWS emulator: reads and writes
