Skip to content

About

AI-powered Smart Building Crowd Intelligence System for real-time crowd monitoring, occupancy analytics, congestion detection, emergency planning, and safety management using React, FastAPI, and Python.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿข AI-Powered Smart Building Crowd Intelligence System

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.

React TypeScript FastAPI Python SQLite License


๐Ÿ“ธ Screenshots

Dashboard

image

Building Visualizer

image

Building Builder

image image

Live Crowd Heatmap

image

๐Ÿ“– Overview

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.


โœจ Key Features

  • ๐Ÿข 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

๐ŸŒ Real-World Applications

This platform can be adapted for multiple environments, including:

๐Ÿซ Schools & Universities

  • Monitor crowded corridors
  • Identify high-density gathering areas
  • Improve campus safety
  • Support emergency evacuation planning

๐Ÿ› Shopping Malls

  • Track visitor movement
  • Detect congestion hotspots
  • Optimize customer flow
  • Improve shopping experience

๐Ÿฅ Hospitals

  • Monitor waiting areas
  • Manage patient flow
  • Improve operational efficiency

โœˆ๏ธ Airports & Railway Stations

  • Passenger movement analytics
  • Queue monitoring
  • Crowd visualization
  • Capacity management

๐Ÿข Corporate Offices

  • Workspace occupancy monitoring
  • Floor utilization analysis
  • Space optimization

๐ŸŸ Stadiums & Event Venues

  • Crowd monitoring
  • Occupancy visualization
  • Emergency planning
  • Entry & Exit management

๐Ÿ—๏ธ System Architecture

                    React + TypeScript
                            โ”‚
                            โ–ผ
                    FastAPI REST API
                            โ”‚
                            โ–ผ
                   SQLAlchemy ORM
                            โ”‚
                            โ–ผ
                      SQLite Database
                            โ”‚
                            โ–ผ
                 Crowd Simulation Engine
                            โ”‚
                            โ–ผ
          Interactive Heatmap & Analytics Dashboard

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React 19
  • TypeScript
  • Vite
  • Tailwind CSS
  • React Query (TanStack Query)
  • Zustand
  • Lucide React Icons

Backend

  • FastAPI
  • Python
  • SQLAlchemy

Database

  • SQLite

Visualization

  • SVG Canvas Rendering
  • Interactive Heatmaps
  • Layered Floor Plans

๐Ÿš€ Getting Started

Prerequisites

Install the following software:

  • Python 3.10+
  • Node.js 18+

Verify installation:

python --version
node --version
npm --version

๐Ÿš€ Installation (Windows)

Backend

cd backend

python -m venv venv

venv\Scripts\activate

pip install -r requirements.txt

python -m uvicorn main:app --host 0.0.0.0 --port 8000

Frontend

cd frontend

npm install

npm run dev

Open

http://localhost:5173

Backend API

http://localhost:8000

Swagger Documentation

http://localhost:8000/docs

๐Ÿ“‚ Project Structure

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

๐Ÿ–ฅ๏ธ Application Modules

๐Ÿ“Š Dashboard

  • View all buildings
  • Live occupancy statistics
  • Building cards
  • Building management table
  • Search & Filter

๐Ÿ—บ๏ธ Building Visualizer

  • Interactive floor selection
  • Zone visualization
  • Live heatmap
  • Crowd simulation
  • Zoom & Pan
  • Live occupancy updates

๐Ÿ—๏ธ Building Builder

  • Create new buildings
  • Draw floor layouts
  • Create zones
  • Add entities
  • Configure Entry & Exit points
  • Edit occupancy settings

๐Ÿ“ˆ Crowd Simulation

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

๐Ÿ“ก REST API

Interactive Swagger Documentation is available at

http://localhost:8000/docs

๐Ÿ“ธ Screenshots

(Add screenshots here after deployment.)

Example:

  • Dashboard
  • Building Builder
  • Building Visualizer
  • Live Crowd Heatmap

๐Ÿ”ฎ Future Enhancements

  • 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

๐Ÿ‘จโ€๐Ÿ’ป Author

Animesh Singh

GitHub

https://github.com/Animeishhh


โญ If you found this project interesting, consider giving it a Star!

About

AI-powered Smart Building Crowd Intelligence System for real-time crowd monitoring, occupancy analytics, congestion detection, emergency planning, and safety management using React, FastAPI, and Python.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages