How shaunwei/realchar works
Project type and purpose
• This is a full-stack, multi-platform “Realtime AI Character” application.
• Purpose: let end users create, customize and converse with AI characters via Web (Next.js), Mobile (Android/Swift), CLI, and Twilio phone calls, all in real time.
File structure
• Root
• realtime_ai_character/ → FastAPI backend, business logic, WebSocket & REST routes, audio/LLM modules, Alembic migrations, SQLite/Postgres support, Twilio integration
• cli.py → entry point for running backend, dev servers, terminal client
• Dockerfile, docker-compose.yaml, sample_cloud_deployment/ → containerization and k8s manifests
• client/next-web/ → Next.js React web app, SSR, WebSocket client, uses Zustand for state, Tailwind, Firebase auth
• client/mobile/android/RealChar → Android Kotlin app (Jetpack Compose, WebSockets)
• client/mobile/ios/rac → iOS SwiftUI app (WebSockets)
• client/cli.py → optional terminal chat client
• alembic/ → database migration scripts
• requirements.txt, pyproject.toml → Python dependencies
README
• Tech stack summary: React, Swift/Kotlin, FastAPI, SQLite, Docker, LlamaIndex/Chroma, LangChain, OpenAI/Anthropic/ReByte, Whisper/WhisperX/Google STT, ElevenLabs/EdgeTTS/Google TTS, Twilio
• Deployment instructions: Docker Compose or direct Python + Uvicorn, optional Firebase OAuth
• Modular design emphasis: pluggable modules for STT, TTS, LLM, character catalog
Be as detailed as possible
• Alembic migration layer as part of data initialization