How datascientist88/german_lang_trainer_v1 works
This is a patient-facing hospital assistant web app, with voice and text interaction modes and an optional avatar page. The intended workflow is a visitor asking for hospital navigation help and receiving a spoken or streamed-text response. The sampled backend also implements a Realtime session endpoint and vector search, but its prompt describes a German-language tutor rather than the hospital assistant; the README documents text-chat endpoints that are not present in the sampled backend. The graph shows those documented text services as external and limits backend connections to visible code.
Main entry points: VoiceAssistant.jsx Voice assistant · App.js App routing · Chat.jsx Text chat · app.py Realtime signaling
Components 22
Web application
- App routing
frontend/src/App.js - Navigation and theme
frontend/src/components/Navbar.jsx - Voice page
frontend/src/pages/VoiceAssistantPage.jsx - Chat page
frontend/src/pages/TextChatPage.jsx - Avatar page
frontend/src/pages/AvatarPage.jsx - Theme switch
frontend/src/components/ThemeSwitch.jsx
Voice interaction
- Voice assistant
frontend/src/components/VoiceAssistant.jsx - Audio orb
frontend/src/components/BaseOrb.jsx - Audio wave
frontend/src/components/AudioWave.jsx - Audio level analysis
frontend/src/components/audioLevelAnalyzer.jsx - PCM to WAV
frontend/src/components/pcmToWav.js - Visualizer state
frontend/src/store/useAudioForVisualizerStore.js
Text interaction
- Text chat
frontend/src/components/Chat.jsx - Chat input
frontend/src/components/ChatInputWidget.jsx - Diagram rendering
frontend/src/components/Mermaid.jsx
Assistant services
- Hosted chat service
- Realtime signaling
backend/app.py - Realtime instructions
backend/prompts/system_prompt.py - Vector search endpoint
backend/app.py
Other components
- Visitor
- OpenAI Realtime
- Qdrant vector store
Connections 25
- Visitor → App routing: opens
frontend/src/App.js - App routing → Voice page: routes to
frontend/src/App.js - App routing → Chat page: routes to
frontend/src/App.js - App routing → Avatar page: routes to
frontend/src/App.js - App routing → Navigation and theme: renders
frontend/src/App.js - Navigation and theme → Theme switch: renders
frontend/src/components/Navbar.jsx - Voice page → Voice assistant: renders
frontend/src/pages/VoiceAssistantPage.jsx - Chat page → Text chat: loads
frontend/src/pages/TextChatPage.jsx - Voice assistant → Audio orb: renders
frontend/src/components/VoiceAssistant.jsx - Voice assistant → Audio level analysis: monitors mic
frontend/src/components/VoiceAssistant.jsx - Voice assistant → PCM to WAV: encodes audio
frontend/src/components/VoiceAssistant.jsx - Voice assistant → Visualizer state: updates
frontend/src/components/VoiceAssistant.jsx - Audio orb → Visualizer state: reads scale
frontend/src/components/BaseOrb.jsx - Audio orb → Audio level analysis: enhances scale
frontend/src/components/BaseOrb.jsx - Voice assistant → Audio wave: renders visualizer
frontend/src/components/VoiceAssistant.jsx - Voice assistant → Realtime signaling: exchanges SDP
README.md - Realtime signaling → Realtime instructions: sets instructions
backend/app.py - Realtime signaling → OpenAI Realtime: creates session
backend/app.py - Realtime signaling → OpenAI Realtime: exchanges SDP
backend/app.py - Text chat → Chat input: renders
frontend/src/components/Chat.jsx - Text chat → Diagram rendering: renders diagrams
frontend/src/components/Chat.jsx - Text chat → Hosted chat service: streams chat
frontend/src/components/Chat.jsx - Text chat → Hosted chat service: fetches suggestions
frontend/src/components/Chat.jsx - Visitor → Vector search endpoint: submits query
- Vector search endpoint → Qdrant vector store: searches vectors
backend/app.py