# gcalacdayuniv/strama architecture

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

- Interactive diagram: https://gitdiagram.com/gcalacdayuniv/strama
- Repository: https://github.com/gcalacdayuniv/strama

## Overview

Strategic Management Graph Maker is a browser-based strategy-planning SPA backed by a Cloudflare Worker API and D1. Users authenticate, manage projects, edit shared entities and chart-specific data across seven strategic-analysis views, then save projects or export charts. The graph emphasizes the documented project/editor flow and preserves each chart domain, including the Master Entities refresh behavior. Relationships for unsampled modules rely on README documentation and the SOURCE INDEX; they do not imply that unsampled implementation details were inspected.

Main entry points: [`js/plotter.js`](https://github.com/gcalacdayuniv/strama/blob/main/js/plotter.js) (Editor orchestrator), [`js/charts/entities.js`](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/entities.js) (Master entities), [`js/main.js`](https://github.com/gcalacdayuniv/strama/blob/main/js/main.js) (App entry), [`js/api.js`](https://github.com/gcalacdayuniv/strama/blob/main/js/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client and orchestration"]
  node_shell["SPA shell<br/>[index.html]"]
  node_main["App entry<br/>[main.js]"]
  node_nav["Editor navigation<br/>[nav.js]"]
  node_plotter["Editor orchestrator<br/>[plotter.js]"]
  node_state["Shared state<br/>[state.js]"]
  node_defaults["Defaults and themes<br/>[defaults.js]"]
  node_utils["Shared chart helpers<br/>[utils.js]"]
  node_download["Chart export<br/>[download.js]"]
end

subgraph group_charts["Strategy analysis"]
  node_entities["Master entities<br/>[entities.js]"]
  node_ge["GE matrix<br/>[ge.js]"]
  node_gs["Grand strategy<br/>[gs.js]"]
  node_bcg["BCG matrix<br/>[bcg.js]"]
  node_ie["IE matrix<br/>[ie.js]"]
  node_space["SPACE matrix<br/>[space.js]"]
  node_strategy["Strategy map<br/>[strategyMap.js]"]
  node_porters["Porter forces<br/>[porters.js]"]
end

subgraph group_accounts["Accounts and projects"]
  node_auth["Authentication<br/>[auth.js]"]
  node_projects["Project dashboard<br/>[projects.js]"]
end

subgraph group_backend["API and persistence"]
  node_api["API client<br/>[api.js]"]
  node_worker["Edge API<br/>[worker.js]"]
  node_d1[("Cloudflare D1")]
end

node_user(("Planner"))

node_user -->|"uses"| node_shell
node_main -->|"initializes"| node_nav
node_main -->|"initializes"| node_plotter
node_main -->|"orchestrates"| node_auth
node_main -->|"orchestrates"| node_projects
node_plotter -->|"mutates"| node_state
node_plotter -->|"loads"| node_defaults
node_plotter -->|"initializes"| node_entities
node_plotter -->|"initializes"| node_ge
node_plotter -->|"initializes"| node_gs
node_plotter -->|"initializes"| node_bcg
node_plotter -->|"initializes"| node_ie
node_plotter -->|"initializes"| node_space
node_plotter -->|"initializes"| node_strategy
node_plotter -->|"initializes"| node_porters
node_plotter -->|"initializes"| node_download
node_plotter -->|"saves through"| node_api
node_entities -->|"refreshes"| node_ge
node_entities -->|"refreshes"| node_gs
node_entities -->|"refreshes"| node_bcg
node_entities -->|"refreshes"| node_ie
node_auth -->|"requests"| node_api
node_projects -->|"requests"| node_api
node_api -->|"fetches"| node_worker
node_worker -->|"queries"| node_d1

click node_shell "https://github.com/gcalacdayuniv/strama/blob/main/index.html"
click node_main "https://github.com/gcalacdayuniv/strama/blob/main/js/main.js"
click node_nav "https://github.com/gcalacdayuniv/strama/blob/main/js/nav.js"
click node_plotter "https://github.com/gcalacdayuniv/strama/blob/main/js/plotter.js"
click node_state "https://github.com/gcalacdayuniv/strama/blob/main/js/state.js"
click node_defaults "https://github.com/gcalacdayuniv/strama/blob/main/js/defaults.js"
click node_utils "https://github.com/gcalacdayuniv/strama/blob/main/js/utils.js"
click node_download "https://github.com/gcalacdayuniv/strama/blob/main/js/download.js"
click node_auth "https://github.com/gcalacdayuniv/strama/blob/main/js/auth.js"
click node_projects "https://github.com/gcalacdayuniv/strama/blob/main/js/projects.js"
click node_entities "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/entities.js"
click node_ge "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/ge.js"
click node_gs "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/gs.js"
click node_bcg "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/bcg.js"
click node_ie "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/ie.js"
click node_space "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/space.js"
click node_strategy "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/strategyMap.js"
click node_porters "https://github.com/gcalacdayuniv/strama/blob/main/js/charts/porters.js"
click node_api "https://github.com/gcalacdayuniv/strama/blob/main/js/api.js"
click node_worker "https://github.com/gcalacdayuniv/strama/blob/main/worker/worker.js"

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_shell,node_main,node_nav,node_plotter,node_state,node_defaults,node_utils,node_download toneBlue
class node_entities,node_ge,node_gs,node_bcg,node_ie,node_space,node_strategy,node_porters toneAmber
class node_auth,node_projects toneMint
class node_api,node_worker,node_d1 toneRose
class node_user toneIndigo
```

## Components

### Client and orchestration

- [SPA shell](https://github.com/gcalacdayuniv/strama/blob/main/index.html): `index.html`
- [App entry](https://github.com/gcalacdayuniv/strama/blob/main/js/main.js): `js/main.js`
- [Editor navigation](https://github.com/gcalacdayuniv/strama/blob/main/js/nav.js): `js/nav.js`
- [Editor orchestrator](https://github.com/gcalacdayuniv/strama/blob/main/js/plotter.js): `js/plotter.js`
- [Shared state](https://github.com/gcalacdayuniv/strama/blob/main/js/state.js): `js/state.js`
- [Defaults and themes](https://github.com/gcalacdayuniv/strama/blob/main/js/defaults.js): `js/defaults.js`
- [Shared chart helpers](https://github.com/gcalacdayuniv/strama/blob/main/js/utils.js): `js/utils.js`
- [Chart export](https://github.com/gcalacdayuniv/strama/blob/main/js/download.js): `js/download.js`

### Strategy analysis

- [Master entities](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/entities.js): `js/charts/entities.js`
- [GE matrix](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/ge.js): `js/charts/ge.js`
- [Grand strategy](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/gs.js): `js/charts/gs.js`
- [BCG matrix](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/bcg.js): `js/charts/bcg.js`
- [IE matrix](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/ie.js): `js/charts/ie.js`
- [SPACE matrix](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/space.js): `js/charts/space.js`
- [Strategy map](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/strategyMap.js): `js/charts/strategyMap.js`
- [Porter forces](https://github.com/gcalacdayuniv/strama/blob/main/js/charts/porters.js): `js/charts/porters.js`

### Accounts and projects

- [Authentication](https://github.com/gcalacdayuniv/strama/blob/main/js/auth.js): `js/auth.js`
- [Project dashboard](https://github.com/gcalacdayuniv/strama/blob/main/js/projects.js): `js/projects.js`

### API and persistence

- [API client](https://github.com/gcalacdayuniv/strama/blob/main/js/api.js): `js/api.js`
- [Edge API](https://github.com/gcalacdayuniv/strama/blob/main/worker/worker.js): `worker/worker.js`
- **Cloudflare D1**

### Other components

- **Planner**

## Connections

- Planner → SPA shell: uses (evidence: `README.md`)
- App entry → Editor navigation: initializes (evidence: `README.md`)
- App entry → Editor orchestrator: initializes (evidence: `README.md`)
- App entry → Authentication: orchestrates (evidence: `README.md`)
- App entry → Project dashboard: orchestrates (evidence: `README.md`)
- Editor orchestrator → Shared state: mutates (evidence: `js/plotter.js`)
- Editor orchestrator → Defaults and themes: loads (evidence: `js/plotter.js`)
- Editor orchestrator → Master entities: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → GE matrix: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → Grand strategy: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → BCG matrix: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → IE matrix: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → SPACE matrix: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → Strategy map: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → Porter forces: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → Chart export: initializes (evidence: `js/plotter.js`)
- Editor orchestrator → API client: saves through (evidence: `js/plotter.js`)
- Master entities → GE matrix: refreshes (evidence: `README.md`)
- Master entities → Grand strategy: refreshes (evidence: `README.md`)
- Master entities → BCG matrix: refreshes (evidence: `README.md`)
- Master entities → IE matrix: refreshes (evidence: `README.md`)
- Authentication → API client: requests (evidence: `js/auth.js`)
- Project dashboard → API client: requests (evidence: `js/projects.js`)
- API client → Edge API: fetches (evidence: `js/api.js`)
- Edge API → Cloudflare D1: queries (evidence: `README.md`)
