schedula Svelte Themes

Schedula

Automated, conflict-free class schedule generation for universities and colleges. Built with Rust, Tauri, Svelte, and SQLite.

πŸ“š Schedula β€” University Timetabling, Automated

Generate conflict-free academic timetables in seconds. Free standalone app or Pro/Institution plans with multi-machine sync. Built with Rust, Tauri, Svelte, and SQLite.

🎯 What is Schedula?

Schedula is a desktop application that intelligently generates semester class routines for academic institutions. Instead of spending weeks manually resolving scheduling conflicts, admins input their courses, lecturers, rooms, and student batches β€” and Schedula generates an optimized, conflict-free timetable in seconds.

Problem It Solves

  • ❌ Manual scheduling is time-consuming (dozens of hours per semester)
  • ❌ Human errors lead to classroom/lecturer conflicts
  • ❌ Student schedule clashes cause frustration
  • ❌ No visibility across departments and roles

Solution

βœ… Fully automated schedule generation using constraint-based optimization algorithms βœ… 7 hard constraints ensuring no conflicts βœ… Smart diversification spreading classes across weekdays βœ… Support for diverse class types (lectures, labs, tutorials) βœ… Biweekly scheduling for intensive courses βœ… Semester calendars with exam/study blocks βœ… Multi-organization support with role-based access


✨ Features

Core Scheduling Engine

  • πŸ€– Constraint-based optimization with diversity heuristics
  • πŸ“… 9 hard constraints: no student/room/lecturer conflicts, room capacity, room type matching, lecturer availability, max hours/day, max hours/week, max consecutive hours, blackout slots
  • 🎲 Diversity sorting to spread classes throughout the week (Mon–Fri)
  • πŸ”„ Biweekly course support with alternating week placement
  • πŸ“Š Detailed conflict reports showing unscheduled items with reasons
  • ⚑ Fast generation β€” schedules generated in <10ms for 200-course datasets

User Interface

  • 🎨 Dark/Light theme toggle with custom accent colors
  • πŸ“… Multiple schedule views:
    • Weekly grid (Mon–Fri Γ— 8 time slots)
    • Detailed list with class type badges
    • Semester calendar with teaching/exam/study blocks and biweekly visualization
  • πŸ“‹ Entity management β€” Create and edit courses, lecturers, rooms, batches
  • πŸ’Ύ CSV export of generated schedules
  • πŸ” Semester management with teaching weeks and exam/study block dates

Multi-Tenancy & Roles

  • 🏒 Organizations (universities, colleges, schools, institutes)
  • πŸ‘€ Role-based access:
    • Super Admin β€” manage all organizations, create admin users
    • Admin β€” manage own organization's data and schedules
  • πŸ”’ Data isolation β€” admins see only their org's data
  • πŸ‘₯ User management β€” create, deactivate, password reset

Settings & Customization

  • 🎨 Appearance β€” dark/light theme, accent color
  • πŸ‘€ Profile β€” display name, password
  • πŸ‘₯ User management β€” activate/deactivate, admin password reset
  • 🏒 Organization settings β€” contact email, address
  • βš™οΈ Scheduling defaults β€” working days, start/end slots, slot duration
  • πŸ’Ύ Data management β€” JSON backup download, clear all schedules
  • ℹ️ About β€” app version, DB size, entity counts

Data Management & Quality

  • πŸ“€ CSV export of entire schedules
  • πŸ“‹ HTML export for student sharing (self-contained, offline-ready)
  • πŸ’Ύ JSON backup of all data (downloadable)
  • πŸ—‘οΈ Safe data clearing with confirmation
  • βœ… Pre-flight validator β€” checks data integrity before generation
  • πŸ“Š Data health dashboard β€” highlights missing assignments, capacity issues
  • πŸ‘οΈ Conflict visualization β€” shows clashing entries in red

