# alkamelgis/geosyntra architecture

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

- Interactive diagram: https://gitdiagram.com/alkamelgis/geosyntra
- Repository: https://github.com/alkamelgis/geosyntra

## Overview

GeoSyntra is an enterprise GIS SaaS with a React/Express production stack and a parallel Rust/Dioxus preview stack. The main user journey is working in the satellite GIS interface, asking GeoAI questions or running geospatial analysis, and receiving map or analysis results through the API. The repository also includes account and platform administration, vendor gateways, and a Python analysis service. Some frontend-to-service links are inferred from product structure rather than shown in sampled calls, so those links are dashed and unevidenced.

Main entry points: [`backend/server/index.js`](https://github.com/alkamelgis/geosyntra/blob/main/backend/server/index.js) (Express API), [`analysis_engine/app/main.py`](https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/main.py) (Python Analysis), [`frontend/src/App.tsx`](https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/App.tsx) (React Application), [`frontend/src/pages/satellite/SatelliteIntelligenceMain.tsx`](https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/pages/satellite/SatelliteIntelligenceMain.tsx) (Satellite GIS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_classic["Classic SaaS"]
  node_react["React Application<br/>[App.tsx]"]
  node_satellite["Satellite GIS"]
  node_geoai["GeoAI Tools"]
  node_api["Express API<br/>[index.js]"]
end

subgraph group_analysis["GIS Analysis"]
  node_analysisproxy["Analysis Proxy"]
  node_pyengine["Python Analysis<br/>[main.py]"]
  node_gp["Raster Processing<br/>[gp.py]"]
  node_timeseries["Time Series<br/>[timeseries.py]"]
  node_mpc["Planetary Data<br/>[mpc_planetary.py]"]
  node_hydro["Watershed Engine<br/>[hydroEngine.ts]"]
  node_terrain["Terrain Tiles<br/>[terrainTiles.ts]"]
end

subgraph group_platform["Platform Services"]
  node_auth["Auth and RBAC<br/>[middleware.js]"]
  node_gateway["Vendor Gateway"]
  node_tokenstore[("System Token Store")]
  node_platformdb[("Platform Database")]
end

subgraph group_rust["Rust Preview"]
  node_rustui["Dioxus Clients<br/>[routes.rs]"]
  node_rustapi["Axum API<br/>[main.rs]"]
  node_interface["API Interface<br/>[router.rs]"]
  node_giscore["GIS Core<br/>[thumb_pipeline.rs]"]
  node_application["Application Logic<br/>[engine.rs]"]
  node_repositories[("Postgres Repositories")]
end

node_user(("GIS User"))
node_external{{"Imagery and AI Providers"}}

node_user -->|"uses"| node_react
node_react -->|"calls API"| node_api
node_react -.->|"opens"| node_satellite
node_satellite -.->|"uses"| node_geoai
node_satellite -.->|"runs analysis"| node_hydro
node_hydro -->|"builds DEM"| node_terrain
node_api -.->|"routes analysis"| node_analysisproxy
node_analysisproxy -.->|"proxies requests"| node_pyengine
node_pyengine -->|"dispatches"| node_gp
node_pyengine -->|"dispatches"| node_timeseries
node_pyengine -->|"dispatches"| node_mpc
node_api -.->|"authenticates"| node_auth
node_api -.->|"registers routes"| node_gateway
node_gateway -->|"reads tokens"| node_tokenstore
node_gateway -->|"proxies requests"| node_external
node_tokenstore -->|"persists tokens"| node_platformdb
node_user -->|"uses"| node_rustui
node_rustui -->|"calls API"| node_rustapi
node_rustapi -.->|"routes requests"| node_interface
node_interface -.->|"uses GIS services"| node_giscore
node_interface -.->|"uses application logic"| node_application
node_application -.->|"loads policies"| node_repositories

click node_react "https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/App.tsx"
click node_satellite "https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/pages/satellite/SatelliteIntelligenceMain.tsx"
click node_geoai "https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/lib/geoAiStatsEngine.ts"
click node_api "https://github.com/alkamelgis/geosyntra/blob/main/backend/server/index.js"
click node_analysisproxy "https://github.com/alkamelgis/geosyntra/blob/main/backend/server/registerAnalysisEngineProxy.js"
click node_pyengine "https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/main.py"
click node_gp "https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/gp.py"
click node_timeseries "https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/timeseries.py"
click node_mpc "https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/mpc_planetary.py"
click node_hydro "https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/lib/hydroWatershed/hydroEngine.ts"
click node_terrain "https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/lib/hydroWatershed/terrainTiles.ts"
click node_auth "https://github.com/alkamelgis/geosyntra/blob/main/backend/server/rbac/middleware.js"
click node_gateway "https://github.com/alkamelgis/geosyntra/blob/main/backend/server/gateway/registerApiGatewayRoutes.js"
click node_tokenstore "https://github.com/alkamelgis/geosyntra/blob/main/backend/server/tokenManager/systemTokenStore.js"
click node_platformdb "https://github.com/alkamelgis/geosyntra/blob/main/backend/server/platformDatabase.js"
click node_rustui "https://github.com/alkamelgis/geosyntra/blob/main/packages/web/src/routes.rs"
click node_rustapi "https://github.com/alkamelgis/geosyntra/blob/main/packages/api/src/main.rs"
click node_interface "https://github.com/alkamelgis/geosyntra/blob/main/packages/interface/src/router.rs"
click node_giscore "https://github.com/alkamelgis/geosyntra/blob/main/packages/gis-core/src/indices/thumb_pipeline.rs"
click node_application "https://github.com/alkamelgis/geosyntra/blob/main/packages/application/src/authorization/engine.rs"
click node_repositories "https://github.com/alkamelgis/geosyntra/blob/main/packages/infrastructure/src/postgres/auth_directory_repository.rs"

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_react,node_satellite,node_geoai,node_api,node_user toneBlue
class node_analysisproxy,node_pyengine,node_gp,node_timeseries,node_mpc,node_hydro,node_terrain toneAmber
class node_auth,node_gateway,node_tokenstore,node_platformdb toneMint
class node_rustui,node_rustapi,node_interface,node_giscore,node_application,node_repositories toneRose
class node_external toneIndigo
```

## Components

### Classic SaaS

- [React Application](https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Satellite GIS](https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/pages/satellite/SatelliteIntelligenceMain.tsx): `frontend/src/pages/satellite/SatelliteIntelligenceMain.tsx`
- [GeoAI Tools](https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/lib/geoAiStatsEngine.ts): `frontend/src/lib/geoAiStatsEngine.ts`
- [Express API](https://github.com/alkamelgis/geosyntra/blob/main/backend/server/index.js): `backend/server/index.js`

### GIS Analysis

- [Analysis Proxy](https://github.com/alkamelgis/geosyntra/blob/main/backend/server/registerAnalysisEngineProxy.js): `backend/server/registerAnalysisEngineProxy.js`
- [Python Analysis](https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/main.py): `analysis_engine/app/main.py`
- [Raster Processing](https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/gp.py): `analysis_engine/app/gp.py`
- [Time Series](https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/timeseries.py): `analysis_engine/app/timeseries.py`
- [Planetary Data](https://github.com/alkamelgis/geosyntra/blob/main/analysis_engine/app/mpc_planetary.py): `analysis_engine/app/mpc_planetary.py`
- [Watershed Engine](https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/lib/hydroWatershed/hydroEngine.ts): `frontend/src/lib/hydroWatershed/hydroEngine.ts`
- [Terrain Tiles](https://github.com/alkamelgis/geosyntra/blob/main/frontend/src/lib/hydroWatershed/terrainTiles.ts): `frontend/src/lib/hydroWatershed/terrainTiles.ts`

### Platform Services

- [Auth and RBAC](https://github.com/alkamelgis/geosyntra/blob/main/backend/server/rbac/middleware.js): `backend/server/rbac/middleware.js`
- [Vendor Gateway](https://github.com/alkamelgis/geosyntra/blob/main/backend/server/gateway/registerApiGatewayRoutes.js): `backend/server/gateway/registerApiGatewayRoutes.js`
- [System Token Store](https://github.com/alkamelgis/geosyntra/blob/main/backend/server/tokenManager/systemTokenStore.js): `backend/server/tokenManager/systemTokenStore.js`
- [Platform Database](https://github.com/alkamelgis/geosyntra/blob/main/backend/server/platformDatabase.js): `backend/server/platformDatabase.js`

### Rust Preview

- [Dioxus Clients](https://github.com/alkamelgis/geosyntra/blob/main/packages/web/src/routes.rs): `packages/web/src/routes.rs`
- [Axum API](https://github.com/alkamelgis/geosyntra/blob/main/packages/api/src/main.rs): `packages/api/src/main.rs`
- [API Interface](https://github.com/alkamelgis/geosyntra/blob/main/packages/interface/src/router.rs): `packages/interface/src/router.rs`
- [GIS Core](https://github.com/alkamelgis/geosyntra/blob/main/packages/gis-core/src/indices/thumb_pipeline.rs): `packages/gis-core/src/indices/thumb_pipeline.rs`
- [Application Logic](https://github.com/alkamelgis/geosyntra/blob/main/packages/application/src/authorization/engine.rs): `packages/application/src/authorization/engine.rs`
- [Postgres Repositories](https://github.com/alkamelgis/geosyntra/blob/main/packages/infrastructure/src/postgres/auth_directory_repository.rs): `packages/infrastructure/src/postgres/auth_directory_repository.rs`

### Other components

- **GIS User**
- **Imagery and AI Providers**

## Connections

- GIS User → React Application: uses (evidence: `README.md`)
- React Application → Express API: calls API (evidence: `README.md`)
- React Application → Satellite GIS: opens
- Satellite GIS → GeoAI Tools: uses
- Satellite GIS → Watershed Engine: runs analysis
- Watershed Engine → Terrain Tiles: builds DEM (evidence: `frontend/src/lib/hydroWatershed/hydroEngine.ts`)
- Express API → Analysis Proxy: routes analysis
- Analysis Proxy → Python Analysis: proxies requests
- Python Analysis → Raster Processing: dispatches (evidence: `analysis_engine/app/main.py`)
- Python Analysis → Time Series: dispatches (evidence: `analysis_engine/app/main.py`)
- Python Analysis → Planetary Data: dispatches (evidence: `analysis_engine/app/main.py`)
- Express API → Auth and RBAC: authenticates
- Express API → Vendor Gateway: registers routes
- Vendor Gateway → System Token Store: reads tokens (evidence: `backend/server/gateway/registerApiGatewayRoutes.js`)
- Vendor Gateway → Imagery and AI Providers: proxies requests (evidence: `backend/server/gateway/registerApiGatewayRoutes.js`)
- System Token Store → Platform Database: persists tokens (evidence: `backend/server/tokenManager/systemTokenStore.js`)
- GIS User → Dioxus Clients: uses (evidence: `README.md`)
- Dioxus Clients → Axum API: calls API (evidence: `README.md`)
- Axum API → API Interface: routes requests
- API Interface → GIS Core: uses GIS services
- API Interface → Application Logic: uses application logic
- Application Logic → Postgres Repositories: loads policies
