CampusDebug OS
An offline-first, zero-trust campus OS replacing clipboard fraud with dynamic rotating QRs and IoT chemical sensor washroom verification.
- Problem, approach and result explained
- Public source code
- Expert reviewed· 6 reviews
100%
Elimination of fake room cleaning via student dynamic QR
0s
Replay attack window (anti-screenshot token expiry)
165+
Automated tests passing with 0% data loss offline
Overview
The problem
Colleges, hostel wardens, security guards, cleaning staff, and thousands of residential students across Indian engineering campuses.
The approach
What we built and how:
- Zero-Trust Hostel Room Cleaning: Cleaners can only mark a room as cleaned by physically scanning the student’s live rotating dynamic QR code (generated with TweetNaCl/HMAC on the student’s PWA, expiring in seconds).
- Automated "All Away · Locked" Detection: Integrated with gate pass and leave registers. If all occupants of a room are checked out of campus, the room is automatically flagged as "All Away · Locked", preventing unauthorized room entry while exempting it from cleaning rounds.
- Sensor-Based Washroom Anti-Ghosting: A Dual-QR system (Scan-In outside the door, Scan-Out near the exit) paired with an ESP32 + MQ-135 chemical sensor. It verifies a mandatory 5-minute dwell time and detects a chemical/VOC spike from cleaning agents (phenyl/bleach), confirming genuine sanitation without privacy-invasive cameras.
- Offline-First Dual-Write Architecture: Built with React 19, Express 5, and Supabase PostgreSQL. Writes to cloud database when online, and instantly falls back to an atomic local disk-ledger when network drops. Queued transactions auto-heal and merge upon reconnection. Hardest decision & what we chose NOT to do: • Hardest Decision: Completely removing the "No QR" manual override button from the cleaner’s dashboard. Initially, we had an honesty-based "Record without QR" fallback, but realized it was a huge loophole allowing cleaners to sit in the lobby and fake-clean 20 rooms. We enforced 100% cryptographic proof of student presence. • What We Chose NOT to Do: We deliberately avoided camera/computer-vision surveillance in washrooms due to student privacy laws, and rejected cloud-only architectures that collapse under campus network outages.
The result
- Elimination of Fake Cleaning: Replaced 100% honor-based clipboards with tamper-proof cryptographic verification. A room can physically only be recorded when an authorized resident is present to unlock the door and present their live phone screen.
- Zero Gate Pass Replay Attacks: Dynamic rotation with 30-second token expiries completely eliminated the ability for students to share screenshot gate passes over WhatsApp.
- 100% Uptime During Network Outages: Tested dual-write persistence under simulated network disconnects. Zero data loss occurred during drops, with automatic self-healing sync within milliseconds of reconnection.
- Comprehensive Automated Test Coverage: 165+ automated test cases running on Node’s native test runner (
node:test) with an injectable fake-clock harness passing with zero failures across role auth, concurrency, and time-travel window expirations.
Reflection
What we would do differently: We would begin hardware-in-the-loop testing earlier. Developing the ESP32 MQ-135 chemical telemetry logic showed us that real-world environmental factors (like sensor preheat curve and cross-ventilation) require fine-tuned threshold calibration before deployment.
What is unfinished or known-broken: The ESP32 MQ-135 washroom telemetry is currently validated on benchtop development hardware and backend simulator endpoints. Mass-producing weather-resistant, tamper-proof 3D-printed wall enclosures for campus-wide deployment is scheduled for Phase 2.
What we learned: "Zero-trust beats honor systems every single time." In campus operations, if an application leaves a manual loophole (like a "bypass QR" button), it will inevitably be exploited. Software design must strictly align with physical security realities.
Submitted to Attendance, Mess, Hostel, Repeat: Campus Life, Debugged
- Your idea in one line
CampusDebug OS is an offline-first smart campus management platform that streamlines student gate passes, QR-based offline verification, AI-assisted hostel complaint management, and campus operations through role-based dashboards.
- What will be working by the finale?
1. Fast2SMS Transactional Notification Gateway: Real-time automated SMS dispatch to students upon gate pass approvals/rejections and complaint status updates. 2. Zero-Waste Hostel Meal RSVP: Allows hostel students to tap once to skip upcoming mess meals. The system aggregates real-time data to tell mess staff exact headcounts, preventing huge food waste and reducing procurement costs. 3. Edge AI & Offline Academic Copilot: An on-device/local campus AI model delivering BPUT syllabus Q&A, exam rule lookups, and credit calculations directly on the student’s phone without cloud data costs or internet access. 4. AI Faculty Location Predictor: Parses master class schedules, faculty duty rosters, and routine patterns to show students the estimated live location of professors along with a confidence rating (e.g., 85% in Lab 302, 15% in Cabin).
- Tech stack and hardware you plan to use
Tech Stack and Hardware: 1. Programming Languages & Core Web Frameworks: Languages: JavaScript (ES6+), HTML5, CSS3, SQL Frontend: React 19, Vite 6, TailwindCSS 3.4, Lucide React Icons Backend: Node.js, Express.js 2. Offline-First & Cryptographic Security Stack: Web Crypto API: HMAC-SHA256 Base64 signature signing & verification Offline Storage: IndexedDB (idb v8.0.2), Service Worker PWA for zero-latency offline caching QR Engine: qrcode.react (rendering), html5-qrcode (webcam/mobile camera scanner) 3. Database, Authentication & External Services: Database & Auth: Supabase PostgreSQL Database, Supabase Auth SMS Gateway: Fast2SMS API (/api/send-sms) for transactional phone alerts 4. AI Models & Frameworks: AI / NLP Model: Local Ollama LLM running Qwen2.5-1.5B GGUF (4-bit quantized) with regex heuristic fallback parser 5. Hardware & Devices Used: Server Hardware: Standard Laptop / On-Premise Campus Server (CPU/GPU) hosting Node.js API server & local Ollama LLM engine Client Hardware: Any standard smartphone / tablet / laptop with built-in camera/webcam for scanning QR codes 6. Hardware/Items Needed: None (Pure software & web architecture using existing mobile cameras and standard server hardware)
- What have you built or tested so far?
1. Cryptographic Offline Gate Pass & QR Verification: Tested Warden digital pass approval with tamper-evident HMAC-SHA256 Base64 signature generation. Tested live webcam camera scanning (html5-qrcode) with 100% offline token signature and expiration verification (0ms latency, zero internet required). 2. AI Complaint Parsing & Master Incident Clustering: Integrated local Ollama LLM (Qwen2.5-1.5B) to parse raw student complaint text. Successfully tested automated grouping of duplicate room complaints into a single Master Incident Cluster. 3. Multi-Role Offline-First PWA Dashboards: Built and rendered React 19 + TailwindCSS responsive web dashboards for Student, Warden, Security Guard, and Admin with IndexedDB local caching.
- Pitch deck (PDF)
- Pitch deck (PDF)PDF
- What's working now?
1. Zero-Trust Hostel Room Cleaning: Cleaners can only mark a room as cleaned by physically scanning the resident student’s live rotating dynamic QR code (anti-screenshot, expires within seconds). If all roommates are away from campus on an approved gate pass or leave, the system automatically detects this and marks the room as "All Away · Locked" (no cleaner entry permitted). 2. Campus Gate & Guard Scanner: Real-time dynamic QR scanning for student exits and returns, featuring late-return alerts, automated parent notifications, and an append-only gate ledger. 3. Offline-First Dual-Write Architecture: Built for intermittent campus connectivity—writes to Supabase PostgreSQL when online, and instantly falls back to an atomic local disk ledger when Wi-Fi drops. Self-heals and deduplicates queued data once reconnected. 4. Comprehensive Role Portals: Tailored, live interfaces for Student, Warden, Cleaner, Security Guard, Teacher, and Admin. 5. Classroom Attendance & Timetable: One-tap attendance marking synced with timetables, plus peer substitution coverage for faculty. 6. Robust Automated Test Suite: 165+ tests passing with zero failures on Node's native test runner with an injectable fake-clock harness.
- GitHub repository
- github.com/HaraPrasadGouda/CampusDebug-OS
- Deck or report (PDF)
- Deck or report (PDF)PDF