Security & Recovery

  • πŸ” Password recovery system β€” recovery code + security question for admin locked-out scenarios
  • πŸ“ Audit logging β€” all user actions tracked with timestamp and entity references
  • πŸ‘€ Role-based access β€” super-admin vs admin distinction with proper scoping

πŸ—οΈ Architecture

Tech Stack

  • Backend: Rust + Tauri 2.x (desktop framework)
  • Frontend: Svelte 4 + Vite 5
  • Database: SQLite with bundled distribution
  • Authentication: bcrypt password hashing
  • IPC: Tauri command invocation system

Layers

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Frontend (Svelte Components)           β”‚
β”‚  - App.svelte (main router)             β”‚
β”‚  - Views (Dashboard, Settings, etc.)    β”‚
β”‚  - Stores (session, prefs)              β”‚
β”‚  - API layer (Tauri invoke wrappers)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  Tauri IPC       β”‚
        β”‚  invoke()        β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Backend (Rust Commands)                β”‚
β”‚  - commands.rs (35+ handler functions)  β”‚
β”‚  - scheduler.rs (constraint solver)     β”‚
β”‚  - models.rs (domain types)             β”‚
β”‚  - db.rs (migrations, helpers)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                 β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚  SQLite Database  β”‚
        β”‚  (bundled)        β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Database Schema

v8 (Current) β€” 8 migrations with backward-compatible evolution

Core tables:

  • organizations β€” schools, universities, institutes
  • users β€” admin and super_admin accounts with bcrypt hashing, recovery code, security question
  • semesters β€” semester definitions with teaching/exam/study blocks
  • courses β€” courses with class type (lecture/lab/tutorial) and frequency (weekly/biweekly)
  • lecturers β€” faculty with availability, load constraints, preferred time-of-day, blackout slots, max consecutive hours
  • rooms β€” classrooms and labs with capacities and day availability
  • batches β€” student groups linked to semesters
  • batch_courses β€” M:N courses for each batch

Schedule tables:

  • schedules β€” generated timetables with status (draft/published), description
  • schedule_entries β€” individual class slots with week parity (for biweekly)

System tables:

  • org_scheduling_settings β€” per-org scheduling defaults
  • app_settings β€” global config (max admin quota)
  • audit_log β€” all user actions with timestamp and entity reference

See docs/ARCHITECTURE.md for schema diagram and v1–v8 evolution.


πŸ“¦ Installation & Setup

System Requirements

  • macOS 13.0 or later
  • Disk space: ~200 MB

Download & Run

  1. Download the DMG file from Releases
  2. Mount the DMG:
    open Schedula-0.1.0.dmg
    
  3. Drag Schedula.app to Applications
  4. Launch from Applications or Spotlight

First Login

  • Username: admin
  • Password: admin123
  • ⚠️ Change this password immediately in Settings β†’ My Profile

πŸš€ Usage Guide

1. Set Up Your Organization

  1. Login with admin credentials
  2. Navigate to Settings β†’ Organization
  3. Enter:
    • Organization name (required)
    • Type (University, College, School, Institute)
    • Contact email
    • Address
  4. Save

2. Define a Semester

  1. Go to Semesters tab
  2. Click "+ Add Semester"
  3. Fill in:
    • Semester name (e.g., "Fall 2025")
    • Start and end dates
    • Teaching weeks (typically 14)
    • Exam block dates (midterm, finals)
    • Study break dates
  4. Save

3. Add Lecturers

  1. Go to Lecturers tab
  2. Click "+ Add Lecturer"
  3. Enter:
    • Full name
    • Email (optional)
    • Available days (Mon–Sat, clickable chips)
    • Max hours/day (e.g., 4)
    • Max hours/week (e.g., 16)
  4. Save

4. Create Rooms

  1. Go to Rooms tab
  2. Click "+ Add Room"
  3. Configure:
    • Room name (e.g., "A-101")
    • Type: Lecture or Lab
    • Capacity (e.g., 30 students)
    • Available days
  4. Save

