⚡ Real-time, multi-role campus alert system with location tracking, SSE streaming, and map overlays.
Campus SOS is a real-time campus safety platform that connects students, guards, drivers, and faculty.
It enables instant alerts, live tracking, and role-based dashboards — all running on Cloudflare Workers with blazing-fast updates under 1 second.
- 🧑🎓 Multi-role dashboards: Student, Guard, Driver, Faculty
- 🌍 Live map updates: Leaflet-based campus visualization with zone overlays
- ⚡ Instant alerts (<1s): via Server-Sent Events (SSE)
- 🔒 JWT authentication: Secure and stateless
- 🧩 Cloudflare Workers + Prisma: Edge-first serverless design
- 🗺️ Geo-fencing support: Detects movement across campus zones
- 📡 Low-latency communication: Persistent connections via SSE stream
| Layer | Technology |
|---|---|
| Frontend | React + Vite + TailwindCSS |
| Backend | Hono (Cloudflare Workers) |
| Database | PostgreSQL (Neon) |
| ORM | Prisma |
| Real-time | Server-Sent Events (SSE) |
| Map | Leaflet + OpenStreetMap |
| Auth | JWT |
| Hosting | Cloudflare Pages + Workers |
---
Clone the repository and set up your environment:
git clone https://github.com/Anshpujara5/campus-sos
cd campus-sos
cp .env.example .env # Fill in your secrets
npm ci
npm run dev

