๐
Jadwali (ุฌูุฏููููู) โ Autonomous School Timetable Generator
โก An autonomous, conflict-free school timetable generator & interactive scheduling platform powered by deterministic CSP algorithms.
ุฌูุฏููููู โ ุงูู
ูููุฏ ุงูุฐูู ููุฌุฏุงูู ุงูู
ุฏุฑุณูุฉ ุจูุธุงู
ุญู ุงููููุฏ ุงูุฎูุงุฑุฒู
ูุ ุฎุงูู ุชู
ุงู
ุงู ู
ู ุงูุชุนุงุฑุถุงุช ุจุฎุตูุตูุฉ ูุณุฑุนุฉ ูุงุฆูุฉ.
๐ Live Demo: https://o2sa.github.io/Jadwali/
๐ About Jadwali (ุฌูุฏููููู)
Manually crafting academic timetables that satisfy complex real-world institutional constraintsโteacher availability, class periods, maximum daily workloads, room allocations, and subject spacingโis a tedious and error-prone puzzle.
Jadwali (ุฌูุฏููููู) automates school timetable generation using an advanced deterministic Constraint Satisfaction Problem (CSP) engine featuring:
- Backtracking with Forward Checking for strict constraint pruning.
- Minimum Remaining Values (MRV) heuristic for optimal variable ordering.
- Least-Constraining Value (LCV) heuristic for value selection.
The platform is designed to be 100% local-first and client-driven: all calculations run client-side inside Web Workers and persist locally in IndexedDB (zero cloud tracking, absolute institutional privacy), while also supporting an optional full-stack Express & MongoDB backend mode.
โจ Key Capabilities
- โก Automated CSP Solver Engine: Timetables are generated inside a dedicated background Web Worker using mathematically proven constraint resolution, ensuring conflict-free schedules and 60 FPS UI responsiveness.
- ๐ 100% Client-Side Privacy: All institutional data (teachers, classes, subjects, constraints, and schedules) stays securely on your machine in IndexedDB via Dexie.js. No telemetry or server dependencies required.
- ๐ Native Bilingual RTL & LTR Support:
- Full Arabic and English localization with automatic locale detection.
- Native RTL/LTR transitions powered by Mantine's
DirectionProvider.
- Modern Arabic typography with Cairo and Tajawal Google fonts.
- Interactive one-click language switcher in the header.
- ๐ Adaptive System Dark & Light Themes:
- Automatically honors system preferences (
prefers-color-scheme) with manual toggle.
- Elevated glassmorphic styling, high-contrast dark timetable matrix, and accessible status indicators.
- ๐
Interactive Drag & Drop Timetable Matrix:
- Multi-view inspection: Class Timetable, Teacher Timetable, and Master School Matrix.
- Move and swap lecture periods with real-time constraint validation, visual collision cues, and multi-step Undo/Redo.
- โ๏ธ Customizable Academic Calendar:
- Configurable working days per week (5, 6, or 7 days).
- Flexible daily lecture periods (6 to 8 periods).
- Teacher availability matrices, part-time schedules, and weekly workload capacity enforcement.
- ๐ค Multi-Format Universal Export:
- One-click export to formatted Excel spreadsheets, print-ready PDFs, and portable JSON backups.
- ๐ Automated GitHub Pages CI/CD:
- Continuous integration and deployment via GitHub Actions (
.github/workflows/deploy.yml).
- SPA 404 fallback routing for reliable direct link navigation.
๐๏ธ Architecture & Monorepo Structure
Jadwali/
โโโ packages/
โ โโโ school-timetabling-engine/ # Standalone deterministic CSP solver package (CJS, ESM, d.ts)
โโโ client/ # React 18 + Vite + Mantine UI v7 client
โ โโโ src/
โ โ โโโ api/ # Data context (Local IndexedDB Dexie / Remote API)
โ โ โโโ components/ # Reusable UI components, modals, and landing sections
โ โ โโโ i18n/ # Bilingual translations & RTL context
โ โ โโโ layouts/ # Glassmorphic AppLayout & floating sidebar navigation
โ โ โโโ pages/ # LandingPage, Dashboard, Teachers, Classes, Generator, etc.
โ โ โโโ theme/ # Brand tokens, colors, and dark mode styling
โ โโโ tests/ # Vitest + React Testing Library test suite
โโโ server/ # Optional Node.js + Express + TypeScript REST API
โ โโโ src/ # Express application, routes, controllers, schemas, services
โ โโโ tests/ # Integration and unit test suite (Vitest + Supertest)
โ โโโ dist/ # Compiled production JavaScript bundle
โโโ .github/workflows/deploy.yml # GitHub Actions deployment to GitHub Pages
๐ Getting Started
๐ณ Docker Quickstart (Easiest Way to Run)
The simplest and fastest way to run the entire full-stack platform (Frontend Client + Express API + MongoDB) is with Docker Compose:
# Clone the repository
git clone https://github.com/O2sa/Jadwali.git
cd Jadwali
# Start all services in the background
docker compose up -d
Once running, navigate to:
๐ก Instant Out-of-the-Box Demo: On the first launch, Jadwali detects a fresh database and automatically seeds a complete demo school (teachers, classes, subjects, and curriculum) so you can start scheduling right away! Data is safely persisted across restarts in the mongo_data volume.
To view real-time container logs:
docker compose logs -f
To stop the platform:
docker compose down
Prerequisites for Local Development
- Node.js (version 18 or later, Node 20 LTS recommended)
- pnpm (version 9 or later)
Quick Start (Client / In-Browser Mode)
Clone the repository:
git clone https://github.com/O2sa/Jadwali.git
cd Jadwali
Install dependencies:
pnpm install
Start the development server:
pnpm --filter client dev
Open your browser:
Navigate to http://localhost:5173 to explore the landing page and start generating schedules.
Optional: Full-Stack Mode with Express & MongoDB
If you prefer using a centralized database:
- Ensure MongoDB is running (
mongodb://localhost:27017/school-scheduler).
- Start the API server:
pnpm --filter server dev
- Run both concurrently:
pnpm dev:all
๐งช Testing & Verification
Run the full monorepo test suite (engine + client):
pnpm test
Run test suite for a specific package:
pnpm --filter client test
pnpm --filter school-timetabling-engine test
Typecheck and production build:
pnpm --filter client typecheck
pnpm build
๐ข Deployment
The repository includes a GitHub Actions workflow in .github/workflows/deploy.yml that builds and deploys the application to GitHub Pages on every push to development or main.
To enable it:
- Go to Settings > Pages in your GitHub repository.
- Under Build and deployment > Source, choose GitHub Actions.
- Push to
development or main to trigger the automated build and deployment.
๐ License
Distributed under the MIT License. See LICENSE for more information.