A full-stack Smart Building platform that simulates, visualizes, and analyzes crowd movement in real time to improve occupancy management, safety monitoring, and operational efficiency inside large facilities.
Managing thousands of people inside malls, hospitals, schools, airports, offices, hotels, and public buildings is challenging. Overcrowding, congestion, and inefficient movement can reduce operational efficiency and create safety concerns.
This project provides an AI-powered Smart Building Crowd Intelligence System that creates a digital twin of a building and continuously visualizes crowd movement through an interactive dashboard.
The platform enables administrators to monitor occupancy levels, visualize crowd density using heatmaps, identify congestion hotspots, manage building capacity, and support smarter operational decisions through real-time analytics.
- ๐ข Multi-building management
- ๐บ๏ธ Interactive floor-plan visualization
- ๐ฅ Real-time crowd simulation
- ๐ Live occupancy monitoring
- ๐ฅ Dynamic crowd heatmaps
- ๐ Zone-wise occupancy analytics
- ๐ช Entry & Exit point management
- ๐ฏ Capacity threshold monitoring
- โก Interactive dashboard
- ๐ ๏ธ Building Builder for creating floor layouts
- ๐ Live crowd simulation controls
- ๐ก REST API powered by FastAPI
This platform can be adapted for multiple environments, including:
- Monitor crowded corridors
- Identify high-density gathering areas
- Improve campus safety
- Support emergency evacuation planning
- Track visitor movement
- Detect congestion hotspots
- Optimize customer flow
- Improve shopping experience
- Monitor waiting areas
- Manage patient flow
- Improve operational efficiency
- Passenger movement analytics
- Queue monitoring
- Crowd visualization
- Capacity management
- Workspace occupancy monitoring
- Floor utilization analysis
- Space optimization
- Crowd monitoring
- Occupancy visualization
- Emergency planning
- Entry & Exit management
React + TypeScript
โ
โผ
FastAPI REST API
โ
โผ
SQLAlchemy ORM
โ
โผ
SQLite Database
โ
โผ
Crowd Simulation Engine
โ
โผ
Interactive Heatmap & Analytics Dashboard
- React 19
- TypeScript
- Vite
- Tailwind CSS
- React Query (TanStack Query)
- Zustand
- Lucide React Icons
- FastAPI
- Python
- SQLAlchemy
- SQLite
- SVG Canvas Rendering
- Interactive Heatmaps
- Layered Floor Plans
Install the following software:
- Python 3.10+
- Node.js 18+
Verify installation:
python --version
node --version
npm --versioncd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python -m uvicorn main:app --host 0.0.0.0 --port 8000cd frontend
npm install
npm run devOpen
http://localhost:5173
Backend API
http://localhost:8000
Swagger Documentation
http://localhost:8000/docs
smart-building-visualizer/
โ
โโโ backend/
โ โโโ main.py
โ โโโ simulator.py
โ โโโ crowd_flow_engine.py
โ โโโ crowd_particles.py
โ โโโ database.py
โ โโโ models.py
โ โโโ schemas.py
โ โโโ defaults.py
โ โโโ seed.py
โ โโโ requirements.txt
โ
โโโ frontend/
โ โโโ public/
โ โโโ src/
โ โ โโโ api/
โ โ โโโ components/
โ โ โโโ hooks/
โ โ โโโ pages/
โ โ โโโ store/
โ โ โโโ assets/
โ โ โโโ types/
โ โ โโโ App.tsx
โ โ โโโ main.tsx
โ โ
โ โโโ package.json
โ โโโ vite.config.ts
โ
โโโ scripts/
โ
โโโ README.md
โ
โโโ .gitignore
- View all buildings
- Live occupancy statistics
- Building cards
- Building management table
- Search & Filter
- Interactive floor selection
- Zone visualization
- Live heatmap
- Crowd simulation
- Zoom & Pan
- Live occupancy updates
- Create new buildings
- Draw floor layouts
- Create zones
- Add entities
- Configure Entry & Exit points
- Edit occupancy settings
The application includes a crowd simulation engine that updates occupancy values automatically.
Simulation includes:
- Live occupancy updates
- Capacity-aware movement
- Entry & Exit balancing
- Zone occupancy tracking
- Pause / Resume simulation
Interactive Swagger Documentation is available at
http://localhost:8000/docs
(Add screenshots here after deployment.)
Example:
- Dashboard
- Building Builder
- Building Visualizer
- Live Crowd Heatmap
- AI-powered anomaly detection
- Predictive crowd analytics
- IoT sensor integration
- CCTV integration
- Computer Vision support
- Emergency alert system
- Multi-user authentication
- Cloud deployment
- Mobile application
Animesh Singh
GitHub