# caviraoss/akashic architecture

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

- Interactive diagram: https://gitdiagram.com/caviraoss/akashic
- Repository: https://github.com/caviraoss/akashic

## Overview

Akashic is a self-hosted, public-source geospatial intelligence workspace. Users explore live and strategic layers on a map, inspect entities in place, and use intelligence and reconnaissance surfaces for context. The documented data path runs from public upstreams and curated registries through Next.js route adapters and normalization into the map, intelligence deck, and detail surfaces. Recon is a distinct streamed workflow. The README documents the broad architecture; unsampled route and subsystem internals are grouped conservatively, so their individual data sources and call paths are not asserted.

Main entry points: [`app/api`](https://github.com/caviraoss/akashic/tree/main/app/api) (Route adapters), [`components/map/MapGlobe.tsx`](https://github.com/caviraoss/akashic/blob/main/components/map/MapGlobe.tsx) (Interactive map), [`components/sidebars`](https://github.com/caviraoss/akashic/tree/main/components/sidebars) (Entity detail surfaces), [`app/page.tsx`](https://github.com/caviraoss/akashic/blob/main/app/page.tsx) (Workspace entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Map workspace"]
  node_workspace_entry["Workspace entry<br/>[page.tsx]"]
  node_dashboard["Dashboard workspace"]
  node_map["Interactive map<br/>[MapGlobe.tsx]"]
  node_layer_controls["Layer controls"]
end

subgraph group_feeds["Data adapters"]
  node_route_adapters["Route adapters"]
  node_weather_core["Weather map logic<br/>[map-core.ts]"]
  node_live_aircraft["Live aircraft data<br/>[adsb-live.ts]"]
  node_live_cameras["Live camera data<br/>[cameras.ts]"]
end

subgraph group_intel["Geo intelligence"]
  node_live_deck["Live intelligence feed<br/>[live-deck-core.ts]"]
  node_country_dashboard["Country intelligence"]
  node_intel_deck["Intelligence deck"]
  node_intel_panels["Intelligence panels<br/>[intel_panels.tsx]"]
  node_investigation["Investigation workspace"]
  node_correlation["Event correlations"]
  node_spatial["Spatial analysis<br/>[spatial_engine.ts]"]
  node_prisma["Prisma data access<br/>[prisma.ts]"]
end

subgraph group_recon["Reconnaissance"]
  node_recon_panel["Recon mode<br/>[ReconModePanel.tsx]"]
  node_recon_core["Recon worker<br/>[core.ts]"]
end

subgraph group_details["Inspection surfaces"]
  node_entity_details["Entity detail surfaces"]
  node_building_detail["Building inspection"]
  node_radio_detail["Radio inspection"]
  node_stream_deck["Live stream viewer<br/>[LiveStreamDeck.tsx]"]
end

node_user(("Workspace user"))
node_upstreams(("Public data sources"))
node_recon_sources(("Recon source services"))

node_user -->|"opens"| node_workspace_entry
node_workspace_entry -->|"renders"| node_dashboard
node_workspace_entry -->|"renders"| node_map
node_workspace_entry -->|"shows"| node_entity_details
node_layer_controls -->|"controls layers"| node_map
node_upstreams -->|"provide data"| node_route_adapters
node_route_adapters -->|"supply normalized layers"| node_map
node_route_adapters -->|"supply intelligence"| node_intel_deck
node_route_adapters -->|"supply entity data"| node_entity_details
node_route_adapters -->|"provide weather fields"| node_weather_core
node_map -->|"uses aircraft data"| node_live_aircraft
node_map -->|"uses camera data"| node_live_cameras
node_intel_deck -->|"renders"| node_intel_panels
node_intel_panels -.->|"opens country view"| node_country_dashboard
node_country_dashboard -->|"builds country summaries"| node_live_deck
node_investigation -.->|"uses investigation APIs"| node_route_adapters
node_correlation -->|"reads events"| node_prisma
node_spatial -->|"queries spatial records"| node_prisma
node_recon_panel -->|"runs checks"| node_recon_core
node_recon_core -.->|"checks profiles"| node_recon_sources
node_recon_panel -->|"streams results"| node_route_adapters
node_recon_panel -->|"plots locations"| node_map
node_entity_details -.->|"includes"| node_building_detail
node_entity_details -.->|"includes"| node_radio_detail
node_entity_details -.->|"opens live streams"| node_stream_deck
node_building_detail -.->|"requests building data"| node_route_adapters

click node_workspace_entry "https://github.com/caviraoss/akashic/blob/main/app/page.tsx"
click node_dashboard "https://github.com/caviraoss/akashic/blob/main/components/layout/DashboardWorkspace.tsx"
click node_map "https://github.com/caviraoss/akashic/blob/main/components/map/MapGlobe.tsx"
click node_layer_controls "https://github.com/caviraoss/akashic/blob/main/components/layout/DataLayersSidebar.tsx"
click node_route_adapters "https://github.com/caviraoss/akashic/tree/main/app/api"
click node_weather_core "https://github.com/caviraoss/akashic/blob/main/lib/weather/map-core.ts"
click node_live_aircraft "https://github.com/caviraoss/akashic/blob/main/lib/live/adsb-live.ts"
click node_live_cameras "https://github.com/caviraoss/akashic/blob/main/lib/live/cameras.ts"
click node_live_deck "https://github.com/caviraoss/akashic/blob/main/lib/geo-intelligence/live-deck-core.ts"
click node_country_dashboard "https://github.com/caviraoss/akashic/blob/main/components/intelligence/CountryDashboard.tsx"
click node_intel_deck "https://github.com/caviraoss/akashic/blob/main/components/layout/WorldMonitorDeck.tsx"
click node_intel_panels "https://github.com/caviraoss/akashic/blob/main/components/intelligence/intel_panels.tsx"
click node_investigation "https://github.com/caviraoss/akashic/blob/main/components/intelligence/InvestigationCanvas.tsx"
click node_correlation "https://github.com/caviraoss/akashic/blob/main/lib/geo-intelligence/correlation_engine.ts"
click node_spatial "https://github.com/caviraoss/akashic/blob/main/lib/geo-intelligence/spatial_engine.ts"
click node_prisma "https://github.com/caviraoss/akashic/blob/main/lib/db/prisma.ts"
click node_recon_panel "https://github.com/caviraoss/akashic/blob/main/components/intelligence/ReconModePanel.tsx"
click node_recon_core "https://github.com/caviraoss/akashic/blob/main/lib/recon/core.ts"
click node_entity_details "https://github.com/caviraoss/akashic/tree/main/components/sidebars"
click node_building_detail "https://github.com/caviraoss/akashic/blob/main/components/sidebars/BuildingDetailsSidebar.tsx"
click node_radio_detail "https://github.com/caviraoss/akashic/blob/main/components/sidebars/RadioDetailsSidebar.tsx"
click node_stream_deck "https://github.com/caviraoss/akashic/blob/main/components/popups/LiveStreamDeck.tsx"

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_workspace_entry,node_dashboard,node_map,node_layer_controls,node_user toneBlue
class node_route_adapters,node_weather_core,node_live_aircraft,node_live_cameras toneAmber
class node_live_deck,node_country_dashboard,node_intel_deck,node_intel_panels,node_investigation,node_correlation,node_spatial,node_prisma toneMint
class node_recon_panel,node_recon_core toneRose
class node_entity_details,node_building_detail,node_radio_detail,node_stream_deck,node_upstreams,node_recon_sources toneIndigo
```

## Components

### Map workspace

- [Workspace entry](https://github.com/caviraoss/akashic/blob/main/app/page.tsx): `app/page.tsx`
- [Dashboard workspace](https://github.com/caviraoss/akashic/blob/main/components/layout/DashboardWorkspace.tsx): `components/layout/DashboardWorkspace.tsx`
- [Interactive map](https://github.com/caviraoss/akashic/blob/main/components/map/MapGlobe.tsx): `components/map/MapGlobe.tsx`
- [Layer controls](https://github.com/caviraoss/akashic/blob/main/components/layout/DataLayersSidebar.tsx): `components/layout/DataLayersSidebar.tsx`

### Data adapters

- [Route adapters](https://github.com/caviraoss/akashic/tree/main/app/api): `app/api`
- [Weather map logic](https://github.com/caviraoss/akashic/blob/main/lib/weather/map-core.ts): `lib/weather/map-core.ts`
- [Live aircraft data](https://github.com/caviraoss/akashic/blob/main/lib/live/adsb-live.ts): `lib/live/adsb-live.ts`
- [Live camera data](https://github.com/caviraoss/akashic/blob/main/lib/live/cameras.ts): `lib/live/cameras.ts`

### Geo intelligence

- [Live intelligence feed](https://github.com/caviraoss/akashic/blob/main/lib/geo-intelligence/live-deck-core.ts): `lib/geo-intelligence/live-deck-core.ts`
- [Country intelligence](https://github.com/caviraoss/akashic/blob/main/components/intelligence/CountryDashboard.tsx): `components/intelligence/CountryDashboard.tsx`
- [Intelligence deck](https://github.com/caviraoss/akashic/blob/main/components/layout/WorldMonitorDeck.tsx): `components/layout/WorldMonitorDeck.tsx`
- [Intelligence panels](https://github.com/caviraoss/akashic/blob/main/components/intelligence/intel_panels.tsx): `components/intelligence/intel_panels.tsx`
- [Investigation workspace](https://github.com/caviraoss/akashic/blob/main/components/intelligence/InvestigationCanvas.tsx): `components/intelligence/InvestigationCanvas.tsx`
- [Event correlations](https://github.com/caviraoss/akashic/blob/main/lib/geo-intelligence/correlation_engine.ts): `lib/geo-intelligence/correlation_engine.ts`
- [Spatial analysis](https://github.com/caviraoss/akashic/blob/main/lib/geo-intelligence/spatial_engine.ts): `lib/geo-intelligence/spatial_engine.ts`
- [Prisma data access](https://github.com/caviraoss/akashic/blob/main/lib/db/prisma.ts): `lib/db/prisma.ts`

### Reconnaissance

- [Recon mode](https://github.com/caviraoss/akashic/blob/main/components/intelligence/ReconModePanel.tsx): `components/intelligence/ReconModePanel.tsx`
- [Recon worker](https://github.com/caviraoss/akashic/blob/main/lib/recon/core.ts): `lib/recon/core.ts`

### Inspection surfaces

- [Entity detail surfaces](https://github.com/caviraoss/akashic/tree/main/components/sidebars): `components/sidebars`
- [Building inspection](https://github.com/caviraoss/akashic/blob/main/components/sidebars/BuildingDetailsSidebar.tsx): `components/sidebars/BuildingDetailsSidebar.tsx`
- [Radio inspection](https://github.com/caviraoss/akashic/blob/main/components/sidebars/RadioDetailsSidebar.tsx): `components/sidebars/RadioDetailsSidebar.tsx`
- [Live stream viewer](https://github.com/caviraoss/akashic/blob/main/components/popups/LiveStreamDeck.tsx): `components/popups/LiveStreamDeck.tsx`

### Other components

- **Workspace user**
- **Public data sources**
- **Recon source services**

## Connections

- Workspace user → Workspace entry: opens (evidence: `README.md`)
- Workspace entry → Dashboard workspace: renders (evidence: `app/page.tsx`)
- Workspace entry → Interactive map: renders (evidence: `app/page.tsx`)
- Workspace entry → Entity detail surfaces: shows (evidence: `app/page.tsx`)
- Layer controls → Interactive map: controls layers (evidence: `README.md`)
- Public data sources → Route adapters: provide data (evidence: `README.md`)
- Route adapters → Interactive map: supply normalized layers (evidence: `README.md`)
- Route adapters → Intelligence deck: supply intelligence (evidence: `README.md`)
- Route adapters → Entity detail surfaces: supply entity data (evidence: `README.md`)
- Route adapters → Weather map logic: provide weather fields (evidence: `app/api/wind/route.ts`)
- Interactive map → Live aircraft data: uses aircraft data (evidence: `components/map/MapGlobe.tsx`)
- Interactive map → Live camera data: uses camera data (evidence: `components/map/MapGlobe.tsx`)
- Intelligence deck → Intelligence panels: renders
- Intelligence panels → Country intelligence: opens country view
- Country intelligence → Live intelligence feed: builds country summaries (evidence: `components/intelligence/CountryDashboard.tsx`)
- Investigation workspace → Route adapters: uses investigation APIs
- Event correlations → Prisma data access: reads events (evidence: `lib/geo-intelligence/correlation_engine.ts`)
- Spatial analysis → Prisma data access: queries spatial records (evidence: `lib/geo-intelligence/spatial_engine.ts`)
- Recon mode → Recon worker: runs checks (evidence: `components/intelligence/ReconModePanel.tsx`)
- Recon worker → Recon source services: checks profiles
- Recon mode → Route adapters: streams results (evidence: `README.md`)
- Recon mode → Interactive map: plots locations (evidence: `README.md`)
- Entity detail surfaces → Building inspection: includes
- Entity detail surfaces → Radio inspection: includes
- Entity detail surfaces → Live stream viewer: opens live streams
- Building inspection → Route adapters: requests building data
