How priyanshu2705-hub/ustaad-ai-teacher works
This is a browser-based AI learning app: a learner supplies a topic or study material, receives an interactive lesson, answers questions, and can ask follow-up doubts. The frontend also provides spoken interaction, voice selection, an animated avatar, and visual renderers. Flask serves the page and exposes a generation endpoint that calls Gemini with model fallbacks. The frontend and backend excerpts support the main request path; detailed links for some lesson interactions are not visible in the partial JavaScript excerpt.
Main entry points: app.js Lesson controller · app.py Flask routes · index.html Learning page
Components 10
Learning experience
- Learning page
templates/index.html - Lesson controller
static/app.js - Visual renderers
static/app.js
Generation backend
- Flask routes
app.py - Gemini generation
app.py
Speech and visuals
- Voice controller
static/app.js - Speech recognition
static/app.js - Animated avatar
static/app.js
Other components
- Learner
- Gemini API
Connections 10
- Learner → Learning page: uses
- Flask routes → Learning page: renders
app.py - Learner → Lesson controller: provides input
- Lesson controller → Flask routes: POSTs generation
static/app.js - Flask routes → Gemini generation: dispatches request
app.py - Gemini generation → Gemini API: requests content
app.py - Lesson controller → Visual renderers: renders visuals
static/app.js - Lesson controller → Voice controller: speaks lesson
static/app.js - Lesson controller → Speech recognition: starts recognition
static/app.js - Voice controller → Animated avatar: animates speech
static/app.js