5. Define Courses

  1. Go to Courses tab
  2. Click "+ Add Course"
  3. Set:
    • Course code (e.g., "CS-201")
    • Course name
    • Hours per week (e.g., 3)
    • Class type: Lecture, Lab, or Tutorial
    • Frequency: Weekly or Biweekly
    • Assigned lecturer (optional)
  4. Save

Note: Labs auto-link to lab rooms; biweekly courses get half the weekly hours per placement

6. Organize Student Batches

  1. Go to Batches tab
  2. Click "+ Add Batch"
  3. Enter:
    • Batch name (e.g., "CSE-2A")
    • Department
    • Semester year
    • Student count
    • Link to a Semester (optional)
    • Select enrolled courses
  4. Save

7. Generate Schedule

  1. Go to Schedule tab
  2. Enter a schedule name (e.g., "Fall 2025 - Draft 1")
  3. Optionally select a semester (filters batches)
  4. Click "Generate Schedule"
  5. View results:
    • Success: Shows entry count and any unscheduled items
    • Errors: Lists which courses/hours couldn't be scheduled and why

8. Review & Export

Weekly Grid Tab:

  • Click days/times to see class details
  • Color-coded by batch
  • Shows lecturer, room, course code

List Tab:

  • Sortable by batch, day, time
  • Shows class type (lecture/lab/tutorial)
  • Biweekly indicator

Semester Calendar Tab (if linked):

  • Visual week-by-week view
  • Color-coded by class type
  • Biweekly classes shown on alternating weeks
  • Exam/study blocks highlighted

Export:

  • Click "πŸ“‹ Export as CSV" to download timetable

⌨️ Keyboard Shortcuts

Shortcut Action
Cmd + , Open Settings
Escape Close any modal

🎨 Customization

Theme Preferences

Settings β†’ Appearance:

  • Dark β€” Default dark theme
  • Light β€” Light theme for daytime use
  • System β€” Follow macOS system preferences

Accent Colors

8 preset colors + custom color picker:

  • πŸ”΅ Blue, Cyan, Green, Amber
  • πŸ”΄ Red, Pink, Purple, Orange

Preferences auto-save to ~/Library/Application Support/Schedula/


πŸ” Security & Privacy

  • Local-first: All data stored in encrypted SQLite file on your machine
  • No cloud: No data leaves your computer
  • Passwords: Hashed with bcrypt, never stored in plain text
  • Sessions: In-memory only, cleared on logout

πŸ“š Documentation

Comprehensive system documentation is in the docs/ folder:


πŸ› οΈ Development Setup

Prerequisites

  • Rust 1.70+ (install via rustup)
  • Node.js 18+ and npm
  • Xcode Command Line Tools (for macOS)
    xcode-select --install
    

Clone & Install

git clone https://github.com/yourusername/schedula.git
cd schedula

# Install frontend dependencies
npm install

# Backend builds automatically with Tauri

Development Server

npm run tauri dev

This launches:

  • Vite dev server at http://localhost:5173
  • Tauri desktop app pointing to it
  • Hot reload for frontend changes
  • Cargo watch for backend recompilation

Running Tests

# Run 75 unit + integration tests (4 seconds)
cargo test

# Run benchmarks (3 profiles: tiny, small, medium, large, stress)
cargo bench

# Results: tiny (380Β΅s), small (747Β΅s), medium (2.3ms), large (3.9ms), stress (8.2ms)

See docs/TESTING_GUIDE.md for test coverage details.

Build Project

# Release build (optimized)
npm run tauri build

# Output: src-tauri/target/release/bundle/macos/Schedula.dmg

Deployment & Licensing

Schedula supports optional subscription licensing for Pro and Institution plans:

Standalone Mode (always free):

  • Desktop app runs fully offline
  • No licensing server needed
  • Free tier limitations apply (10 batches, 1 admin)

Hub Server Mode (requires license):

  • Multi-machine sync via hub server
  • Stripe checkout integration
  • License tokens issued and validated at hub startup
  • 7-day offline grace period
  • Pro/Institution plan features unlocked

