A minimalist web application to track daily study time with beautiful visualizations.
- π Exam Sessions - Create separate study contexts for different exams (e.g., Math Final, Python Midterm)
- π Data Isolation - Each exam has its own study sessions and custom daily targets
- π Sessions Manager - View, edit, and delete all study sessions with inline editing
- π Daily Study Dashboard - Track total study time per day with visual charts
- β° Session Logging - Log study sessions with start/end times (auto-calculates duration)
- π Hourly Distribution - See when you study most during the day
- π― Daily Targets - Set and track study goals for each day of the week (per exam)
- π Time Periods - View stats for this week, last 7 days, this month, or all-time
- πΎ Persistent Storage - All data stored locally in SQLite database
- Backend: FastAPI + SQLAlchemy + SQLite
- Frontend: Svelte + Chart.js
- Package Manager: pnpm + uv
- No external dependencies - Works offline, no cloud required
# Python dependencies (backend)
uv sync
# JavaScript dependencies (frontend)
cd frontend && pnpm install && cd ..cd frontend
pnpm run build
cd .../start.shOr directly:
.venv/bin/python -m backend.mainThen open http://localhost:8000 in your browser.
- Click "+ New Exam" button in the header
- Fill in:
- Exam Name (e.g., "Python Final", "Math Midterm")
- Description (optional)
- Start & End Dates (study period for this exam)
- Click "Create" - your exam is now selected
- Use the "Exam Session" dropdown to switch between exams
- Make sure an exam is selected (shown in header)
- Click "+ Add Session" button
- Select the date (defaults to today)
- Enter start time (e.g., 8:30)
- Enter end time (e.g., 9:20)
- Click "Add Session" - duration is auto-calculated
Example: 8:30 β 9:20 = 50 minutes
- Click "π Sessions" button in the header
- A table appears showing all sessions for the current period
- View: See all sessions in date order
- Edit: Click "Edit" on any row β modify dates/times β Click "Save"
- Delete: Click "Delete" β Confirm β Session removed
- Duration: Auto-calculates when you edit times
- Stats: Total sessions and total study time shown at bottom
See SESSIONS_MANAGEMENT.md for detailed guide.
- Daily Chart: Shows total study time per day + daily target line
- Hourly Chart: Shows how much you studied in each hour
- Time Period Selector: Switch between week/month/all-time views
- Stats Panel: Aggregate stats + editable daily targets
- Exam Selector: Switch between different exams
All statistics are per-exam and updated when you switch exams.
- Scroll to "Daily Targets" section
- Click βοΈ icon next to any day
- Enter target in minutes (e.g., 300 for 5 hours)
- Click "Save"
Targets are stored per exam, per day of week. Each exam can have different targets!
Use the "Exam Session" dropdown to switch. All data, charts, and targets update for the new exam context.
revision-time/
βββ backend/
β βββ main.py # FastAPI app entry point
β βββ database.py # SQLAlchemy + SQLite setup (ExamSession, Session, Targets)
β βββ models.py # Pydantic schemas
β βββ routes.py # API endpoints (exam-scoped)
β βββ __init__.py
β
βββ frontend/
β βββ src/
β β βββ App.svelte # Main component with exam context
β β βββ main.js # Entry point
β β βββ components/
β β βββ ExamSelector.svelte # Create/manage exam sessions
β β βββ SessionForm.svelte # Add study sessions
β β βββ DailyChart.svelte # Daily stats chart
β β βββ HourlyChart.svelte # Hourly distribution
β β βββ Stats.svelte # Stats panel + targets
β βββ dist/ # Built files (generated)
β βββ package.json
β βββ vite.config.js
β
βββ pyproject.toml # Python dependencies
βββ study.db # SQLite database (auto-created)
βββ start.sh # Startup script
βββ README.md # This file
βββ EXAM_SESSIONS.md # Exam sessions feature guide
βββ QUICKSTART.md # Quick start guide
POST /api/exam-sessions- Create a new exam sessionGET /api/exam-sessions- List all exam sessionsGET /api/exam-sessions/{id}- Get exam session detailsPUT /api/exam-sessions/{id}- Update exam sessionDELETE /api/exam-sessions/{id}- Delete exam session
POST /api/sessions- Create a session (requiresexam_session_id)GET /api/sessions?exam_session_id={id}&start_date=...&end_date=...- List sessions for examDELETE /api/sessions/{id}- Delete a session
GET /api/stats/daily?exam_session_id={id}&start_date=...&end_date=...- Daily totals with targetsGET /api/stats/hourly?exam_session_id={id}&start_date=...&end_date=...- Hourly distribution
GET /api/exam-targets/{exam_id}- Get all daily targets for examPUT /api/exam-targets/{exam_id}/{day}- Update target for day (0=Mon, 6=Sun)GET /api/target/{day}- Get global daily target (legacy)PUT /api/target/{day}- Update global daily target (legacy)
Data is stored in study.db (SQLite):
- exam_sessions: Exam session contexts (name, description, dates, active status)
- sessions: Study sessions (date, start_time, end_time, duration_minutes, exam_session_id FK)
- exam_daily_targets: Per-exam daily targets (day_of_week, target_minutes, exam_session_id FK)
- daily_targets: Global daily targets (legacy, day_of_week, target_minutes)
No setup required - database is auto-created on first run with proper relationships.
Each exam session has:
- Isolated study sessions (linked via
exam_session_idFK)
Each exam session has:
- Isolated study sessions (linked via
exam_session_idFK) - Isolated daily targets (per day of week, per exam)
- Separate statistics (daily/hourly charts computed per exam)
This application supports multiple isolated exam sessions, perfect for tracking studies for multiple exams simultaneously.
- β Create unlimited exam sessions with custom date ranges
- β Each exam has isolated study data (no mixing)
- β Set different daily targets for each exam
- β Switch between exams with one click
- β All charts/stats update per exam context
- β Independent hourly patterns per exam
- Studying for multiple courses simultaneously (Math, Python, History)
- Certification exams with separate prep periods
- Summer courses with overlapping schedules
- Re-examination attempts with separate tracking
See EXAM_SESSIONS.md for detailed usage guide.
cd frontend
pnpm run build
cd ..Then restart the server.
# Terminal 1: Backend
.venv/bin/python -m backend.main
# Terminal 2: Frontend dev server
cd frontend && pnpm run devThen visit http://localhost:5173 (frontend dev server proxies /api to backend).
Kill the process:
lsof -i :8000 | grep LISTEN | awk '{print $2}' | xargs kill -9Make sure to rebuild:
cd frontend && pnpm run buildDelete study.db and restart - a fresh database will be created.
- All times are in 24-hour format (HH:MM)
- Daily targets are per day-of-week (applies to all Mondays, etc.)
- Data is never uploaded anywhere - it stays on your machine
- Works fully offline once built
- π± Mobile responsive design (already mostly there!)
- π Browser notifications for study reminders
- π€ Export to CSV/PDF
- π Dark mode
- π Weekly/monthly goal tracking
- β±οΈ Built-in Pomodoro timer
Enjoy tracking your study progress! πβ¨