How lichiahaomc/study-omni works
StudyOmni is a browser-based multimodal tutoring app. A learner uploads or pastes material, optionally crops images, and the frontend extracts PDF text or renders scanned pages before calling the parse endpoint. Parsed material appears in the study pane and can be used as context for streaming follow-up chat. README documents additional user-facing branches for favorites, BYOK, and appearance/accessibility settings. Backend call paths are supported by sampled handlers; several frontend details and other documented capabilities are represented at their known module paths without inferring unsampled wiring.
Main entry points: 03-ai.js Streaming chat · parse.js Material parsing · chat.js Chat endpoint · index.html Study interface
Components 18
Study workflow
- Study interface
public/index.html - Material upload
public/js/03-ai.js - Image crop
public/js/05-crop.js - PDF preparation
public/js/05-crop.js - Parsed material
public/js/05-crop.js - Streaming chat
public/js/03-ai.js
Frontend features
- Settings and BYOK
public/js/09-settings.js - Themes and background
public/js/10-brand-bg.js - Favorites
public/js/06-toolbar.js - Formula rendering
public/js/02-math.js - Responsive navigation
public/js/07-tabs.js
API services
- Material parsing
functions/api/parse.js - Chat endpoint
functions/api/chat.js - Subject prompts
functions/_lib/prompts.js - Origin and limits
functions/_lib/ratelimit.js
Model integration
- Model gateway
functions/_lib/providers.js
Other components
- Learner
- DeepSeek API
Connections 25
- Learner → Study interface: uses
- Study interface → Material upload: selects material
- Material upload → Image crop: offers cropping
- Material upload → PDF preparation: prepares PDFs
- Image crop → Material parsing: submits images
- PDF preparation → Material parsing: submits content
- Material parsing → Origin and limits: checks origin and limits
- Material parsing → Model gateway: calls model gateway
- Model gateway → DeepSeek API: sends parse request
- Material parsing → Parsed material: returns parsed text
- Parsed material → Streaming chat: provides chat context
- Learner → Streaming chat: asks follow-up
- Streaming chat → Chat endpoint: posts messages
- Chat endpoint → Origin and limits: checks origin and limits
- Chat endpoint → Subject prompts: builds system prompt
- Chat endpoint → Model gateway: calls model gateway
- Model gateway → DeepSeek API: streams completion
- Chat endpoint → Streaming chat: streams reply
- Settings and BYOK → Streaming chat: supplies BYOK settings
- Settings and BYOK → Material parsing: supplies BYOK headers
- Themes and background → Study interface: applies appearance
- Learner → Favorites: saves and recalls
- Streaming chat → Favorites: stores parsed result
- Streaming chat → Formula rendering: renders formulas
- Study interface → Responsive navigation: supports pane navigation