This project is a smart building management system that combines a ReactJS frontend, Flask backend, YOLOv11-powered camera integration, and ESP32-based smart outlets. The system allows administrators to manage buildings, rooms, and IoT devices, automate device control based on room occupancy, and monitor live camera feeds.
- Admin authentication (login/logout)
- Manage buildings, rooms, and devices
- Live camera feed and person detection (YOLOv11)
- Automated device control based on occupancy
- Real-time device status and communication
AI-hackathon/
├── backend/ # Flask API server
├── frontend/ # ReactJS client
├── embedded/ # ESP32/IoT code (optional)
├── requirements.txt
└── README.md
- Navigate to the backend directory:
cd backend - Create and activate a Python virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate - Install dependencies:
pip install -r ../requirements.txt
- Run the backend server:
The backend will start on
python app.py
http://127.0.0.1:5000/by default.
- Navigate to the frontend directory:
cd ../frontend - Install dependencies:
npm install
- Start the frontend development server:
The frontend will start on
npm start
http://localhost:3000/by default.
- Upload the provided code in the
embedded/directory to your ESP32 smart outlet. - Make sure the ESP32 can reach the backend server's API endpoints over the network.
- Access the frontend at http://localhost:3000/
- Log in with the default admin credentials (
admin/admin). - Add buildings, rooms, and devices via the web interface.
- View live camera feeds and monitor device status.
- Devices will be automatically controlled based on person detection if configured.
- Ensure both backend and frontend servers are running.
- Check network/firewall settings for device communication.
- For camera/YOLO issues, verify dependencies (
ultralytics,opencv-python-headless,torch, etc.) are installed. - Use browser dev tools or backend logs for debugging errors.
For further questions, please refer to the code comments or contact the project maintainer.