Add multi-user support with session-based student IDs
FocusFlow Assistant
3e0882a
- Modified StudentProfileManager to accept student_id parameter
- Updated all FastAPI endpoints to use dependency injection
- Each browser session gets unique student_id
- Data isolated per user in Supabase
- Backward compatible with local mode
Fix: Ensure current_state exists before saving plan
FocusFlow Assistant
6dab24d
Add Supabase persistent storage support
FocusFlow Assistant
479eeb5
- Created supabase_storage.py adapter with comprehensive error handling
- Modified student_data.py to conditionally use Supabase or local JSON
- Added USE_SUPABASE env var to Dockerfile
- Maintains backward compatibility with local deployments
- Graceful fallback if Supabase unavailable
Features:
- Auto-detects new calendar day on app startup
- Advances current_study_day when date changes
- Auto-unlocks topics for the new day
- Shows correct day's topics in 'Today's Topics' section
Changes:
- app.py: Added date detection logic, updated Today's Topics to use current_study_day
- backend/student_data.py: Added current_study_day and last_access_date to profile
- backend/main.py: Updated save_progress endpoint for new fields
Fixes issue where Jan 7 topics wouldn't appear after completing Jan 6
Production code cleanup - remove debug statements and duplicates
FocusFlow Assistant
ea52e8c
Cleanup Summary:
- Removed duplicate query_knowledge_base function (37 lines)
- Removed 19 debug print statements across all files
- Kept only essential error logging
- Code is now production-ready and deployment-optimized
Files cleaned:
- backend/rag_engine.py: Removed duplicate function + 14 prints
- app.py: Removed 3 debug prints
- backend/student_data.py: Removed 2 debug prints
- Overall: ~60 lines of unused code eliminated
Add data persistence and comprehensive citation system
FocusFlow Assistant
6d15ebb
Major Features Added:
- Data Persistence: JSON-based student profile storage in ~/.focusflow/
- Auto-save on plan generation and quiz completion
- Session resumption with progress restoration
- Tracks quiz scores, mastery levels, and incomplete tasks
- Citation System: Comprehensive source references for verifiability
- Chat responses show expandable source citations (filename + page)
- Lesson content includes inline citations and References section
- Citations in both main chat and Focus Mode
- UI Improvements:
- Toast notifications for save/load feedback
- Enhanced error handling with user-visible messages
- Better source formatting with numbered lists
Files Modified:
- app.py: Added profile loading, auto-save, citation display
- backend/main.py: Added 7 profile API endpoints
- backend/rag_engine.py: Enhanced with source extraction and citations
- backend/student_data.py: New StudentProfileManager class