How khaluc/bluestudy works
BlueStudy is an academic English learning platform. Learners upload or enter study material, review extracted text, confirm it, and create a session; the API queues study work for a worker, which dispatches classification, teaching, or study-bundle generation and persists results for later review. Separate experiences support chat and quizzes, PDF-based exams, speaking practice, and progress-based revision. The sampled sources show session processing and model routing directly; other feature connections reflect README-documented capabilities and the listed module structure, so uncertain internal call paths are omitted.
Main entry points: api/main.py FastAPI application · database.py Relational database · worker/main.py Task worker · speaking.py Speaking workflow
Components 29
Learner interface
- Web application
apps/web/app.js - Chat interface
apps/web/chat.js - Exam interface
apps/web/exams.js - Speaking interface
apps/web/speaking.js - Learning map
apps/web/learning-map.js
API and domain
- FastAPI application
apps/api/main.py - Document review
apps/api/routers/documents.py - Upload endpoint
apps/api/routers/uploads.py - Study sessions
apps/api/routers/sessions.py - Study materials
apps/api/routers/materials.py - Chat endpoint
apps/api/routers/chat.py - Exam workflow
apps/api/routers/exams.py - Speaking workflow
apps/api/routers/speaking.py - Progress and review
apps/api/routers/learning_map.py
Async processing
- Task worker
apps/worker/main.py - OCR processing
apps/worker/tasks/ocr_task.py - Study dispatch
apps/chat/agents/orchestrator.py - Chat processing
apps/worker/tasks/chat_task.py - Exam processing
apps/worker/tasks/exam_task.py - Speaking processing
apps/worker/tasks/speaking_task.py - OCR pipeline
packages/ocr/process.py
State and files
- Relational database
packages/db/database.py - Local file storage
packages/storage/local.py
AI and integrations
- Chat service
apps/chat/main.py - Model routing
packages/llm/qwen_client.py - Ollama model
packages/llm/gemma_client.py
Other components
- Learner
- Qwen cloud
- AssemblyAI transcription
Connections 37
- Learner → Web application: uses
- Web application → FastAPI application: requests
- Chat interface → Chat endpoint: sends chat
- Exam interface → Exam workflow: requests exams
- Speaking interface → Speaking workflow: requests practice
- Learning map → Progress and review: requests progress
- FastAPI application → Upload endpoint: routes uploads
- FastAPI application → Document review: routes documents
- FastAPI application → Study sessions: routes sessions
- FastAPI application → Study materials: routes materials
- FastAPI application → Chat endpoint: routes chat
- FastAPI application → Exam workflow: routes exams
- FastAPI application → Speaking workflow: routes speaking
- FastAPI application → Progress and review: routes progress
- Upload endpoint → Relational database: records uploads
- Upload endpoint → Local file storage: stores source files
- Task worker → OCR processing: runs upload task
- OCR processing → OCR pipeline: extracts text
- OCR processing → Local file storage: reads source
- Study sessions → Relational database: reads and writes
- Study sessions → Task worker: queues jobs
- Task worker → Study dispatch: dispatches study work
- Study dispatch → Relational database: persists results
- Study dispatch → Chat service: requests generation
- Task worker → Chat processing: runs chat task
- Task worker → Exam processing: runs exam tasks
- Task worker → Speaking processing: runs speaking task
- Chat endpoint → Chat service: requests response
- Chat service → Model routing: routes completion
- Model routing → Ollama model: uses local model
- Model routing → Qwen cloud: uses cloud model
- Exam workflow → Relational database: stores attempts
- Speaking workflow → Relational database: stores practice
- Speaking workflow → AssemblyAI transcription: transcribes audio
- Progress and review → Relational database: reads progress
- Document review → Relational database: reads and writes
- Study materials → Relational database: reads and writes