Voice-first AI companion named Shanti with session history, insights, and function calling.
- Node.js 20.9+ (recommended)
- npm
- SQLite (bundled via Prisma)
Create .env.local in the project root:
OPENAI_API_KEY=your_openai_key
DEEPGRAM_API_KEY=your_deepgram_key
DATABASE_URL="file:./dev.db"
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_secret
Notes:
DATABASE_URLpoints toprisma/dev.db.- You can generate a secret with
openssl rand -base64 32.
npm install
npx prisma migrate dev
Optional:
npx prisma studio
- Prisma schema lives at
prisma/schema.prisma. - SQLite database is stored at
prisma/dev.db(fromDATABASE_URL="file:./dev.db"). - To reset the database, delete
prisma/dev.dband rerunnpx prisma migrate dev.
npm run dev
Open http://localhost:3000.
app/UI + API routesapp/hooks/client hooks (voice, transcription, tools)app/components/UI componentsprisma/schema and migrations
log_emotional_stateexternalize_thoughtssave_sessionretrieve_related_sessionspark_worry_for_later
These are documented as a future roadmap and are not implemented yet.
{
"exercise_type": "box_breathing",
"duration_seconds": 60
}{
"pattern": "Overwhelm peaks before deadlines",
"confidence": 0.82
}- Realtime audio can stop playing after the first response in some browsers; refresh reconnects the WebRTC session.
- Tool calls sometimes require a second follow-up response to get audio if the model returns only function-call output first.
- Rate limits can surface during heavy STT usage; responses may delay or fail until limits reset.
- Make tool routing deterministic with explicit tool triggers or server-side tool orchestration.
- Improve reconnect logic for Realtime sessions and audio playback resilience.
- Add export/download of sessions and insights.
- Build a mobile app for easier, on-the-go access.
- Add reminders for sessions users asked to revisit later.