# codercake10/flowsense architecture

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

- Interactive diagram: https://gitdiagram.com/codercake10/flowsense
- Repository: https://github.com/codercake10/flowsense

## Overview

FlowSense is an indoor wayfinding and facility-operations platform. Visitors search destinations at a kiosk, generate multi-stop walking routes, and can continue directions on a phone; administrators configure maps and navigation graphs and manage users, hardware, and analytics. The graph includes those documented product branches, while wiring is limited to relationships supported by the sampled source or README. Several backend capabilities are documented but their implementation was not sampled.

Main entry points: [`frontend/client/src/pages/experience/KioskPage.tsx`](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/experience/KioskPage.tsx) (Kiosk and mobile), [`frontend/client/src/pages/Workspaces.tsx`](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/Workspaces.tsx) (Admin workspaces), [`backend/django/apps/map/models.py`](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/map/models.py) (Map and graph data), [`backend/django/apps/navigation/services.py`](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/navigation/services.py) (Route generation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_experience_ui["Kiosk and mobile<br/>[KioskPage.tsx]"]
  node_experience_routes["Route directions<br/>[routeSteps.ts]"]
  node_route_sketch["Route sketch<br/>[RouteSketch.tsx]"]
end

subgraph group_mapping["Maps and routing"]
  node_annotation_ui["Map annotation<br/>[MapAnnotation.tsx]"]
  node_map_api["Map API<br/>[__init__.py]"]
  node_annotation_api["Annotation API<br/>[__init__.py]"]
  node_annotation_service["Annotation service<br/>[services.py]"]
end

subgraph group_operations["Admin operations"]
  node_admin_ui["Admin workspaces<br/>[Workspaces.tsx]"]
  node_analytics_ui["Analytics workspace<br/>[Analytics.tsx]"]
  node_hardware_ui["Hardware workspace"]
  node_auth_ui["Admin sign-in<br/>[AuthPage.tsx]"]
end

subgraph group_backend["Backend services"]
  node_search_api["Search API<br/>[views.py]"]
  node_search_service["Search service<br/>[services.py]"]
  node_navigation_api["Navigation API<br/>[routes.py]"]
  node_navigation_service["Route generation<br/>[services.py]"]
  node_auth_api["Authentication API<br/>[views.py]"]
  node_auth_service["Authentication service<br/>[services.py]"]
  node_analytics_api["Analytics API<br/>[views.py]"]
  node_hardware_api["Hardware API<br/>[views.py]"]
end

subgraph group_state["Persistent state"]
  node_map_state[("Map and graph data<br/>[models.py]")]
  node_navigation_state[("Navigation records<br/>[models.py]")]
  node_auth_state[("Admin and sessions<br/>[models.py]")]
  node_analytics_state[("Activity and metrics<br/>[models.py]")]
  node_hardware_state[("Device records<br/>[models.py]")]
end

node_visitor(("Visitor"))
node_admin(("Administrator"))
node_mqtt["MQTT broker"]

node_visitor -->|"uses"| node_experience_ui
node_experience_ui -->|"searches"| node_search_api
node_search_api -->|"calls"| node_search_service
node_search_service -->|"queries"| node_map_state
node_experience_ui -->|"requests route"| node_navigation_api
node_navigation_api -->|"calls"| node_navigation_service
node_navigation_service -->|"reads graph"| node_map_state
node_navigation_service -->|"records request"| node_navigation_state
node_experience_ui -->|"shows directions"| node_experience_routes
node_experience_ui -->|"renders sketch"| node_route_sketch
node_admin -->|"signs in"| node_auth_ui
node_auth_ui -->|"authenticates"| node_auth_api
node_auth_api -->|"calls"| node_auth_service
node_auth_service -->|"manages sessions"| node_auth_state
node_admin -->|"manages"| node_admin_ui
node_admin_ui -->|"configures map"| node_annotation_ui
node_annotation_ui -->|"edits annotations"| node_annotation_api
node_annotation_api -->|"calls"| node_annotation_service
node_annotation_service -->|"updates graph"| node_map_state
node_admin_ui -->|"views map data"| node_map_api
node_map_api -->|"reads map"| node_map_state
node_admin_ui -->|"views metrics"| node_analytics_ui
node_analytics_ui -->|"requests analytics"| node_analytics_api
node_analytics_api -->|"reads activity"| node_analytics_state
node_admin_ui -->|"manages devices"| node_hardware_ui
node_hardware_ui -->|"updates devices"| node_hardware_api
node_hardware_api -->|"reads and writes"| node_hardware_state
node_mqtt -.->|"delivers telemetry"| node_hardware_api

click node_experience_ui "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/experience/KioskPage.tsx"
click node_experience_routes "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/lib/routeSteps.ts"
click node_route_sketch "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/components/RouteSketch.tsx"
click node_admin_ui "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/Workspaces.tsx"
click node_analytics_ui "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/workspaces/Analytics.tsx"
click node_hardware_ui "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/workspaces/HardwareManagement.tsx"
click node_annotation_ui "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/workspaces/MapAnnotation.tsx"
click node_auth_ui "https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/experience/AuthPage.tsx"
click node_search_api "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/search/views.py"
click node_search_service "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/search/services.py"
click node_navigation_api "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/navigation/views/routes.py"
click node_navigation_service "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/navigation/services.py"
click node_map_api "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/map/views/__init__.py"
click node_annotation_api "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/annotation/views/__init__.py"
click node_annotation_service "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/annotation/services.py"
click node_auth_api "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/authentication/views.py"
click node_auth_service "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/authentication/services.py"
click node_analytics_api "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/analytics/views.py"
click node_hardware_api "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/hardware/views.py"
click node_map_state "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/map/models.py"
click node_navigation_state "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/analytics/models.py"
click node_auth_state "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/authentication/models.py"
click node_analytics_state "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/analytics/models.py"
click node_hardware_state "https://github.com/codercake10/flowsense/blob/main/backend/django/apps/hardware/models.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_experience_ui,node_experience_routes,node_route_sketch toneBlue
class node_annotation_ui,node_map_api,node_annotation_api,node_annotation_service toneAmber
class node_admin_ui,node_analytics_ui,node_hardware_ui,node_auth_ui toneMint
class node_search_api,node_search_service,node_navigation_api,node_navigation_service,node_auth_api,node_auth_service,node_analytics_api,node_hardware_api toneRose
class node_map_state,node_navigation_state,node_auth_state,node_analytics_state,node_hardware_state,node_visitor,node_admin,node_mqtt toneIndigo
```

## Components

### Visitor experience

- [Kiosk and mobile](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/experience/KioskPage.tsx): `frontend/client/src/pages/experience/KioskPage.tsx`
- [Route directions](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/lib/routeSteps.ts): `frontend/client/src/lib/routeSteps.ts`
- [Route sketch](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/components/RouteSketch.tsx): `frontend/client/src/components/RouteSketch.tsx`

### Maps and routing

- [Map annotation](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/workspaces/MapAnnotation.tsx): `frontend/client/src/pages/workspaces/MapAnnotation.tsx`
- [Map API](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/map/views/__init__.py): `backend/django/apps/map/views/__init__.py`
- [Annotation API](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/annotation/views/__init__.py): `backend/django/apps/annotation/views/__init__.py`
- [Annotation service](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/annotation/services.py): `backend/django/apps/annotation/services.py`

### Admin operations

- [Admin workspaces](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/Workspaces.tsx): `frontend/client/src/pages/Workspaces.tsx`
- [Analytics workspace](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/workspaces/Analytics.tsx): `frontend/client/src/pages/workspaces/Analytics.tsx`
- [Hardware workspace](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/workspaces/HardwareManagement.tsx): `frontend/client/src/pages/workspaces/HardwareManagement.tsx`
- [Admin sign-in](https://github.com/codercake10/flowsense/blob/main/frontend/client/src/pages/experience/AuthPage.tsx): `frontend/client/src/pages/experience/AuthPage.tsx`

### Backend services

- [Search API](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/search/views.py): `backend/django/apps/search/views.py`
- [Search service](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/search/services.py): `backend/django/apps/search/services.py`
- [Navigation API](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/navigation/views/routes.py): `backend/django/apps/navigation/views/routes.py`
- [Route generation](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/navigation/services.py): `backend/django/apps/navigation/services.py`
- [Authentication API](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/authentication/views.py): `backend/django/apps/authentication/views.py`
- [Authentication service](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/authentication/services.py): `backend/django/apps/authentication/services.py`
- [Analytics API](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/analytics/views.py): `backend/django/apps/analytics/views.py`
- [Hardware API](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/hardware/views.py): `backend/django/apps/hardware/views.py`

### Persistent state

- [Map and graph data](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/map/models.py): `backend/django/apps/map/models.py`
- [Navigation records](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/analytics/models.py): `backend/django/apps/analytics/models.py`
- [Admin and sessions](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/authentication/models.py): `backend/django/apps/authentication/models.py`
- [Activity and metrics](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/analytics/models.py): `backend/django/apps/analytics/models.py`
- [Device records](https://github.com/codercake10/flowsense/blob/main/backend/django/apps/hardware/models.py): `backend/django/apps/hardware/models.py`

### Other components

- **Visitor**
- **Administrator**
- **MQTT broker**

## Connections

- Visitor → Kiosk and mobile: uses
- Kiosk and mobile → Search API: searches
- Search API → Search service: calls
- Search service → Map and graph data: queries
- Kiosk and mobile → Navigation API: requests route
- Navigation API → Route generation: calls
- Route generation → Map and graph data: reads graph
- Route generation → Navigation records: records request
- Kiosk and mobile → Route directions: shows directions
- Kiosk and mobile → Route sketch: renders sketch
- Administrator → Admin sign-in: signs in
- Admin sign-in → Authentication API: authenticates
- Authentication API → Authentication service: calls
- Authentication service → Admin and sessions: manages sessions
- Administrator → Admin workspaces: manages
- Admin workspaces → Map annotation: configures map
- Map annotation → Annotation API: edits annotations
- Annotation API → Annotation service: calls
- Annotation service → Map and graph data: updates graph
- Admin workspaces → Map API: views map data
- Map API → Map and graph data: reads map
- Admin workspaces → Analytics workspace: views metrics
- Analytics workspace → Analytics API: requests analytics
- Analytics API → Activity and metrics: reads activity
- Admin workspaces → Hardware workspace: manages devices
- Hardware workspace → Hardware API: updates devices
- Hardware API → Device records: reads and writes
- MQTT broker → Hardware API: delivers telemetry
