How rifatjahanazad-bd/ai-english-coach works
AI English Coach is a browser-based English-learning SPA backed by FastAPI and SQLite. Learners navigate from the dashboard into tutoring, CEFR practice, speaking assessment, meme learning, goals, and scoring; the backend routes requests to the relevant domain services and persistence. The README also describes Fast Phrases and Firestore live sync, but their implementing files are not present in the supplied tree, so those capabilities are represented only at the supported directory or external-service level. Relationships use README documentation and indexed source references; unsampled implementations limit detail.
Main entry points: app.py FastAPI Application · api.js API Client · db.py SQLite Database · router.js Client Router
Components 33
Web Client
- SPA Shell
UI/js/app.js - Client Router
UI/js/router.js - API Client
UI/js/api.js
Learning Experiences
- Dashboard and Goals
UI/js/dashboard.js - Chat Tutor
UI/js/chat.js - Practice Arena
UI/js/practice/modulepractice.js - CEFR Track Curricula
UI/js/practice - Speaking Simulator
UI/js/memescreen.js - Meme Learning
UI/js/memescreen.js - Fast Phrases Game
UI/js
API Services
- FastAPI Application
backend/api/app.py - API Configuration
backend/api/config.py - Request Schemas
backend/api/models/schemas.py - Authentication Routes
backend/api/routes/auth.py - Chat Routes
backend/api/routes/chat.py - Goal Routes
backend/api/routes/goals.py - Module Routes
backend/api/routes/modules.py - Speaking Routes
backend/api/routes/speaking.py - Scoring Routes
backend/api/routes/scoring.py - Meme Routes
backend/api/routes/memes.py - System Routes
backend/api/routes/system.py
AI and Processing
- Tutor Engine
backend/chatbot.py - Prompt Loader
backend/prompt_loader.py - Audio Transcription
backend/audio_to_txt.py - Speaking Evaluator
backend/mp3_txt_speaking_evaluator.py - Meme Generator
backend/meme_generator/meme_generator.py - Image Validator
backend/meme_generator/meme_validator.py - Image Cropper
backend/meme_generator/meme_crop.py - Behavior Scoring
backend/scoring/behavior_evaluator.py
Persistence and Sync
- SQLite Database
backend/database/db.py - Firestore
- Firebase Auth
Other components
- Learner
Connections 44
- Learner → SPA Shell: uses
README.md - SPA Shell → Client Router: routes through
README.md - Client Router → Dashboard and Goals: selects view
README.md - Client Router → Practice Arena: opens practice
README.md - Client Router → Speaking Simulator: opens test
README.md - Client Router → Fast Phrases Game: opens game
README.md - Practice Arena → CEFR Track Curricula: loads drills
- Chat Tutor → API Client: requests chat
- Dashboard and Goals → API Client: requests goals
- Practice Arena → API Client: requests modules
- Speaking Simulator → API Client: submits audio
- Meme Learning → API Client: requests memes
- API Client → FastAPI Application: calls API
README.md - FastAPI Application → API Configuration: loads settings
backend/api/app.py - FastAPI Application → Chat Routes: registers routes
- FastAPI Application → Module Routes: registers routes
- FastAPI Application → Speaking Routes: registers routes
- FastAPI Application → Meme Routes: registers routes
- FastAPI Application → Authentication Routes: registers routes
- FastAPI Application → Goal Routes: registers routes
- FastAPI Application → Scoring Routes: registers routes
- FastAPI Application → System Routes: registers routes
- Authentication Routes → Request Schemas: validates with
backend/api/routes/auth.py - Authentication Routes → SQLite Database: reads and writes
backend/api/routes/auth.py - Module Routes → SQLite Database: loads curriculum
backend/api/routes/modules.py - Chat Routes → Tutor Engine: dispatches to
- Tutor Engine → Prompt Loader: loads prompts
backend/chatbot.py - Tutor Engine → SQLite Database: stores history
backend/chatbot.py - Goal Routes → SQLite Database: reads and writes
- Speaking Routes → Speaking Evaluator: evaluates speech
backend/api/routes/speaking.py - Speaking Routes → Audio Transcription: verifies audio
backend/api/routes/speaking.py - Speaking Evaluator → Audio Transcription: transcribes audio
backend/mp3_txt_speaking_evaluator.py - Speaking Evaluator → Prompt Loader: loads prompts
backend/mp3_txt_speaking_evaluator.py - Meme Routes → Meme Generator: generates memes
backend/api/routes/memes.py - Meme Routes → Image Validator: validates images
backend/api/routes/memes.py - Meme Routes → Image Cropper: crops images
backend/api/routes/memes.py - Meme Routes → SQLite Database: tracks quotas
backend/api/routes/memes.py - Meme Generator → Image Validator: checks output
backend/meme_generator/meme_generator.py - Meme Generator → Image Cropper: crops output
backend/meme_generator/meme_generator.py - Scoring Routes → Behavior Scoring: evaluates events
backend/api/routes/scoring.py - Behavior Scoring → SQLite Database: loads and saves
backend/scoring/behavior_evaluator.py - Learner → Firebase Auth: signs in
README.md - Firebase Auth → Firestore: authenticates
README.md - Firestore → SPA Shell: syncs live state
README.md