How prjvvl/maya-ai-assistant works
Maya is a browser-based talking assistant. The user speaks through the chat UI; speech controls convert input to text, the page sends it with recent conversation context to the chat endpoint, and the resulting reply is displayed and spoken aloud. The endpoint generates replies with Gemini. The graph reflects the sampled page, endpoint, and component excerpts plus README capabilities; browser speech APIs are external dependencies.
Main entry points: +page.svelte Conversation coordinator · ChatInterface.svelte Chat interface · +server.ts Chat endpoint · speechService.ts Speech service
Components 9
Conversation UI
- Conversation coordinator
src/routes/+page.svelte - Chat interface
src/lib/ChatInterface.svelte - Message types
src/lib/types.ts
Speech I/O
- Speech controls
src/lib/SpeechControls.svelte - Speech service
src/lib/speechService.ts - Browser Speech APIs
Response generation
- Chat endpoint
src/routes/api/chat/+server.ts - Google Gemini
Other components
- User
Connections 12
- User → Chat interface: converses in
README.md - Conversation coordinator → Chat interface: renders
src/routes/+page.svelte - Chat interface → Speech controls: renders
src/lib/ChatInterface.svelte - Chat interface → Conversation coordinator: emits events
src/routes/+page.svelte - Chat interface → Message types: uses types
src/lib/ChatInterface.svelte - Conversation coordinator → Message types: uses types
src/routes/+page.svelte - Speech controls → Speech service: controls
src/lib/SpeechControls.svelte - Speech service → Browser Speech APIs: uses
README.md - Conversation coordinator → Speech service: speaks replies
src/routes/+page.svelte - Conversation coordinator → Chat endpoint: posts message
src/routes/+page.svelte - Chat endpoint → Google Gemini: generates reply
src/routes/api/chat/+server.ts - Chat endpoint → Conversation coordinator: returns response
src/routes/+page.svelte