A full-stack AI tutoring app with a FastAPI backend, a Next.js web frontend, and a React Native mobile client. The current avatar stack uses a Hedra.ai + Coqui TTS pipeline to generate short daily technology update videos for each user.
- Ollama-powered tutor chat with
llama3by default andmistralsupport - RAG-backed answers using ChromaDB with chunked course content
- Seeded courses for Python, Machine Learning, Artificial Intelligence, and Data Science
- User photo upload plus reusable stylized avatar generation
- Daily technology update ingestion from configurable RSS and Atom feeds
- Coqui TTS audio generation for avatar speech
- Hedra.ai animation for personalized talking-avatar videos capped at 1 minute
- React Native flows for avatar setup, daily briefing playback, and tutor chat
- Stored avatar images, generated audio, and generated video assets for reuse
- FastAPI
- SQLAlchemy + SQLite/Postgres
- Ollama for local LLM inference
- ChromaDB + sentence-transformers for retrieval
- RSS/Atom aggregation for daily tech updates
- Pillow-based avatar stylization
- Coqui TTS for avatar audio
- Hedra.ai for talking-avatar video generation
- Next.js web app
- React Native mobile app
react-native-videofor briefing playback
- The user uploads a photo.
- The backend stores the photo and generates a stylized avatar image.
- A daily job fetches recent technology and computer science updates from configured feeds.
- The backend summarizes those updates into a script that fits in under 1 minute.
- Coqui TTS converts the script into speech audio.
- Hedra animates the stored avatar with the generated audio.
- The backend stores the finished video and saves the latest URL in the user profile.
- The web and mobile clients load the latest daily briefing video for playback.
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
POST /api/tutor/chatPOST /api/tutor/ask-tutorPOST /ask-tutorGET /api/tutor/stream
POST /api/uploads/photoPOST /api/uploads/upload-photoPOST /upload-photoPOST /api/uploads/avatar/generate-characterPOST /api/avatar/createPOST /api/avatar/speakPOST /api/avatarPOST /api/avatar/generatePOST /generate-avatar-videoGET /api/avatar/job/{job_id}
GET /api/daily-videoPOST /api/daily-video/generate
POST /api/uploads/voicePOST /api/uploads/course-documentGET /api/uploads/avatar-config
- Python 3.9+
- Node.js 18+
- Ollama
- A reachable Coqui TTS HTTP service
- A Hedra.ai API key
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .envDATABASE_URL=sqlite:///./ai_tutor.db
SECRET_KEY=change-me-in-production
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=llama3
TTS_PROVIDER=coqui
COQUI_TTS_URL=http://localhost:5002/api/tts
HEDRA_API_KEY=your-hedra-key
HEDRA_API_BASE_URL=https://api.hedra.com/web-app/public
VIDEO_STORAGE_PATH=./uploads/generated_videos
MAX_AVATAR_VIDEO_DURATION_SECONDS=60
ENABLE_DAILY_VIDEO_SCHEDULER=true
DAILY_VIDEO_HOUR=8
DAILY_VIDEO_MINUTE=0
DAILY_VIDEO_TIMEZONE=America/Chicago
TECH_UPDATES_LOOKBACK_DAYS=2
TECH_UPDATES_MAX_ITEMS=5
TECH_UPDATES_FEEDS=https://techcrunch.com/feed/,https://www.theverge.com/rss/index.xml,https://hnrss.org/frontpageollama pull llama3
ollama serveStart the backend:
uvicorn app.main:app --reloadOn startup the backend:
- creates database tables
- seeds the AI course catalog
- ingests default course notes into the RAG store
- starts the daily video scheduler when enabled
cd mobile
npm install
cmd /c npm run androidThe mobile app uses these avatar and daily-video routes:
/upload-photo/generate-avatar-video/api/daily-video/api/daily-video/generate
- Python Programming Foundations
- Machine Learning Fundamentals
- Artificial Intelligence Essentials
- Data Science Workflow
Backend tests live under backend/tests/:
cd backend
pytest tests/ -vMobile checks:
cd mobile
cmd /c npm run typecheckai-tutor-app/
|-- backend/
| |-- app/
| | |-- routers/
| | |-- services/
| | |-- config.py
| | |-- main.py
| | `-- schemas.py
| |-- course_content/
| `-- tests/
|-- frontend/
`-- mobile/
`-- src/
|-- navigation/
|-- screens/
|-- services/
|-- store/
`-- types/