# aryansharma-hub/signsense architecture

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

- Interactive diagram: https://gitdiagram.com/aryansharma-hub/signsense
- Repository: https://github.com/aryansharma-hub/signsense

## Overview

SignSense is a two-way communication aid: a signer composes signs through direct manipulation, while a hearing person speaks or types for conversion into signs. Both directions feed one conversation transcript and use the same signer performer. The graph preserves the documented offline and optional AI tiers, vocabulary service, and draft-data store. Some subsystem internals were not excerpted, so documented relationships are included while uncertain implementation links are omitted.

Main entry points: [`server/src/app.js`](https://github.com/aryansharma-hub/signsense/blob/main/server/src/app.js) (API router), [`client/src/components/Stage.jsx`](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/Stage.jsx) (Shared signing stage), [`client/src/hooks/useSpeechToText.js`](https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useSpeechToText.js) (Speech recognition), [`client/src/hooks/useReverseAssembler.js`](https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useReverseAssembler.js) (Speech turn controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App coordinator<br/>[App.jsx]"]
  node_conversation["Conversation transcript<br/>[Conversation.jsx]"]
  node_stage["Shared signing stage<br/>[Stage.jsx]"]
  node_performer["Signer figure<br/>[SignerDummy.jsx]"]
  node_pose["Pose and movement<br/>[pose.js]"]
  node_api_client["API client<br/>[client.js]"]
end

subgraph group_signer["Sign composition"]
  node_composer["Sign composer<br/>[useComposer.js]"]
  node_parameter_ui["Parameter controls"]
  node_step_ui["Step timeline<br/>[StepsBar.jsx]"]
  node_suggestions["Sign suggestions<br/>[Suggestions.jsx]"]
  node_sign_search["Parameter search<br/>[search.js]"]
  node_sentence_ui["Sentence builder"]
  node_sentence_assembly["Sentence assembly"]
end

subgraph group_hearing["Speech to sign"]
  node_speech_input["Speech recognition<br/>[useSpeechToText.js]"]
  node_native_stt["Browser recognition<br/>[nativeTier.js]"]
  node_server_stt["Server transcription<br/>[serverTier.js]"]
  node_reverse["Speech turn controller"]
  node_gloss["Speech to concepts"]
end

subgraph group_server["API and vocabulary"]
  node_api_routes["API router<br/>[app.js]"]
  node_vocabulary_route["Vocabulary service<br/>[vocabulary.js]"]
  node_ai_routes["AI endpoints<br/>[ai.js]"]
  node_stt_route["Transcription endpoint<br/>[stt.js]"]
  node_llm["LLM integration<br/>[llm.js]"]
  node_queries["Vocabulary queries<br/>[queries.js]"]
  node_database[("Vocabulary database<br/>[adapter.js]")]
  node_config["Service configuration<br/>[config.js]"]
end

node_signer_actor(("Signer"))
node_hearing_actor(("Hearing person"))
node_external_llm(("Anthropic API"))
node_external_stt(("Transcription API"))

node_signer_actor -->|"sets parameters"| node_parameter_ui
node_parameter_ui -->|"updates steps"| node_composer
node_step_ui -->|"edits steps"| node_composer
node_composer -->|"supplies pose"| node_stage
node_suggestions -.->|"searches parameters"| node_sign_search
node_sign_search -.->|"loads vocabulary"| node_api_routes
node_sentence_ui -->|"assembles glosses"| node_sentence_assembly
node_sentence_ui -.->|"requests playback"| node_stage
node_sentence_ui -->|"adds signer turn"| node_conversation
node_hearing_actor -->|"speaks or types"| node_speech_input
node_speech_input -->|"selects tier"| node_native_stt
node_speech_input -->|"selects tier"| node_server_stt
node_speech_input -->|"submits transcript"| node_reverse
node_reverse -->|"analyzes transcript"| node_gloss
node_reverse -->|"performs signs"| node_stage
node_reverse -->|"adds hearing turn"| node_conversation
node_stage -->|"renders signs"| node_performer
node_performer -->|"uses targets"| node_pose
node_app -->|"displays turns"| node_conversation
node_app -->|"creates state"| node_composer
node_app -->|"shows performer"| node_stage
node_api_client -->|"requests endpoints"| node_api_routes
node_api_routes -->|"routes requests"| node_vocabulary_route
node_api_routes -->|"routes requests"| node_ai_routes
node_api_routes -->|"routes requests"| node_stt_route
node_vocabulary_route -->|"reads vocabulary"| node_queries
node_ai_routes -->|"loads keywords"| node_queries
node_ai_routes -->|"requests completion"| node_llm
node_llm -->|"sends prompt"| node_external_llm
node_queries -.->|"queries data"| node_database
node_server_stt -->|"uploads audio"| node_stt_route
node_stt_route -->|"requests transcription"| node_external_stt
node_config -.->|"configures access"| node_external_llm
node_config -.->|"configures access"| node_external_stt

click node_app "https://github.com/aryansharma-hub/signsense/blob/main/client/src/App.jsx"
click node_conversation "https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/Conversation.jsx"
click node_composer "https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useComposer.js"
click node_parameter_ui "https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/ParameterPanels.jsx"
click node_step_ui "https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/StepsBar.jsx"
click node_suggestions "https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/Suggestions.jsx"
click node_sign_search "https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/search.js"
click node_sentence_ui "https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/SentenceBuilder.jsx"
click node_sentence_assembly "https://github.com/aryansharma-hub/signsense/tree/main/client/src/lib/sentenceAssembler"
click node_stage "https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/Stage.jsx"
click node_performer "https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/SignerDummy.jsx"
click node_pose "https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/pose.js"
click node_speech_input "https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useSpeechToText.js"
click node_native_stt "https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/stt/nativeTier.js"
click node_server_stt "https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/stt/serverTier.js"
click node_reverse "https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useReverseAssembler.js"
click node_gloss "https://github.com/aryansharma-hub/signsense/tree/main/client/src/lib/speechToGloss"
click node_api_client "https://github.com/aryansharma-hub/signsense/blob/main/client/src/api/client.js"
click node_api_routes "https://github.com/aryansharma-hub/signsense/blob/main/server/src/app.js"
click node_vocabulary_route "https://github.com/aryansharma-hub/signsense/blob/main/server/src/routes/vocabulary.js"
click node_ai_routes "https://github.com/aryansharma-hub/signsense/blob/main/server/src/routes/ai.js"
click node_stt_route "https://github.com/aryansharma-hub/signsense/blob/main/server/src/routes/stt.js"
click node_llm "https://github.com/aryansharma-hub/signsense/blob/main/server/src/llm.js"
click node_queries "https://github.com/aryansharma-hub/signsense/blob/main/server/src/db/queries.js"
click node_database "https://github.com/aryansharma-hub/signsense/blob/main/server/src/db/adapter.js"
click node_config "https://github.com/aryansharma-hub/signsense/blob/main/server/src/config.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_app,node_conversation,node_stage,node_performer,node_pose,node_api_client toneBlue
class node_composer,node_parameter_ui,node_step_ui,node_suggestions,node_sign_search,node_sentence_ui,node_sentence_assembly toneAmber
class node_speech_input,node_native_stt,node_server_stt,node_reverse,node_gloss,node_external_llm,node_external_stt toneMint
class node_api_routes,node_vocabulary_route,node_ai_routes,node_stt_route,node_llm,node_queries,node_database,node_config toneRose
class node_signer_actor,node_hearing_actor toneIndigo
```

## Components

### Client experience

- [App coordinator](https://github.com/aryansharma-hub/signsense/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Conversation transcript](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/Conversation.jsx): `client/src/components/Conversation.jsx`
- [Shared signing stage](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/Stage.jsx): `client/src/components/Stage.jsx`
- [Signer figure](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/SignerDummy.jsx): `client/src/components/SignerDummy.jsx`
- [Pose and movement](https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/pose.js): `client/src/lib/pose.js`
- [API client](https://github.com/aryansharma-hub/signsense/blob/main/client/src/api/client.js): `client/src/api/client.js`

### Sign composition

- [Sign composer](https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useComposer.js): `client/src/hooks/useComposer.js`
- [Parameter controls](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/ParameterPanels.jsx): `client/src/components/ParameterPanels.jsx`
- [Step timeline](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/StepsBar.jsx): `client/src/components/StepsBar.jsx`
- [Sign suggestions](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/Suggestions.jsx): `client/src/components/Suggestions.jsx`
- [Parameter search](https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/search.js): `client/src/lib/search.js`
- [Sentence builder](https://github.com/aryansharma-hub/signsense/blob/main/client/src/components/SentenceBuilder.jsx): `client/src/components/SentenceBuilder.jsx`
- [Sentence assembly](https://github.com/aryansharma-hub/signsense/tree/main/client/src/lib/sentenceAssembler): `client/src/lib/sentenceAssembler`

### Speech to sign

- [Speech recognition](https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useSpeechToText.js): `client/src/hooks/useSpeechToText.js`
- [Browser recognition](https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/stt/nativeTier.js): `client/src/lib/stt/nativeTier.js`
- [Server transcription](https://github.com/aryansharma-hub/signsense/blob/main/client/src/lib/stt/serverTier.js): `client/src/lib/stt/serverTier.js`
- [Speech turn controller](https://github.com/aryansharma-hub/signsense/blob/main/client/src/hooks/useReverseAssembler.js): `client/src/hooks/useReverseAssembler.js`
- [Speech to concepts](https://github.com/aryansharma-hub/signsense/tree/main/client/src/lib/speechToGloss): `client/src/lib/speechToGloss`

### API and vocabulary

- [API router](https://github.com/aryansharma-hub/signsense/blob/main/server/src/app.js): `server/src/app.js`
- [Vocabulary service](https://github.com/aryansharma-hub/signsense/blob/main/server/src/routes/vocabulary.js): `server/src/routes/vocabulary.js`
- [AI endpoints](https://github.com/aryansharma-hub/signsense/blob/main/server/src/routes/ai.js): `server/src/routes/ai.js`
- [Transcription endpoint](https://github.com/aryansharma-hub/signsense/blob/main/server/src/routes/stt.js): `server/src/routes/stt.js`
- [LLM integration](https://github.com/aryansharma-hub/signsense/blob/main/server/src/llm.js): `server/src/llm.js`
- [Vocabulary queries](https://github.com/aryansharma-hub/signsense/blob/main/server/src/db/queries.js): `server/src/db/queries.js`
- [Vocabulary database](https://github.com/aryansharma-hub/signsense/blob/main/server/src/db/adapter.js): `server/src/db/adapter.js`
- [Service configuration](https://github.com/aryansharma-hub/signsense/blob/main/server/src/config.js): `server/src/config.js`

### Other components

- **Signer**
- **Hearing person**
- **Anthropic API**
- **Transcription API**

## Connections

- Signer → Parameter controls: sets parameters
- Parameter controls → Sign composer: updates steps (evidence: `client/src/App.jsx`)
- Step timeline → Sign composer: edits steps (evidence: `client/src/App.jsx`)
- Sign composer → Shared signing stage: supplies pose (evidence: `client/src/App.jsx`)
- Sign suggestions → Parameter search: searches parameters
- Parameter search → API router: loads vocabulary
- Sentence builder → Sentence assembly: assembles glosses (evidence: `client/src/components/SentenceBuilder.jsx`)
- Sentence builder → Shared signing stage: requests playback
- Sentence builder → Conversation transcript: adds signer turn (evidence: `client/src/App.jsx`)
- Hearing person → Speech recognition: speaks or types
- Speech recognition → Browser recognition: selects tier (evidence: `client/src/hooks/useSpeechToText.js`)
- Speech recognition → Server transcription: selects tier (evidence: `client/src/hooks/useSpeechToText.js`)
- Speech recognition → Speech turn controller: submits transcript (evidence: `client/src/App.jsx`)
- Speech turn controller → Speech to concepts: analyzes transcript (evidence: `client/src/hooks/useReverseAssembler.js`)
- Speech turn controller → Shared signing stage: performs signs (evidence: `client/src/hooks/useReverseAssembler.js`)
- Speech turn controller → Conversation transcript: adds hearing turn (evidence: `client/src/App.jsx`)
- Shared signing stage → Signer figure: renders signs (evidence: `client/src/components/Stage.jsx`)
- Signer figure → Pose and movement: uses targets (evidence: `client/src/components/SignerDummy.jsx`)
- App coordinator → Conversation transcript: displays turns (evidence: `client/src/App.jsx`)
- App coordinator → Sign composer: creates state (evidence: `client/src/App.jsx`)
- App coordinator → Shared signing stage: shows performer (evidence: `client/src/App.jsx`)
- API client → API router: requests endpoints
- API router → Vocabulary service: routes requests (evidence: `server/src/app.js`)
- API router → AI endpoints: routes requests (evidence: `server/src/app.js`)
- API router → Transcription endpoint: routes requests (evidence: `server/src/app.js`)
- Vocabulary service → Vocabulary queries: reads vocabulary (evidence: `server/src/routes/vocabulary.js`)
- AI endpoints → Vocabulary queries: loads keywords (evidence: `server/src/routes/ai.js`)
- AI endpoints → LLM integration: requests completion (evidence: `server/src/routes/ai.js`)
- LLM integration → Anthropic API: sends prompt (evidence: `server/src/llm.js`)
- Vocabulary queries → Vocabulary database: queries data
- Server transcription → Transcription endpoint: uploads audio
- Transcription endpoint → Transcription API: requests transcription
- Service configuration → Anthropic API: configures access
- Service configuration → Transcription API: configures access
