Implements note export functionality in PDF, Markdown, and HTML formats using fpdf2 and markdown libraries. Updates note and template models to use string user IDs for better authentication compatibility. Enhances the notes agent prompt with detailed mathematical formatting and textbook-style problem guidelines. Refactors agent streaming logic for improved event handling. Updates dependencies to include fpdf2 and markdown.
Introduces a new analytics router with endpoints for overview, study time, mastery, reviews, sessions, and notes statistics. Adds AnalyticsService to compute learning metrics. Updates models to support note view counts and session durations, and registers the analytics router in the main app.
Add FastAPI backend for an AI-powered adaptive learning platform, including configuration, database models (users, sessions, messages, concepts, notes, quizzes, agents), routers for chat, notes, and review endpoints, and supporting services. Includes Dockerfile, environment/example files, and project metadata for Python 3.12 with async support and modern dependency management.