# cybercussion/axiom architecture

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

- Interactive diagram: https://gitdiagram.com/cybercussion/axiom
- Repository: https://github.com/cybercussion/axiom

## Overview

Axiom is a zero-build browser application runtime and a sample single-page application. A user enters through the app shell, whose route configuration selects feature pages; the router coordinates navigation and authentication checks, while shared state drives reactive UI updates. The sample product includes home, counter, dashboard, contact, login, and component-catalog pages, alongside reusable controls and modal UI. The README documents broader state, routing, gateway, auth, and component capabilities; some implementation paths were not excerpted, so uncertain connections are omitted.

Main entry points: [`src/core/router.js`](https://github.com/cybercussion/axiom/blob/main/src/core/router.js) (Router), [`src/core/state.js`](https://github.com/cybercussion/axiom/blob/main/src/core/state.js) (Reactive State), [`src/app.js`](https://github.com/cybercussion/axiom/blob/main/src/app.js) (App Shell), [`src/features/counter/counter.js`](https://github.com/cybercussion/axiom/blob/main/src/features/counter/counter.js) (Counter Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_shell["App Shell<br/>[app.js]"]
  node_routes["Route Config<br/>[app-routes.js]"]
  node_appstate["App State Keys<br/>[app-state.js]"]
end

subgraph group_features["Product Features"]
  node_home["Home Page<br/>[home.js]"]
  node_counter["Counter Page<br/>[counter.js]"]
  node_counterapi["Counter API<br/>[counter-api.js]"]
  node_dashboard["Dashboard Page<br/>[dashboard.js]"]
  node_dashboardapi["Dashboard API<br/>[dashboard-api.js]"]
  node_contact["Contact Page<br/>[contact.js]"]
  node_login["Login Page<br/>[login.js]"]
  node_catalog["Controls Catalog<br/>[components.js]"]
  node_notfound["Not Found Page<br/>[not-found.js]"]
end

subgraph group_ui["Shared UI"]
  node_base["Base Component<br/>[base-component.js]"]
  node_controls["UI Controls"]
  node_select["Select Control<br/>[ax-select.js]"]
  node_formmix["Form Mixin"]
  node_fieldchrome["Field Chrome<br/>[field-chrome.js]"]
  node_modal["Modal<br/>[modal.js]"]
  node_motion["Motion Timing<br/>[motion.js]"]
  node_toast["Toast Manager<br/>[toast-manager.js]"]
end

subgraph group_services["Core Services"]
  node_router["Router<br/>[router.js]"]
  node_state["Reactive State<br/>[state.js]"]
  node_auth["OAuth Auth<br/>[auth.js]"]
  node_gateway["HTTP Gateway<br/>[gateway.js]"]
  node_logger["Logger<br/>[logger.js]"]
  node_config["Runtime Config<br/>[config.js]"]
  node_observe["Event Observer<br/>[observe.js]"]
end

node_user(("Visitor"))

node_user -->|"opens app"| node_shell
node_shell -->|"declares keys"| node_appstate
node_shell -->|"initializes"| node_router
node_shell -->|"passes routes"| node_routes
node_shell -->|"subscribes"| node_state
node_router -->|"updates navigation"| node_state
node_router -->|"checks session"| node_auth
node_router -->|"loads route"| node_home
node_router -->|"loads route"| node_counter
node_router -->|"loads route"| node_dashboard
node_router -->|"loads route"| node_catalog
node_router -->|"loads route"| node_contact
node_router -->|"loads route"| node_login
node_router -->|"loads fallback"| node_notfound
node_counter -->|"saves count"| node_counterapi
node_counter -->|"mutates count"| node_state
node_dashboard -->|"fetches data"| node_dashboardapi
node_dashboard -->|"queries data"| node_state
node_base -->|"subscribes"| node_state
node_select -->|"extends"| node_formmix
node_select -->|"uses styles"| node_fieldchrome
node_modal -->|"extends"| node_base
node_modal -->|"reads timing"| node_motion
node_toast -->|"extends"| node_base
node_toast -->|"subscribes"| node_state
node_state -->|"reads environment"| node_config
node_state -->|"logs warnings"| node_logger
node_state -->|"emits events"| node_observe

click node_shell "https://github.com/cybercussion/axiom/blob/main/src/app.js"
click node_routes "https://github.com/cybercussion/axiom/blob/main/src/app-routes.js"
click node_router "https://github.com/cybercussion/axiom/blob/main/src/core/router.js"
click node_state "https://github.com/cybercussion/axiom/blob/main/src/core/state.js"
click node_appstate "https://github.com/cybercussion/axiom/blob/main/src/app-state.js"
click node_auth "https://github.com/cybercussion/axiom/blob/main/src/core/auth.js"
click node_gateway "https://github.com/cybercussion/axiom/blob/main/src/core/gateway.js"
click node_home "https://github.com/cybercussion/axiom/blob/main/src/features/home/home.js"
click node_counter "https://github.com/cybercussion/axiom/blob/main/src/features/counter/counter.js"
click node_counterapi "https://github.com/cybercussion/axiom/blob/main/src/features/counter/counter-api.js"
click node_dashboard "https://github.com/cybercussion/axiom/blob/main/src/features/dashboard/dashboard.js"
click node_dashboardapi "https://github.com/cybercussion/axiom/blob/main/src/features/dashboard/dashboard-api.js"
click node_contact "https://github.com/cybercussion/axiom/blob/main/src/features/contact/contact.js"
click node_login "https://github.com/cybercussion/axiom/blob/main/src/features/login/login.js"
click node_catalog "https://github.com/cybercussion/axiom/blob/main/src/features/components/components.js"
click node_notfound "https://github.com/cybercussion/axiom/blob/main/src/features/not-found/not-found.js"
click node_base "https://github.com/cybercussion/axiom/blob/main/src/shared/base-component.js"
click node_controls "https://github.com/cybercussion/axiom/tree/main/src/shared/controls"
click node_select "https://github.com/cybercussion/axiom/blob/main/src/shared/controls/ax-select.js"
click node_formmix "https://github.com/cybercussion/axiom/blob/main/src/shared/controls/form-control-mixin.js"
click node_fieldchrome "https://github.com/cybercussion/axiom/blob/main/src/shared/controls/field-chrome.js"
click node_modal "https://github.com/cybercussion/axiom/blob/main/src/shared/modal.js"
click node_motion "https://github.com/cybercussion/axiom/blob/main/src/shared/motion.js"
click node_toast "https://github.com/cybercussion/axiom/blob/main/src/shared/toast-manager.js"
click node_logger "https://github.com/cybercussion/axiom/blob/main/src/core/logger.js"
click node_config "https://github.com/cybercussion/axiom/blob/main/src/core/config.js"
click node_observe "https://github.com/cybercussion/axiom/blob/main/src/core/observe.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_routes,node_appstate toneBlue
class node_home,node_counter,node_counterapi,node_dashboard,node_dashboardapi,node_contact,node_login,node_catalog,node_notfound toneAmber
class node_base,node_controls,node_select,node_formmix,node_fieldchrome,node_modal,node_motion,node_toast toneMint
class node_router,node_state,node_auth,node_gateway,node_logger,node_config,node_observe toneRose
class node_user toneIndigo
```

## Components

### Application Runtime

- [App Shell](https://github.com/cybercussion/axiom/blob/main/src/app.js): `src/app.js`
- [Route Config](https://github.com/cybercussion/axiom/blob/main/src/app-routes.js): `src/app-routes.js`
- [App State Keys](https://github.com/cybercussion/axiom/blob/main/src/app-state.js): `src/app-state.js`

### Product Features

- [Home Page](https://github.com/cybercussion/axiom/blob/main/src/features/home/home.js): `src/features/home/home.js`
- [Counter Page](https://github.com/cybercussion/axiom/blob/main/src/features/counter/counter.js): `src/features/counter/counter.js`
- [Counter API](https://github.com/cybercussion/axiom/blob/main/src/features/counter/counter-api.js): `src/features/counter/counter-api.js`
- [Dashboard Page](https://github.com/cybercussion/axiom/blob/main/src/features/dashboard/dashboard.js): `src/features/dashboard/dashboard.js`
- [Dashboard API](https://github.com/cybercussion/axiom/blob/main/src/features/dashboard/dashboard-api.js): `src/features/dashboard/dashboard-api.js`
- [Contact Page](https://github.com/cybercussion/axiom/blob/main/src/features/contact/contact.js): `src/features/contact/contact.js`
- [Login Page](https://github.com/cybercussion/axiom/blob/main/src/features/login/login.js): `src/features/login/login.js`
- [Controls Catalog](https://github.com/cybercussion/axiom/blob/main/src/features/components/components.js): `src/features/components/components.js`
- [Not Found Page](https://github.com/cybercussion/axiom/blob/main/src/features/not-found/not-found.js): `src/features/not-found/not-found.js`

### Shared UI

- [Base Component](https://github.com/cybercussion/axiom/blob/main/src/shared/base-component.js): `src/shared/base-component.js`
- [UI Controls](https://github.com/cybercussion/axiom/tree/main/src/shared/controls): `src/shared/controls`
- [Select Control](https://github.com/cybercussion/axiom/blob/main/src/shared/controls/ax-select.js): `src/shared/controls/ax-select.js`
- [Form Mixin](https://github.com/cybercussion/axiom/blob/main/src/shared/controls/form-control-mixin.js): `src/shared/controls/form-control-mixin.js`
- [Field Chrome](https://github.com/cybercussion/axiom/blob/main/src/shared/controls/field-chrome.js): `src/shared/controls/field-chrome.js`
- [Modal](https://github.com/cybercussion/axiom/blob/main/src/shared/modal.js): `src/shared/modal.js`
- [Motion Timing](https://github.com/cybercussion/axiom/blob/main/src/shared/motion.js): `src/shared/motion.js`
- [Toast Manager](https://github.com/cybercussion/axiom/blob/main/src/shared/toast-manager.js): `src/shared/toast-manager.js`

### Core Services

- [Router](https://github.com/cybercussion/axiom/blob/main/src/core/router.js): `src/core/router.js`
- [Reactive State](https://github.com/cybercussion/axiom/blob/main/src/core/state.js): `src/core/state.js`
- [OAuth Auth](https://github.com/cybercussion/axiom/blob/main/src/core/auth.js): `src/core/auth.js`
- [HTTP Gateway](https://github.com/cybercussion/axiom/blob/main/src/core/gateway.js): `src/core/gateway.js`
- [Logger](https://github.com/cybercussion/axiom/blob/main/src/core/logger.js): `src/core/logger.js`
- [Runtime Config](https://github.com/cybercussion/axiom/blob/main/src/core/config.js): `src/core/config.js`
- [Event Observer](https://github.com/cybercussion/axiom/blob/main/src/core/observe.js): `src/core/observe.js`

### Other components

- **Visitor**

## Connections

- Visitor → App Shell: opens app (evidence: `README.md`)
- App Shell → App State Keys: declares keys (evidence: `src/app.js`)
- App Shell → Router: initializes (evidence: `src/app.js`)
- App Shell → Route Config: passes routes (evidence: `src/app.js`)
- App Shell → Reactive State: subscribes (evidence: `src/app.js`)
- Router → Reactive State: updates navigation (evidence: `src/core/router.js`)
- Router → OAuth Auth: checks session (evidence: `src/core/router.js`)
- Router → Home Page: loads route
- Router → Counter Page: loads route
- Router → Dashboard Page: loads route
- Router → Controls Catalog: loads route
- Router → Contact Page: loads route
- Router → Login Page: loads route
- Router → Not Found Page: loads fallback
- Counter Page → Counter API: saves count (evidence: `src/features/counter/counter.js`)
- Counter Page → Reactive State: mutates count (evidence: `src/features/counter/counter.js`)
- Dashboard Page → Dashboard API: fetches data (evidence: `src/features/dashboard/dashboard.js`)
- Dashboard Page → Reactive State: queries data (evidence: `src/features/dashboard/dashboard.js`)
- Base Component → Reactive State: subscribes (evidence: `src/shared/base-component.js`)
- Select Control → Form Mixin: extends (evidence: `src/shared/controls/ax-select.js`)
- Select Control → Field Chrome: uses styles (evidence: `src/shared/controls/ax-select.js`)
- Modal → Base Component: extends (evidence: `src/shared/modal.js`)
- Modal → Motion Timing: reads timing (evidence: `src/shared/modal.js`)
- Toast Manager → Base Component: extends (evidence: `src/shared/toast-manager.js`)
- Toast Manager → Reactive State: subscribes (evidence: `src/shared/toast-manager.js`)
- Reactive State → Runtime Config: reads environment (evidence: `src/core/state.js`)
- Reactive State → Logger: logs warnings (evidence: `src/core/state.js`)
- Reactive State → Event Observer: emits events (evidence: `src/core/state.js`)