To deploy the licensing server:

# Build license server
cd license-server
cargo build --release

# Run with environment variables
SCHEDULA_ADMIN_KEY=<secret> \
STRIPE_SECRET_KEY=<key> \
STRIPE_WEBHOOK_SECRET=<secret> \
  ./target/release/license-server

See license-server/ for complete setup instructions.

Project Structure

schedula/
β”œβ”€β”€ src/                    # Frontend (Svelte, ~25 files)
β”‚   β”œβ”€β”€ App.svelte          # Main router
β”‚   β”œβ”€β”€ app.css             # Dark/light theme system
β”‚   β”œβ”€β”€ views/              # 12 page components (Dashboard, Lecturers, etc.)
β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”œβ”€β”€ api.js          # 40+ Tauri invoke wrappers (type-safe)
β”‚   β”‚   β”œβ”€β”€ stores/         # Svelte stores (session, preferences)
β”‚   β”‚   β”œβ”€β”€ toast.js        # Toast notification system
β”‚   β”‚   └── components/     # 7 reusable UI components
β”‚   └── index.html
β”œβ”€β”€ src-tauri/              # Backend (Rust, ~2.9K LOC)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main.rs         # App entry point
β”‚   β”‚   β”œβ”€β”€ lib.rs          # Tauri setup, 35+ command registration
β”‚   β”‚   β”œβ”€β”€ commands.rs     # 35+ command handlers, auth, CRUD
β”‚   β”‚   β”œβ”€β”€ db.rs           # Database init, 8 migrations, seeding
β”‚   β”‚   β”œβ”€β”€ models.rs       # 30+ domain types and constants
β”‚   β”‚   └── scheduler.rs    # Constraint-based scheduler (324 LOC)
β”‚   β”œβ”€β”€ benches/            # Criterion benchmarks (5 profile scales)
β”‚   β”œβ”€β”€ tauri.conf.json     # Tauri configuration
β”‚   └── Cargo.toml          # Rust dependencies
β”œβ”€β”€ docs/                   # System architecture documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md     # System design overview
β”‚   β”œβ”€β”€ SCHEDULER_ALGORITHM.md
β”‚   β”œβ”€β”€ DATABASE_SCHEMA.md
β”‚   β”œβ”€β”€ API_REFERENCE.md
β”‚   └── TESTING_GUIDE.md
β”œβ”€β”€ .github/workflows/      # GitHub Actions
β”‚   └── release.yml         # Automated cross-platform builds
β”œβ”€β”€ vite.config.js          # Vite bundler config
β”œβ”€β”€ package.json            # Node.js dependencies
β”œβ”€β”€ PRODUCTION_AUDIT.md     # Gap analysis & university pitch
└── README.md               # This file

πŸ“š API Commands Reference

Authentication

Command Params Returns Notes
login {username, password} SessionPayload Sets in-memory session
logout - - Clears session
get_session - SessionPayload | null Sync with Rust state
change_password {oldPassword, newPassword} - Must be logged in

Users (Super Admin)

Command Params Returns
get_users - User[]
create_user NewUser i64 (id)
delete_user {id} -
admin_reset_password {userId, newPassword} -
set_user_active {userId, active} -

Organizations (Super Admin)

Command Params Returns
get_organizations - Organization[]
create_organization NewOrganization i64 (id)
update_organization {id, org} -
delete_organization {id} -

Semesters

Command Params Returns
get_semesters {orgIdFilter?} Semester[]
create_semester NewSemester i64 (id)
update_semester {id, sem} -
delete_semester {id} -

Courses, Lecturers, Rooms, Batches

Standard CRUD operations:

  • get_* β†’ *[]
  • create_* β†’ i64 (id)
  • update_* β†’ -
  • delete_* β†’ -

Scheduling

