# e-harini-sri-reddy/echofloor architecture

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

- Interactive diagram: https://gitdiagram.com/e-harini-sri-reddy/echofloor
- Repository: https://github.com/e-harini-sri-reddy/echofloor

## Overview

EchoFloor is a mobile-first factory operations memory product, but the README characterizes the current client as a navigable mockup and the API as partly configuration-only. The principal documented live flow is a worker asking a machine-specific voice question: the browser sends audio to the EchoFloor API, which can submit it to n8n and return a status/result. Other documented branches cover reports, handovers, alerts, workspace data, and memory search/indexing. Backend workflow links rely on README and SOURCE INDEX references; unsampled client and route implementations are not assumed to have been inspected.

Main entry points: [`server/src/app.ts`](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/app.ts) (HTTP API), [`server/src/services/memoryEmbedding.ts`](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/memoryEmbedding.ts) (Memory Embedding), [`server/src/services/n8nClient.ts`](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/n8nClient.ts) (n8n Webhook Client), [`client/src/app/router.tsx`](https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/app/router.tsx) (Role Navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Worker and Admin Client"]
  node_client_app["Client App<br/>[App.tsx]"]
  node_routes_ui["Role Navigation<br/>[router.tsx]"]
  node_workspace_ui["Workspace Views"]
  node_voice_ui["Voice Assistant<br/>[VoiceAssistant.tsx]"]
  node_speech["Speech Output<br/>[useSpeech.ts]"]
  node_client_data["API and Mock Data"]
end

subgraph group_api["EchoFloor API"]
  node_api_app["HTTP API<br/>[app.ts]"]
  node_auth["Google Identity<br/>[google.ts]"]
  node_workspace_api["Workspace Data<br/>[workspace.ts]"]
  node_session_guard["Live Session Check"]
  node_voice_api["Voice Questions<br/>[voice.ts]"]
  node_reports_api["Voice Reports<br/>[reportsVoice.ts]"]
  node_handover_api["Shift Handovers"]
  node_alerts_api["Workflow Alerts<br/>[n8nAlerts.ts]"]
  node_callbacks_api["Workflow Callbacks<br/>[workflows.ts]"]
  node_config["Integration Config<br/>[env.ts]"]
  node_mongo[("MongoDB Workspace<br/>[mongo.ts]")]
end

subgraph group_memory["Memory and Search"]
  node_memory_index["Memory Embedding<br/>[memoryEmbedding.ts]"]
  node_search["Search Records<br/>[searchRecords.ts]"]
  node_search_text["Searchable Text"]
end

subgraph group_integrations["External Integrations"]
  node_embedding_provider["Embedding Provider<br/>[embeddings.ts]"]
  node_n8n_client["n8n Webhook Client<br/>[n8nClient.ts]"]
end

node_worker(("Worker"))
node_admin(("Administrator"))
node_n8n{{"n8n Workflows"}}
node_google{{"Google OAuth"}}

node_worker -->|"uses"| node_routes_ui
node_admin -->|"uses"| node_routes_ui
node_client_app -.->|"starts navigation"| node_routes_ui
node_worker -->|"asks question"| node_voice_ui
node_routes_ui -->|"offers views"| node_workspace_ui
node_voice_ui -->|"speaks answer"| node_speech
node_voice_ui -->|"requests API"| node_client_data
node_workspace_ui -->|"loads workspace"| node_client_data
node_client_data -->|"calls API"| node_api_app
node_api_app -->|"registers route"| node_voice_api
node_api_app -->|"registers route"| node_workspace_api
node_api_app -->|"registers route"| node_reports_api
node_api_app -->|"registers route"| node_handover_api
node_api_app -->|"registers route"| node_alerts_api
node_api_app -->|"registers route"| node_callbacks_api
node_api_app -->|"reports configuration"| node_config
node_api_app -->|"verifies identity"| node_auth
node_google -->|"provides identity token"| node_auth
node_workspace_api -->|"reads and writes"| node_mongo
node_voice_api -->|"checks session"| node_session_guard
node_reports_api -->|"checks session"| node_session_guard
node_handover_api -->|"checks session"| node_session_guard
node_alerts_api -->|"checks session"| node_session_guard
node_voice_api -->|"submits question"| node_n8n_client
node_reports_api -->|"submits report"| node_n8n_client
node_handover_api -->|"submits handover"| node_n8n_client
node_n8n_client -->|"posts webhook"| node_n8n
node_n8n -->|"posts callbacks"| node_callbacks_api
node_n8n -->|"publishes alerts"| node_alerts_api
node_callbacks_api -->|"updates embeddings"| node_memory_index
node_workspace_api -->|"triggers indexing"| node_memory_index
node_memory_index -->|"upserts records"| node_search
node_search -->|"builds text"| node_search_text
node_memory_index -->|"requests vectors"| node_embedding_provider
node_search -->|"requests vectors"| node_embedding_provider
node_memory_index -.->|"optionally delegates"| node_n8n_client

click node_client_app "https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/app/App.tsx"
click node_routes_ui "https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/app/router.tsx"
click node_workspace_ui "https://github.com/e-harini-sri-reddy/echofloor/tree/main/client/src/features"
click node_voice_ui "https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/features/voice/VoiceAssistant.tsx"
click node_speech "https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/hooks/useSpeech.ts"
click node_client_data "https://github.com/e-harini-sri-reddy/echofloor/tree/main/client/src/services"
click node_api_app "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/app.ts"
click node_auth "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/auth/google.ts"
click node_workspace_api "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/workspace.ts"
click node_session_guard "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/middleware/requireLiveSession.ts"
click node_voice_api "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/voice.ts"
click node_reports_api "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/reportsVoice.ts"
click node_handover_api "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/handoverWorkflow.ts"
click node_alerts_api "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/n8nAlerts.ts"
click node_callbacks_api "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/workflows.ts"
click node_config "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/config/env.ts"
click node_mongo "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/db/mongo.ts"
click node_memory_index "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/memoryEmbedding.ts"
click node_search "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/searchRecords.ts"
click node_search_text "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/buildSearchableText.ts"
click node_embedding_provider "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/embeddings.ts"
click node_n8n_client "https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/n8nClient.ts"

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_client_app,node_routes_ui,node_workspace_ui,node_voice_ui,node_speech,node_client_data toneBlue
class node_api_app,node_auth,node_workspace_api,node_session_guard,node_voice_api,node_reports_api,node_handover_api,node_alerts_api,node_callbacks_api,node_config,node_mongo toneAmber
class node_memory_index,node_search,node_search_text toneMint
class node_embedding_provider,node_n8n_client,node_worker toneRose
class node_admin,node_n8n,node_google toneIndigo
```

## Components

### Worker and Admin Client

- [Client App](https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/app/App.tsx): `client/src/app/App.tsx`
- [Role Navigation](https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/app/router.tsx): `client/src/app/router.tsx`
- [Workspace Views](https://github.com/e-harini-sri-reddy/echofloor/tree/main/client/src/features): `client/src/features`
- [Voice Assistant](https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/features/voice/VoiceAssistant.tsx): `client/src/features/voice/VoiceAssistant.tsx`
- [Speech Output](https://github.com/e-harini-sri-reddy/echofloor/blob/main/client/src/hooks/useSpeech.ts): `client/src/hooks/useSpeech.ts`
- [API and Mock Data](https://github.com/e-harini-sri-reddy/echofloor/tree/main/client/src/services): `client/src/services`

### EchoFloor API

- [HTTP API](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/app.ts): `server/src/app.ts`
- [Google Identity](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/auth/google.ts): `server/src/auth/google.ts`
- [Workspace Data](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/workspace.ts): `server/src/routes/workspace.ts`
- [Live Session Check](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/middleware/requireLiveSession.ts): `server/src/middleware/requireLiveSession.ts`
- [Voice Questions](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/voice.ts): `server/src/routes/voice.ts`
- [Voice Reports](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/reportsVoice.ts): `server/src/routes/reportsVoice.ts`
- [Shift Handovers](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/handoverWorkflow.ts): `server/src/routes/handoverWorkflow.ts`
- [Workflow Alerts](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/n8nAlerts.ts): `server/src/routes/n8nAlerts.ts`
- [Workflow Callbacks](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/routes/workflows.ts): `server/src/routes/workflows.ts`
- [Integration Config](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/config/env.ts): `server/src/config/env.ts`
- [MongoDB Workspace](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/db/mongo.ts): `server/src/db/mongo.ts`

### Memory and Search

- [Memory Embedding](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/memoryEmbedding.ts): `server/src/services/memoryEmbedding.ts`
- [Search Records](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/searchRecords.ts): `server/src/services/searchRecords.ts`
- [Searchable Text](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/buildSearchableText.ts): `server/src/services/buildSearchableText.ts`

### External Integrations

- [Embedding Provider](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/embeddings.ts): `server/src/services/embeddings.ts`
- [n8n Webhook Client](https://github.com/e-harini-sri-reddy/echofloor/blob/main/server/src/services/n8nClient.ts): `server/src/services/n8nClient.ts`

### Other components

- **Worker**
- **Administrator**
- **n8n Workflows**
- **Google OAuth**

## Connections

- Worker → Role Navigation: uses (evidence: `README.md`)
- Administrator → Role Navigation: uses (evidence: `README.md`)
- Client App → Role Navigation: starts navigation
- Worker → Voice Assistant: asks question (evidence: `README.md`)
- Role Navigation → Workspace Views: offers views (evidence: `README.md`)
- Voice Assistant → Speech Output: speaks answer (evidence: `README.md`)
- Voice Assistant → API and Mock Data: requests API (evidence: `README.md`)
- Workspace Views → API and Mock Data: loads workspace (evidence: `README.md`)
- API and Mock Data → HTTP API: calls API (evidence: `README.md`)
- HTTP API → Voice Questions: registers route (evidence: `server/src/app.ts`)
- HTTP API → Workspace Data: registers route (evidence: `server/src/app.ts`)
- HTTP API → Voice Reports: registers route (evidence: `server/src/app.ts`)
- HTTP API → Shift Handovers: registers route (evidence: `server/src/app.ts`)
- HTTP API → Workflow Alerts: registers route (evidence: `server/src/app.ts`)
- HTTP API → Workflow Callbacks: registers route (evidence: `server/src/app.ts`)
- HTTP API → Integration Config: reports configuration (evidence: `server/src/app.ts`)
- HTTP API → Google Identity: verifies identity (evidence: `server/src/app.ts`)
- Google OAuth → Google Identity: provides identity token (evidence: `README.md`)
- Workspace Data → MongoDB Workspace: reads and writes (evidence: `server/src/routes/workspace.ts`)
- Voice Questions → Live Session Check: checks session (evidence: `server/src/routes/voice.ts`)
- Voice Reports → Live Session Check: checks session (evidence: `server/src/routes/reportsVoice.ts`)
- Shift Handovers → Live Session Check: checks session (evidence: `server/src/routes/handoverWorkflow.ts`)
- Workflow Alerts → Live Session Check: checks session (evidence: `server/src/routes/n8nAlerts.ts`)
- Voice Questions → n8n Webhook Client: submits question (evidence: `server/src/routes/voice.ts`)
- Voice Reports → n8n Webhook Client: submits report (evidence: `server/src/routes/reportsVoice.ts`)
- Shift Handovers → n8n Webhook Client: submits handover (evidence: `server/src/routes/handoverWorkflow.ts`)
- n8n Webhook Client → n8n Workflows: posts webhook (evidence: `server/src/services/n8nClient.ts`)
- n8n Workflows → Workflow Callbacks: posts callbacks (evidence: `README.md`)
- n8n Workflows → Workflow Alerts: publishes alerts (evidence: `README.md`)
- Workflow Callbacks → Memory Embedding: updates embeddings (evidence: `server/src/routes/workflows.ts`)
- Workspace Data → Memory Embedding: triggers indexing (evidence: `server/src/routes/workspace.ts`)
- Memory Embedding → Search Records: upserts records (evidence: `server/src/services/memoryEmbedding.ts`)
- Search Records → Searchable Text: builds text (evidence: `server/src/services/searchRecords.ts`)
- Memory Embedding → Embedding Provider: requests vectors (evidence: `server/src/services/memoryEmbedding.ts`)
- Search Records → Embedding Provider: requests vectors (evidence: `server/src/services/searchRecords.ts`)
- Memory Embedding → n8n Webhook Client: optionally delegates (evidence: `server/src/services/memoryEmbedding.ts`)
