How dakshgoyal1812/waguri works
Waguri is a persistent AI persona companion spanning a React client and Node/Express API. The main turn begins with a user message, passes through chat orchestration, persona/context retrieval, LLM response, mood selection and optional speech, then returns text and audio for the client. The README also documents voice input, games, memory inspection, authentication, alarms/push, and an animated VRM avatar. Edges are limited to relationships shown in excerpts or SOURCE INDEX references; unsampled subsystem links are omitted where their caller is not evidenced.
Main entry points: chat.js Chat orchestrator · App.jsx Companion UI · server.js HTTP API · api.js API client
Components 27
Companion client
- Companion UI
frontend/src/App.jsx - API client
frontend/src/api.js - Voice input
frontend/src/useVoiceInput.js - Supabase auth
frontend/src/supabaseClient.js
Conversation runtime
- HTTP API
backend/src/server.js - Chat orchestrator
backend/src/orchestrator/chat.js - Prompt builder
backend/src/prompt.js - LLM caller
backend/src/llm/caller.js - Key pool
backend/src/keys/keyPool.js
Persona services
- RAG memory
backend/src/db/supabase.js - Embedding provider
backend/src/rag/embeddings.js - Memory chunker
backend/src/rag/chunker.js - Persona data
backend/src/personaSeed.js - Mood engine
backend/src/mood/engine.js - Public API tools
backend/src/tools/publicApis.js - Chat games
backend/src/games/index.js - Speech synthesis
backend/src/tts/index.js - Audio cache
backend/src/audioCache.js
Avatar and alerts
- VRM renderer
frontend/src/components/AvatarCanvas.jsx - Avatar registry
frontend/src/lib/vrmStore.js - Memory inspector
frontend/src/components/MemoryInspector.jsx - Push client
frontend/src/lib/pushClient.js - Push service
backend/src/push/index.js - Push scheduler
backend/src/push/scheduler.js
Other components
- User
- Public API providers
- Speech providers
Connections 28
- User → Companion UI: interacts with
- Companion UI → API client: sends chat
frontend/src/api.js - Companion UI → Voice input: uses voice input
frontend/src/App.jsx - API client → HTTP API: HTTP requests
frontend/src/api.js - HTTP API → Chat orchestrator: routes chat
backend/src/server.js - Chat orchestrator → Prompt builder: builds prompts
backend/src/orchestrator/chat.js - Chat orchestrator → LLM caller: requests completion
backend/src/orchestrator/chat.js - LLM caller → Key pool: rotates keys
backend/src/llm/caller.js - Chat orchestrator → RAG memory: retrieves and stores
- Chat orchestrator → Embedding provider: embeds text
backend/src/orchestrator/chat.js - Chat orchestrator → Memory chunker: chunks exchanges
backend/src/orchestrator/chat.js - Chat orchestrator → Persona data: loads persona
backend/src/orchestrator/chat.js - Chat orchestrator → Mood engine: selects mood
- Chat orchestrator → Public API tools: enriches context
backend/src/orchestrator/chat.js - HTTP API → Chat games: routes game API
backend/src/server.js - Chat orchestrator → Speech synthesis: synthesizes reply
- Speech synthesis → Speech providers: calls providers
backend/src/tts/index.js - Chat orchestrator → Audio cache: stores audio
backend/src/orchestrator/chat.js - Companion UI → VRM renderer: renders avatar
frontend/src/App.jsx - VRM renderer → Avatar registry: loads custom avatars
frontend/src/components/AvatarCanvas.jsx - Companion UI → Memory inspector: opens inspector
frontend/src/App.jsx - Memory inspector → API client: calls memory API
frontend/src/components/MemoryInspector.jsx - Companion UI → Push client: manages notifications
frontend/src/App.jsx - Push client → HTTP API: calls push endpoints
- HTTP API → Push service: serves push routes
backend/src/server.js - HTTP API → Push scheduler: evaluates on health ping
backend/src/server.js - Public API tools → Public API providers: fetches public data
backend/src/tools/publicApis.js - Supabase auth → API client: fetches allowed users
frontend/src/supabaseClient.js