Command Params Returns
generate_schedule {scheduleName, semesterId?} {schedule_id, entry_count, unscheduled}
get_schedules - Schedule[]
get_schedule_entries {scheduleId} ScheduleEntry[]
activate_schedule {id} -
delete_schedule {id} -
export_schedule_csv {scheduleId} CSV string

Settings

Command Params Returns
update_display_name {newName} -
get_scheduling_settings {orgId} OrgSchedulingSettings
upsert_scheduling_settings {settings} -
clear_schedules - i64 (count cleared)
backup_database - base64 string
get_app_info - AppInfo

Dashboard

Command Params Returns
get_stats - {courses, lecturers, rooms, batches, ...}

πŸ› Troubleshooting

App won't open

  • Check that macOS version is 13.0+
  • Try moving Schedula.app to /Applications
  • Reset permissions: sudo xattr -rd com.apple.quarantine /Applications/Schedula.app

Database locked error

  • Ensure only one instance of Schedula is open
  • Restart the app if you see this error

Schedule generation fails

  • Verify you have at least one course, lecturer, room, and batch
  • Check that lecturers have compatible availability with course needs
  • Review conflict report to see which items couldn't be scheduled and why

Can't login

  • Username and password are case-sensitive
  • Default is admin / admin123
  • Change in Settings β†’ My Profile if forgotten (requires access to Settings by super admin)

πŸ“ Git Commit History

The project uses conventional commits for clear, scoped changes:

# View recent changes
git log --oneline | head -20

# See details of a feature
git show <commit-hash>

Commit types:

  • feat β€” new feature
  • fix β€” bug fix
  • docs β€” documentation
  • chore β€” internal cleanup, dependency updates
  • refactor β€” code restructuring without behavior change
  • test β€” testing

πŸ“¦ Building for Distribution

Create DMG Release

# Build optimized binary
npm run tauri build

# Output DMG is at:
# src-tauri/target/release/bundle/macos/Schedula.dmg

# Optionally sign and notarize for macOS Gatekeeper
# (requires Apple Developer account)

Upload to GitHub Releases

  1. Create a GitHub release:

    gh release create v0.1.0 \
      --title "Schedula v0.1.0" \
      --notes "Initial release: AI-powered timetable generator"
    
  2. Upload DMG:

    gh release upload v0.1.0 \
      src-tauri/target/release/bundle/macos/Schedula.dmg
    

Users can then download from: https://github.com/yourusername/schedula/releases


🀝 Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/your-feature
  3. Make changes with conventional commits
  4. Test with npm run tauri dev
  5. Submit a pull request

Guidelines:

  • Follow existing code style
  • Add comments for complex logic
  • Test scheduling edge cases thoroughly
  • Update README if adding features

πŸ“„ License

This project is licensed under the MIT License β€” see LICENSE for details.


πŸ’³ Pricing & Plans

Free Tier β€” Single-machine standalone app

  • Offline-first, no cloud required
  • Up to 10 batches per semester
  • 1 admin account
  • Greedy constraint solver
  • No time or feature restrictions

Pro Plan ($29/month or $276/year)

  • Multi-machine hub server with real-time WebSocket sync
  • Up to 50 batches per semester
  • Up to 5 admin accounts
  • CSP constraint solver (better schedules)
  • Bulk CSV import
  • Approval workflow for admins
  • 14-day free trial

Institution Plan ($99/month or $948/year)

  • Everything in Pro, unlimited scale
  • Unlimited batches and admin accounts
  • Multiple organizations/faculties
  • Priority support
  • Invoice & PO billing
  • 14-day free trial

πŸ‘‰ View full pricing at schedula.app


πŸ™ Acknowledgments

Built with:

  • Tauri β€” Lightweight desktop apps
  • Svelte β€” Reactive UI framework
  • Rust β€” Systems language
  • SQLite β€” Embedded database
  • The open-source community

πŸ“§ Support

For issues, questions, or feature requests:


Made with ❀️ for academics worldwide

Top categories

Loading Svelte Themes