Skip to content

marmik28/Smart-Desk-Occupancy-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Desk Occupancy System

An IoT-based smart desk occupancy system that detects whether a desk is in use and displays the data through a backend API and a web dashboard.

This project uses an ESP32 to collect occupancy data, a backend service to process and store it, and a frontend application to visualize desk usage in real time.


🚀 Features

  • Real-time desk occupancy detection
  • ESP32 microcontroller with sensor integration
  • Backend API for data ingestion and retrieval
  • Web dashboard for visualization
  • Modular and scalable system design

🧠 System Architecture

Smart-Desk-Occupancy-System
├── backend/                     # Backend API & services
├── esp32/
│   └── deskOccupancySystem/     # ESP32 firmware
└── frontend/                    # Web dashboard

🕹️ ESP32 Firmware (esp32/deskOccupancySystem)

The ESP32 firmware is responsible for:

  • Reading sensor data
  • Determining desk occupancy
  • Sending occupancy updates to the backend over Wi-Fi

Setup

  1. Install Arduino IDE or PlatformIO
  2. Select your ESP32 board
  3. Configure Wi-Fi credentials and backend URL in the code
  4. Connect the occupancy sensor to the ESP32 GPIO pins
  5. Flash the firmware to the board

🔁 Backend (backend/)

The backend receives occupancy data from the ESP32 and exposes APIs for the frontend.

Responsibilities

  • Receive sensor data
  • Store desk occupancy state
  • Provide APIs for current and historical data

Start the backend

cd backend
npm install        # or pip install -r requirements.txt
npm start          # or python app.py

Example API Endpoints

Endpoint Method Description
/api/occupancy POST Submit occupancy data
/api/occupancy GET Get current desk status
/api/history GET Retrieve occupancy history

🖥️ Frontend (frontend/)

The frontend displays desk occupancy data in real time.

Features

  • Live desk availability
  • Simple dashboard UI
  • Scalable for multiple desks

Start the frontend

cd frontend
npm install
npm start

⚙️ Hardware Requirements

  • ESP32 Development Board
  • Occupancy sensor (PIR, pressure, or ultrasonic)
  • USB power source or battery

🧪 Testing

  • Test backend APIs using Postman or curl
  • Simulate sensor payloads
  • Verify UI updates in real time

🔮 Future Improvements

  • Authentication and security
  • Advanced analytics and reporting
  • Calendar and office system integrations

👤 Author

Marmik Patel


About

An IoT-based smart desk occupancy system that detects whether a desk is in use and displays the data through a backend API and a web dashboard.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors