Empowering universities, colleges, and educational institutions with Google OR-Tools CP-SAT constraint optimization, full-scale Faculty Management (FMS), and Make.com automation
Plannify.exe is an enterprise-grade academic operating system built to eliminate manual timetable conflicts and streamline institution-wide faculty workflows. By fusing Google OR-Tools CP-SAT constraint satisfaction algorithms with a real-time Faculty Management System (FMS), Plannify transforms institutional logistics into an automated, mathematically verified pipeline.
Note
For complete technical blueprints, relational schemas, and mathematical constraint formulations, refer to the Product Requirement Document (PRD.md).
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PLANNIFY.EXE β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββ¬ββββββββββββββββ΄ββββββββββββββββ¬βββββββββββββββββββββββββ
βΌ βΌ βΌ βΌ
βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
β OR-Tools SAT β β Faculty (FMS) β β AI Co-Pilot β β Make.com Sync β
β β’ Conflict 0 β β β’ Attendance β β β’ Groq 70B β β β’ WhatsApp β
β β’ Lab Blocks β β β’ Leave ERP β β β’ OCR Vision β β β’ Excel Push β
β β’ Workload β β β’ Substitutesβ β β’ Analytics β β β’ Webhooks β
βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ βββββββββββββββββ
- Zero-Conflict Guarantee: Google OR-Tools CP-SAT solver simultaneously enforces hard constraints (room capacity, 1:1 teacher allocation, section exclusivity) and soft constraints (pedagogical load distribution, consecutive lecture bounds).
- Lab-Block Placement: Native support for contiguous multi-period practical laboratory sessions bound to specialized laboratory facilities.
- Dynamic Re-Solver & Substitution: Instant single-click proxy assignment that identifies free, qualified teachers in real time during faculty absences.
- Centralized Directory: Comprehensive faculty database with designations, employee codes, departments, and weekly workload targets.
- Biometric Attendance Integration: Universal CSV & REST ingestion for hardware biometric punch terminals (ZKTeco, eSSL, BioMax) with automatic late-arrival calculations.
- Digital Leave Management: Multi-tier leave lifecycle (Casual Leave, Earned Leave, Medical, Duty Leave) featuring real-time balance tracking and auto-substitution workflows.
- Operational Analytics 360Β°: Institutional dashboards with attendance rates, workload threshold breaches, and exportable audit reports.
- Conversational Assistant: Powered by Groq Llama-3.3-70B for real-time timetable reasoning, scheduling bottleneck resolution, and workload analysis.
- Gemini 2.5 Flash OCR Extraction: Extracts structured schedules directly from physical paper timetables or uploaded images.
- Make.com (Integromat) Webhooks: Automated broadcast triggers for personalized Excel timetable distribution and WhatsApp proxy alerts.
- Supabase Cloud Sync: Real-time relational database persistence (PostgreSQL 15+) with Row-Level Security (RLS) policies.
- Multi-Sheet Excel Engine: Client-side & server-side generation of institutional master timetables and individual faculty agendas.
| Layer | Technologies | Purpose |
|---|---|---|
| Frontend | React 19, Tailwind CSS, Recharts, Lucide Icons | Responsive warm-theme administrative console & faculty portal |
| Backend API | FastAPI (Python 3.10+), Pydantic v2, Starlette | High-throughput asynchronous REST API & orchestration |
| Constraint Solver | Google OR-Tools (CP-SAT Solver) | Mathematical modeling and integer constraint satisfaction |
| Database & Auth | Supabase (PostgreSQL 15), SQLite fallback | Relational data persistence, user authentication, and RLS |
| AI / LLM | Groq API (Llama 3.3 70B), Google Gemini 2.5 Flash | Natural language reasoning and multi-modal image extraction |
| Automation | Make.com Webhooks, OpenPyXL | Automated communications and formatted Excel sheet delivery |
Plannify enforces a multi-tiered Defense-in-Depth validation model to guarantee mathematical impossibility of double-bookings, faculty schedule overlaps, or illegal room allocations:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β INPUT: Academic Setup / OCR / Manual Entry β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LAYER 1: MATHEMATICAL CONSTRAINT SOLVER (Google OR-Tools CP-SAT) β
β β’ Boolean Decision Matrix: X[t, s, r, d, p] β {0, 1} β
β β’ Hard Constraints: Teacher Uniqueness, Section Uniqueness, Room Exclusivity, Continuous Lab Blocks β
β β’ Soft Constraints: Teacher Daily Gaps, UGC 14-18h Workload Balancing, Even Period Distribution β
βββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βΌ Generated Schedule Payload
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LAYER 2: INDEPENDENT DETERMINISTIC VALIDATOR (TimetableValidator β 18 Institutional Rules) β
β β’ Standalone audit engine verifying 18 rules before database commit β
β β’ Verifies Faculty Availability, Room Capacity, Lab Facility Compatibility, Teacher Inactive/On-Leave Detection β
β β’ Generates structured Violation Reports with Severity Levels (ERROR vs WARNING) β
βββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βΌ Validated Payload (valid == True)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β LAYER 3: RELATIONAL DATABASE INTEGRITY & ROW-LEVEL SECURITY (PostgreSQL / Supabase) β
β β’ Composite Database Unique Constraints: β
β - UNIQUE (timetable_id, day, slot, teacher_name) β
β - UNIQUE (timetable_id, day, slot, room) β
β - UNIQUE (timetable_id, day, slot, section) β
β β’ Versioning State Machine: Draft β Published β Archived with Immutable History Tracking β
β β’ PostgreSQL Row-Level Security (RLS) policies isolating department records β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-
Layer 1 β Mathematical CP-SAT Optimization Solver:
- Variables represent exact allocations across Teacher (
$t$ ), Subject ($s$ ), Room ($r$ ), Day ($d$ ), and Slot ($p$ ). - Solves integer constraint satisfaction problems preventing any physical overlap mathematically before candidate schedules are materialized.
- Variables represent exact allocations across Teacher (
-
Layer 2 β Independent Deterministic 18-Rule Audit Engine (
TimetableValidator):- Completely decoupled from the solver, this engine audits all schedules (generated, manual edits, OCR scans, or CSV imports) against 18 comprehensive operational rules.
- If any hard constraint fails (e.g. faculty double-booked, room type mismatch), execution is halted with an
HTTP 422 Unprocessable Entitydetailed diagnostics report.
-
Layer 3 β Relational Database Constraints & Security:
- Even if anomalous payloads bypass application memory, Supabase/PostgreSQL database-level composite unique keys physically reject colliding rows at the storage engine level.
- Transactional versioning isolates active published master timetables from work-in-progress drafts.
flowchart TD
subgraph P1["1. Timetable Generation & Publishing Pipeline"]
A1["Academic Context\n(Faculty, Subjects, Rooms, Slots)"] --> B1["FastAPI /generate Endpoint"]
B1 --> C1["Google OR-Tools CP-SAT Solver (Layer 1)"]
C1 --> D1["18-Rule Deterministic Audit (Layer 2)"]
D1 --> E1["Relational Draft Save (Layer 3)"]
E1 --> F1["Official Publication & Student Portal Live"]
end
subgraph P2["2. Multi-Modal Vision OCR Pipeline"]
A2["Document Upload\n(Photo, Paper Scan, Excel Image)"] --> B2["Client-Side Resolution & Compression"]
B2 --> C2["Gemini 2.5 / Groq LLaMA 3.2 Vision"]
C2 --> D2["JSON Cleaning & Normalization"]
D2 --> E2["Academic Context & Supabase Sync"]
end
subgraph P3["3. Attendance, Leave & Auto-Substitution Pipeline"]
A3["Biometric Punch\n(CSV / Hardware REST)"] --> B3["Attendance Analytics & Late Calculations"]
C3["Leave Application\n(Casual, Medical, Duty)"] --> D3["Leave Balance Verification"]
D3 --> E3["Dynamic Proxy Recommendation Engine"]
E3 --> F3["Real-time Timetable Re-assignment"]
end
subgraph P4["4. Automation & Multi-Channel Broadcast Pipeline"]
A4["Published Schedule Event"] --> B4["OpenPyXL Multi-Sheet Workbook Generation"]
B4 --> C4["Make.com Webhook Dispatch"]
C4 --> D4["Personalized Faculty Excel Attachments & WhatsApp Alerts"]
end
- Input Ingestion: Gathers faculty availability, subjects, required slots, room tags, and section configurations.
- Solving: Invokes Google OR-Tools CP-SAT engine to find optimal zero-collision distributions.
- Validation: Verifies compliance against 18 institutional rules.
- Relational Storage: Persists normalized rows into
timetablesandtimetable_assignmentstables in Supabase. - Publication: Transitions draft to published state, instantly updating public student/faculty portals in real time.
- Capture: Administrators attach photos of physical paper timetables or faculty spreadsheets.
- Image Optimization: Client-side canvas normalization compresses images for high-speed API payload transmission.
- Vision Extraction: Google Gemini 2.5 Flash / Groq Vision extracts names, contact details, designations, course codes, and slot mappings.
- Auto-Sync: Automatically populates
teachers,subjects, andsectionsstates and syncs with Supabasefaculty_profiles.
- Biometric Processing: Ingests hardware punches, calculating on-time, late minutes, and absences.
- Leave Lifecycle: Validates leave quota balances (
CL,EL,ML,OD,CO) upon application. - Proxy Matching: Automatically identifies available, qualified faculty with free periods and minimum weekly workload burden.
- Live Re-routing: Updates the master timetable grid and marks substitute coverage badges in real time.
- Master & Individual Workbooks: Generates institutional multi-tab master workbooks and personalized faculty weekly agendas via OpenPyXL.
- Make.com Webhook Delivery: Dispatches automated payloads to Make.com scenarios for WhatsApp proxy alerts, SMS broadcasts, and bulk email distributions.
- Node.js: v18.0 or higher
- Python: v3.10 or higher
- Git
git clone https://github.com/ut3av/Plannify.git
cd PlannifyCreate .env in the root directory and backend/.env:
Frontend Configuration (.env):
PORT=3000
REACT_APP_API_URL=http://localhost:8080
REACT_APP_SUPABASE_URL=https://your-project.supabase.co
REACT_APP_SUPABASE_ANON_KEY=your_supabase_anon_keyBackend Configuration (backend/.env):
PORT=8080
BACKEND_PORT=8080
HOST=0.0.0.0
CORS_ORIGINS=http://localhost:3000,http://127.0.0.1:3000
# AI Configuration
GROQ_API_KEY=your_groq_api_key
GEMINI_API_KEY=your_gemini_api_key
# Automation (Make.com)
MAKE_WEBHOOK_URL=https://hook.eu1.make.com/your-custom-webhook-id
# Supabase Cloud Database
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=your_supabase_service_role_keyRun the provided migration script in your Supabase SQL Editor:
- Execute
supabase-faculty-migration.sqlto initialize all 13 core relational tables and security policies.
Start the FastAPI Backend:
# From root directory
pip install -r backend/requirements.txt
python -m uvicorn backend.main:app --host 0.0.0.0 --port 8080 --reloadStart the React Application:
# In a new terminal window
npm install
npm startAccess the application at http://localhost:3000. API documentation is available at http://localhost:8080/docs.
| Endpoint | Method | Description |
|---|---|---|
/generate |
POST |
Execute Google OR-Tools CP-SAT solver to generate optimized timetable |
/reschedule |
POST |
Block unavailable slots and re-solve schedule with minimal perturbation |
/proxy |
POST |
Automatically assign available substitute teachers for absent faculty |
/save |
POST |
Persist active timetable to relational database |
/saved |
GET |
Retrieve list of saved institutional schedules |
/faculty/ |
GET / POST |
List and create faculty member profiles |
/attendance/ |
GET / POST |
Retrieve attendance records or ingest biometric CSV punch files |
/leaves/apply |
POST |
Submit faculty digital leave application |
/leaves/{id}/approve |
PUT |
Approve leave application and link substitute faculty assignment |
/analytics/dashboard |
GET |
Retrieve 360Β° institutional operational statistics |
/make/test |
POST |
Dispatch heartbeat test webhook to Make.com |
/make/status |
GET |
Inspect active Make.com webhook connection status |
Plannify/
βββ backend/
β βββ analytics_db.py # Analytics calculation and metrics aggregation
β βββ analytics_routes.py # Institutional reporting & export endpoints
β βββ attendance_routes.py # Biometric punch ingestion & attendance tracking
β βββ faculty_db.py # Faculty lifecycle & database abstraction layer
β βββ faculty_routes.py # Faculty CRUD and department endpoints
β βββ leave_routes.py # Multi-tier leave workflow management
β βββ substitution_routes.py # Substitute recommendation & assignment history
β βββ main.py # FastAPI core application & OR-Tools CP-SAT model
β βββ models.py # Pydantic schemas and validation models
β βββ requirements.txt # Python backend dependencies
βββ src/
β βββ components/
β β βββ dashboard/ # Operational overview & metric widgets
β β βββ faculty/ # FMS views (Directory, Leave, Attendance, Analytics)
β β βββ reports/ # Institutional export & audit center
β β βββ sections/ # Academic sections & department management
β β βββ shell/ # Navigation, headers, command palette
β β βββ AIChatBot.js # Groq-powered conversational AI Co-Pilot
β β βββ TimetableGrid.js # Master timetable matrix & interactive cards
β β βββ SubjectsSection.js # Subject registry & theme-adaptive badges
β βββ services/ # Supabase data synchronization services
β βββ index.css # Design system tokens & warm theme typography
β βββ App.js # Application state & routing orchestration
βββ docs/ # Architectural diagrams & screenshots
βββ PRD.md # Comprehensive Product Requirement Document
βββ make_integration_guide.md # Step-by-step Make.com webhook guide
βββ supabase-faculty-migration.sql # Complete database DDL migration script
- π Product Requirement Document (PRD)
- βοΈ Make.com Webhook Integration Guide
- ποΈ Supabase SQL Database Migration
Distributed under the MIT License. See LICENSE for details.
Engineered for Academic Excellence β’ Plannify.exe