How fabriciosilvatattoo/nexus-v2---audio-experience works
NEXUS is a browser-based AI assistant centered on a chat interface, with text chat, generated images, live voice conversation, and spoken responses. The main workflow is user input through ChatInterface, Gemini-backed processing, and display or audio playback of the response. AudioPlayer is a separate text-to-speech playback component in the source tree; the sampled App entry point does not show it being mounted. The diagram reflects sampled calls and documented behavior; unsampled integration details are omitted.
Main entry points: ChatInterface.tsx Chat interface · geminiService.ts Gemini service · types.ts Message types · AudioPlayer.tsx Audio player
Components 11
Application UI
- React entry
index.tsx - App shell
App.tsx - Chat interface
components/ChatInterface.tsx
AI capabilities
- Gemini service
services/geminiService.ts - Image generation
services/geminiService.ts
Audio handling
- Audio player
components/AudioPlayer.tsx - Audio conversion
utils/audioUtils.ts
Shared configuration
- Assistant instructions
constants.ts - Message types
types.ts
Other components
- User
- Google Gemini
Connections 17
- User → Chat interface: sends input
components/ChatInterface.tsx - React entry → App shell: mounts
index.tsx - App shell → Chat interface: renders
App.tsx - Chat interface → Gemini service: requests response
components/ChatInterface.tsx - Gemini service → Chat interface: returns response
components/ChatInterface.tsx - Gemini service → Google Gemini: calls models
services/geminiService.ts - Gemini service → Image generation: invokes
services/geminiService.ts - Image generation → Google Gemini: generates image
services/geminiService.ts - Chat interface → Google Gemini: opens live session
components/ChatInterface.tsx - Chat interface → Audio conversion: encodes and decodes
components/ChatInterface.tsx - Chat interface → Gemini service: requests speech
components/ChatInterface.tsx - Audio player → Gemini service: requests speech
components/AudioPlayer.tsx - Chat interface → Assistant instructions: uses instructions
components/ChatInterface.tsx - Gemini service → Assistant instructions: configures prompts
services/geminiService.ts - Chat interface → Message types: uses message types
components/ChatInterface.tsx - Gemini service → Message types: uses message types
services/geminiService.ts - Audio player → Message types: uses chunk type
components/AudioPlayer.tsx