How lixiny-code/echo works
Echo is an AI-companionship and reflection app for students. A user completes optional onboarding, chats with an AI, can inspect its reasoning or compare alternative replies, and may revisit sessions; separate flows support private journaling, weekly insights, reality quests, and a blindspot garden. The frontend API service switches between local mock behavior and backend requests. The backend route excerpts and README support the main API and persistence boundaries; wiring for several unsampled endpoints is therefore shown only at those boundaries.
Main entry points: api.ts API service · store.js Data access · ChatPage.tsx Chat page · prompts.js AI prompts and logic
Components 23
App experience
- App and routes
src/App.tsx - Onboarding
src/components/Onboarding.tsx - Chat page
src/pages/ChatPage.tsx - Journal page
src/pages/JournalPage.tsx - Insights page
src/pages/InsightsPage.tsx - Corner page
src/pages/CornerPage.tsx - API service
src/services/api.ts
Reflection features
- Chat panels
src/features/chat - Blindspot garden
src/pages/BlindspotGardenPage.tsx
Backend API
- Chat endpoint
api/chat.js - Conversation Lab
api/lab.js - Sessions and analysis
api/sessions.js - Journal endpoint
api/journal.js - Insights endpoint
api/insights.js - Quest completion
api/quest/complete.js - Blindspot endpoints
api/blindspot/[action].js - Glimmer endpoints
api/glimmer/[action].js
AI and persistence
- AI prompts and logic
lib/prompts.js - Data access
lib/store.js - Supabase client
lib/supabase.js
Other components
- Student
- DeepSeek
- Supabase data
Connections 37
- Student → App and routes: opens
- App and routes → Onboarding: shows first
- Onboarding → API service: saves profile
- App and routes → Chat page: routes to
- Chat page → Chat panels: renders
- Chat page → API service: requests chat
- Chat page → API service: requests lab
- Chat page → API service: manages sessions
- Student → Journal page: writes
- Journal page → API service: loads and saves
- Student → Insights page: views
- Insights page → API service: requests report
- Student → Corner page: tracks progress
- Corner page → API service: loads quests
- Student → Blindspot garden: tends
- Blindspot garden → API service: manages seeds
- API service → Chat endpoint: calls
- API service → Conversation Lab: calls
- API service → Sessions and analysis: calls
- API service → Journal endpoint: calls
- API service → Insights endpoint: calls
- API service → Quest completion: calls
- API service → Blindspot endpoints: calls
- API service → Glimmer endpoints: calls
- Chat endpoint → AI prompts and logic: uses prompts
- Conversation Lab → AI prompts and logic: uses prompts
- Sessions and analysis → AI prompts and logic: generates analysis
- AI prompts and logic → DeepSeek: requests generation
- Chat endpoint → Data access: reads and writes
- Sessions and analysis → Data access: reads and writes
- Journal endpoint → Data access: reads and writes
- Insights endpoint → Data access: reads
- Quest completion → Data access: records completion
- Blindspot endpoints → Data access: reads and writes
- Glimmer endpoints → Data access: reads and writes
- Data access → Supabase client: uses client
- Supabase client → Supabase data: queries