An intelligent, adaptive, full-stack study planning platform built with FastAPI and Vanilla JavaScript.
Featuring AI-assisted syllabus parsing, automatic missed-session redistribution, multi-hour block tracking, interactive weekly timetable grids, document RAG knowledge retrieval, real-time completion tracking, productivity analytics, peak time window insights, and customizable dark/light glassmorphic UI.
- β¨ Key Features
- ποΈ System Architecture
- π» Tech Stack
- π Quick Start Guide
- π³ Docker Deployment
- βοΈ Environment Configuration
- π± Modules & Interface Overview
- ποΈ Comprehensive API Reference
- π Security & Data Privacy
- π€ Contributing & License
- Priority & Duration Allocation: Computes balanced daily time budgets based on subject difficulty, target hours, and exam deadlines.
- Auto-Adjustment for Missed Sessions: Missed or incomplete sessions are automatically swept forward and redistributed over upcoming study days without overwhelming daily limits.
- Multi-Hour Block Tracking: Merged multi-hour UI study sessions simultaneously update all backing database items upon completion, preserving exact daily progress totals across Dashboard, Daily Tasks, and Analytics views.
- Dynamic Subject Palette: Auto-assigns distinct, vibrant palette colors (Violet, Fuchsia, Cyan, Cobalt, Amber) to individual subjects to prevent visual clutter and green-block collisions.
- Custom Daily Routine Anchors: User-configured wake, sleep, lunch, rest break, and dinner windows that anchor study blocks naturally around daily life.
- Custom Routine Activities: Supports recurring commitments (College, Gym, Tuition, Work Shifts) with custom days, hours, and dedicated indigo badge styles.
- Natural Language Goal Creation: Describe exam targets and timelines in plain English; the AI extracts structured subjects, estimated hours, and milestones.
- Document Knowledge Retrieval (RAG): Upload syllabus PDFs, lecture notes, or markdown files with automatic chunking and vector/keyword retrieval for grounded study recommendations.
- Multi-Session Chat Management: Persistent chat history with session pinning, custom renaming, and message deletions.
- GitHub-Style Study Heatmap: 365-day visual consistency grid with explicit 5-stage intensity legend (
Less [ ] [ ] [ ] [ ] [ ] More) tracking completed hours. - Productivity by Time of Day: Analyzes completed sessions across six 4-hour time windows (12 AMβ4 AM, 4 AMβ8 AM, 8 AMβ12 PM, 12 PMβ4 PM, 4 PMβ8 PM, 8 PMβ12 AM) to pinpoint your peak productivity hours.
- Streak & Consistency Metrics: Real-time current streak, longest streak, and completion rate calculations.
- Dynamic Charts: 7-day velocity bar charts, 30-day cumulative trends, and subject distribution breakdowns powered by Chart.js.
- Browser Push Notifications: Configurable session reminders, study nudge alerts, and daily motivation quotes.
- Solid Data & Privacy Popups: High-contrast, 100% opaque security modals for Password Updates, Data Wipes, and Account Deletions with zero text bleed-through.
- Smooth Dark / Light Theme Switcher: Fully synchronized CSS custom properties across sidebar, content cards, popups, and inputs with smooth 0.35s ease transitions.
study-planner/
βββ backend/
β βββ app/
β β βββ main.py # FastAPI entrypoint + static file mounting
β β βββ config.py # App configuration & environment variables
β β βββ database.py # SQLAlchemy session engine & Base model
β β βββ models.py # ORM models (User, Goal, Subject, Schedule, Progress, DailyTask, Documents)
β β βββ schemas.py # Pydantic validation models
β β βββ auth.py # JWT generation, token verification, bcrypt hashing
β β βββ planner.py # Scheduling algorithm & missed task sweep engine
β β βββ routers/
β β βββ auth_router.py # Login, Registration, Social Auth, User info
β β βββ goals_router.py # Goal lifecycle & schedule regeneration
β β βββ schedule_router.py # Day & month schedule endpoints, task completion
β β βββ subjects_router.py # Subject CRUD & hour tracking
β β βββ daily_tasks_router.py # Ad-hoc daily checklist tasks
β β βββ progress_router.py # Progress metrics, heatmaps, streaks, AI suggestions
β β βββ ai_router.py # Document RAG, NLP goal parser, chat sessions
β β βββ account_router.py # Profile management, data export & account deletion
β βββ requirements.txt # Python backend dependencies
β βββ Dockerfile # Production container specification
β βββ .env.example # Environment variables template
β
βββ frontend/
βββ index.html # Authentication portal (Sign In / Register)
βββ dashboard.html # Main dashboard overview & today's agenda
βββ timetable.html # Weekly drag-and-drop timetable grid
βββ planner.html # Study goal builder & syllabus manager
βββ calendar.html # Monthly calendar view with day inspection
βββ daily-tasks.html # Daily checklist & custom task board
βββ analytics.html # Productivity metrics, trends, peak time slots & heatmaps
βββ ai-assistant.html # Conversational AI assistant & document workspace
βββ subjects.html # Subject catalog & progress overview
βββ settings.html # Routine configuration, theme switcher & data privacy modals
βββ css/
β βββ style.css # Glassmorphic design system, opaque popups & typography tokens
βββ js/
βββ api.js # Centralized async API client & HTTP interceptors
βββ auth.js # Token management & session guards
βββ layout.js # Shared navigation sidebar, header & theme sync
βββ subject-colors.js # Consistent subject color palette generator
βββ timetable-helper.js # Timetable slot computation & routine anchor engine
βββ dashboard.js # Dashboard view controller & multi-hour block sync
βββ timetable.js # Timetable view controller & custom activities
βββ calendar.js # Calendar view controller
βββ analytics.js # Analytics, time-of-day productivity & heatmap controller
βββ assistant.js # AI Assistant chat & document RAG controller
βββ settings.js # Preferences, daily routine & account security handlers
- Framework: FastAPI (Python 3.11+)
- ORM & Database: SQLAlchemy 2.x with SQLite (configurable to PostgreSQL)
- Validation: Pydantic v2
- Authentication: python-jose (JWT) + Passlib with
bcrypt - Server: Uvicorn (Development) / Gunicorn (Production)
- Core: Pure Semantic HTML5, Modern CSS3 (CSS Variables, Flexbox/Grid, Glassmorphism), and Vanilla JavaScript (ES6+ Modules)
- Data Visualization: Chart.js
- Typography & Icons: Inter / Plus Jakarta Sans & SVG iconography
- Zero Build Tool Overhead: Runs instantly without requiring Webpack, Vite, or npm installs.
- Python 3.11+ installed (Download Python)
- Git installed
-
Clone the repository:
git clone https://github.com/your-username/study-planner.git cd study-planner/backend -
Create and activate a virtual environment:
- Windows (PowerShell / Command Prompt):
python -m venv venv .\venv\Scripts\activate - macOS / Linux:
python3 -m venv venv source venv/bin/activate
- Windows (PowerShell / Command Prompt):
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
# Windows copy .env.example .env # macOS / Linux cp .env.example .env
Start the local development server:
uvicorn app.main:app --reload --port 8000Once running, the backend automatically serves the full frontend web interface. Open your browser and navigate to:
http://127.0.0.1:8000
Interactive API Documentation:
Access the Swagger UI docs athttp://127.0.0.1:8000/docsor ReDoc athttp://127.0.0.1:8000/redoc.
To spin up the entire application using Docker:
# Build and run container
docker compose up --build -d
# Application is available at:
http://localhost:8000Configuration variables can be adjusted in backend/.env (copy backend/.env.example to get started):
| Variable | Default Value | Description |
|---|---|---|
SECRET_KEY |
dev-secret-change-me-in-production |
Secret key used for signing JWT authentication tokens |
ACCESS_TOKEN_EXPIRE_MINUTES |
10080 (7 Days) |
Lifetime of generated JWT access tokens |
DATABASE_URL |
sqlite:///./study_planner.db |
Database connection string |
ALLOWED_ORIGINS |
* |
Allowed CORS origins for API requests |
ENVIRONMENT |
development |
Runtime environment (development or production) |
GROQ_API_KEY |
(required for AI) | Groq API key that powers the AI Assistant (chat, quizzes, exam questions, summaries). Get a free key at console.groq.com/keys. Without it, the AI Assistant page displays a clear "AI Not Configured" state. |
EMBEDDING_BASE_URL |
http://localhost:11434 |
(Optional) Base URL of a local Ollama server, used for semantic document search. |
EMBEDDING_MODEL |
nomic-embed-text |
(Optional) Ollama embedding model name. |
By default, document retrieval for the AI Assistant uses BM25/TF-IDF keyword matchingβthis works out of the box with zero extra setup. To enable semantic similarity search:
# 1. Install Ollama: https://ollama.com/download
# 2. Pull the embedding model
ollama pull nomic-embed-text
# 3. Ollama runs on http://localhost:11434 by default. The backend detects it automatically
# and blends semantic similarity into search rankings.| Page / Module | URL Path | Key Functionality |
|---|---|---|
| Authentication | /index.html |
Secure registration, login, password reset, and session persistence |
| Dashboard | /dashboard.html |
Today's study agenda, multi-hour completion checkboxes, quick stats, and smart recommendations |
| Timetable | /timetable.html |
Weekly 7-day grid with hourly slots, routine anchors, custom activities, and drag-and-drop rearrangement |
| Goal Planner | /planner.html |
Create study goals, set exam deadlines, and adjust subject target hours |
| Calendar | /calendar.html |
Monthly overview with color-coded subject badges, deadline markers, and daily session inspection |
| Daily Tasks | /daily-tasks.html |
Checklist for ad-hoc study items, practice problems, mock tests, and quick revisions |
| Analytics | /analytics.html |
Weekly hour breakdowns, 30-day velocity trends, 365-day consistency heatmap, and time-of-day productivity slots |
| AI Assistant | /ai-assistant.html |
Multi-session AI chat workspace with syllabus PDF/doc upload and RAG document grounding |
| Settings | /settings.html |
Routine window customization, theme switcher, opaque security modals, data export, and account deletion |
POST /api/registerβ Create a new student accountPOST /api/loginβ Authenticate credentials and retrieve JWT tokenPOST /api/social-loginβ OAuth / Social login provider handshakeGET /api/meβ Retrieve profile data for authenticated user
POST /api/create-goalβ Create a study plan with target deadline and subjectsGET /api/goalsβ List all active and archived goalsGET /api/goals/activeβ Fetch current primary active goalPUT /api/goals/{id}β Update goal parameters or datesDELETE /api/goals/{id}β Remove a goal and its associated schedulePOST /api/regenerate-planβ Recalculate schedule allocations
GET /api/scheduleβ Fetch schedule items for a date rangeGET /api/schedule/monthβ Retrieve month-aggregated summary for calendarPUT /api/complete-task/{id}β Mark a schedule session completed / incompleteGET /api/daily-tasksβ Retrieve ad-hoc daily tasks for a datePOST /api/daily-tasksβ Create a new daily checklist taskPATCH /api/daily-tasks/{id}β Toggle task completion statusDELETE /api/daily-tasks/{id}β Delete a daily checklist item
GET /api/progressβ Fetch daily progress hours historyGET /api/statisticsβ Aggregate streak metrics, completion rates, and subject totalsGET /api/heatmapβ 365-day heatmap data formatGET /api/ai-suggestionβ AI-generated recommendation based on current progressGET /api/reminderβ Daily study session reminder summary
POST /api/parse-goalβ Extract structured subjects and deadlines from free textPOST /api/documents/uploadβ Upload syllabus or notes PDF/DOCX/TXT for RAG chunkingGET /api/documentsβ List user's indexed documentsDELETE /api/documents/{id}β Delete an uploaded documentGET /api/chat/historyβ Fetch chat history and saved sessionsPOST /api/askβ Send prompt to AI assistant with document grounding
- Password Security: All passwords are salted and hashed using
bcryptbefore database persistence. - Stateless Authentication: Secure JWT tokens with configurable expiration and standard bearer header verification.
- Scoped User Data: Database queries strictly enforce
user_idownership constraints to isolate user data. - Opaque Security Dialogs: Password updates and account deletion popups feature solid non-transparent backgrounds to prevent text bleed-through.
- Privacy Controls: Dedicated self-service endpoints to export data, clear study records, or permanently delete accounts.
Contributions, feature ideas, and pull requests are welcome!
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.