Built for IIT Guwahati Hackathon 2025, 2nd Runner Up!
๐ Live Demo โข ๐ Documentation โข ๐ฏ Features โข โก Quick Start
CampusFlow is an advanced, AI-powered campus security and entity resolution platform that unifies fragmented identity data across multiple systems (card swipes, WiFi logs, CCTV, lab bookings) into a comprehensive, real-time intelligence dashboard.
Modern campuses generate massive amounts of fragmented identity data:
- ๐ข Card swipe systems track physical access
- ๐ก WiFi logs capture device connectivity
- ๐น CCTV systems monitor visual presence
- ๐ฌ Lab booking systems record facility usage
CampusFlow seamlessly integrates these disparate data sources to provide:
- โ Real-time entity resolution with 99.17% accuracy
- โ Predictive space analytics powered by ML
- โ Anomaly detection for security threats
- โ Privacy-preserving operations with role-based access
Our flagship feature that won us the hackathon
- ๐บ๏ธ Interactive Campus Map with real-time occupancy visualization
- ๐ ML-Powered Forecasting (Neural Net + XGBoost + LightGBM ensemble)
โ ๏ธ Smart Alert System with severity scoring and explainability- ๐ฏ Next-Hour Predictions for every campus zone
- ๐ Evidence-Based Recommendations with impact scoring
ML Model Architecture:
Hybrid Ensemble (99.17% Top-1 Accuracy)
โโ Neural Network (40%) - Deep patterns
โโ XGBoost (30%) - Feature importance
โโ LightGBM (30%) - Gradient boosting
- Multi-Source Fusion: Combines data from 5+ different systems
- Fuzzy Matching: Handles typos, abbreviations, and name variations
- Cross-Source Linking: 85-95% confidence across disparate identifiers
- Real-Time Updates: Sub-second query response times
- ๐ Real-Time Stats: 7,000+ entities tracked
- ๐ Activity Timelines: Complete historical tracking
- ๐ Deep Provenance: Source attribution for every data point
- ๐ค Anomaly Detection: ML-powered threat identification
- ๐ Location Prediction: Probabilistic location forecasting
- ๐ Dark/Light Theme: Fully responsive design
- ๐ฑ Mobile-First: Works flawlessly on all devices
- โก Lightning Fast: Optimized performance with React 18
- ๐ญ Smooth Animations: Powered by Framer Motion
- โฟ Accessible: WCAG 2.1 compliant
graph TB
A[Frontend - React + TypeScript] --> B[API Layer - FastAPI]
B --> C[Database - Supabase PostgreSQL]
B --> D[ML Engine - PyTorch + XGBoost]
D --> E[SpaceFlow Predictor]
D --> F[Anomaly Detector]
C --> G[Entity Resolver]
G --> H[Cross-Source Linker]
- โ๏ธ React 18.3 - Modern UI framework
- ๐ TypeScript 5.5 - Type-safe development
- ๐จ Tailwind CSS - Utility-first styling
- ๐ญ Framer Motion - Smooth animations
- ๐ Recharts - Beautiful data visualization
- ๐งฉ Shadcn/UI - Premium component library
- ๐ FastAPI - High-performance Python framework
- ๐ PostgreSQL - Robust relational database
- ๐ฅ Supabase - Real-time database & auth
- ๐ง PyTorch - Neural network training
- ๐ XGBoost + LightGBM - Gradient boosting
- ๐ FuzzyWuzzy - Fuzzy string matching
- ๐ค Hybrid Ensemble Model (99.17% accuracy)
- ๐ SHAP - Model explainability
- ๐ฒ Uncertainty Quantification - Confidence intervals
- ๐ฎ Time-Series Forecasting - Next-hour predictions
- Node.js 18+ and npm 9+
- Python 3.11+
- Supabase account (free tier works!)
# Clone the repository
git clone https://github.com/Shafwansafi06/campus-entity-resolver1.git
cd campus-entity-resolver
# Install dependencies
npm install
# Start development server
npm run devFrontend will be available at http://localhost:5173
# Navigate to backend
cd backend
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create credentials file
cp creds.env.example creds.env # or create manuallyEdit backend/creds.env:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_KEY=your-anon-key-here# Start the backend server
python main.pyBackend API will be available at http://localhost:8000
- Open
http://localhost:5173in your browser - Login with demo credentials (or sign up)
- Explore the dashboard and SpaceFlow features!
| Metric | Value | Industry Standard |
|---|---|---|
| Top-1 Accuracy | 99.17% | 95%+ |
| RMSE | 1.15 | <2.0 |
| MAE | 0.79 | <1.0 |
| Rยฒ Score | 0.878 | >0.85 |
| Inference Time | <50ms | <100ms |
| Metric | Value |
|---|---|
| Entities Tracked | 7,000+ |
| Activity Records | 50,000+ |
| API Response Time | <100ms |
| Real-Time Updates | Yes |
| Concurrent Users | 100+ |
-
๐ Dashboard Overview
- View real-time campus statistics
- Monitor security alerts
- Track active entities
-
๐บ๏ธ SpaceFlow Intelligence
- Explore interactive campus map
- View predictive occupancy forecasts
- Receive smart alerts with explainability
-
๐ Entity Deep Dive
- Search for any entity
- View complete activity timeline
- Analyze cross-source linkages
-
๐ก๏ธ Security Monitoring
- Monitor inactive entities
- Detect anomalies
- Track access violations
campus-entity-resolver/
โโโ src/ # Frontend source code
โ โโโ components/ # Reusable UI components
โ โโโ pages/ # Application pages
โ โ โโโ Dashboard.tsx # Main dashboard
โ โ โโโ SpaceFlow.tsx # Predictive intelligence
โ โ โโโ Entities.tsx # Entity management
โ โ โโโ Alerts.tsx # Security alerts
โ โโโ contexts/ # React contexts
โ โโโ hooks/ # Custom React hooks
โโโ backend/ # Python FastAPI backend
โ โโโ main.py # API server
โ โโโ ml_predictor.py # ML inference engine
โ โโโ database.py # Supabase integration
โ โโโ models/ # Trained ML models
โโโ public/ # Static assets
# Build production bundle
npm run build
# Preview production build
npm run preview# The backend is ready for containerization
docker build -t campusflow-backend .
docker run -p 8000:8000 campusflow-backendWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with โค๏ธ by the CampusFlow Team for IIT Guwahati Hackathon 2025
- IIT Guwahati for hosting the hackathon
- Supabase for database infrastructure
- The open-source community for amazing tools