https://github.com/tigo-cmd/iot-based-smart-locker-system
IOT Based Smart Locker System for Efficient Pacel Delivery
https://github.com/tigo-cmd/iot-based-smart-locker-system
Last synced: 12 months ago
JSON representation
IOT Based Smart Locker System for Efficient Pacel Delivery
- Host: GitHub
- URL: https://github.com/tigo-cmd/iot-based-smart-locker-system
- Owner: Tigo-cmd
- Created: 2025-08-06T03:48:45.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-08-06T04:00:08.000Z (12 months ago)
- Last Synced: 2025-08-06T06:07:20.806Z (12 months ago)
- Language: TypeScript
- Homepage: https://iot-smart-locker.vercel.app
- Size: 175 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IoT-Enabled Smart Locker System
This project implements a complete end-to-end smart locker platform, comprising:
- **ESP32 firmware** (Arduino/C++) that drives a servo lock, reads a keypad & LCD, and beeps a buzzer
- **Flask backend** with SQLite persistence, CORS, and REST endpoints to register lockers, generate/verify OTPs, and record open/close status & activities
- **React frontend** (Vite + TypeScript) that lists lockers, shows their status & current OTP, and lets couriers or admins generate new OTPs and remotely open/close lockers
---
## Features
- **Locker registration** via `POST /api/lockers/`
- **OTP lifecycle**
- Generate new OTP: `POST /api/lockers//otp`
- Fetch current OTP: `GET /api/lockers//otp`
- Verify user-entered OTP: `POST /api/lockers//verify-otp`
- **Status reporting**
- Read status: `GET /api/lockers//status`
- Update status: `POST /api/lockers//status`
- **Activity logging**: `POST /api/lockers//activity`
- **Frontend dashboard**: lists all lockers, shows status, OTP, last activity; supports “Generate OTP” and “Open/Close” actions
- **ESP32 firmware**:
- On boot, fetches & prints OTP to Serial, displays on LCD
- Allows on-keypad new-OTP fetch (`A`), OTP entry (`0–9` + `#`) with timeout/clear (`*`)
- Verifies via `/verify-otp`, drives servo & buzzer, reports open/closed via `/status`
---
## Prerequisites
- **Hardware**: ESP32 + servo + 4×4 keypad + I²C LCD + buzzer
- **Software**:
- Python 3.8+ & pip
- Node.js & npm
- Arduino IDE / PlatformIO for ESP32
- SQLite (for local dev) or PostgreSQL in production
---
## Backend Setup
1. **Install dependencies**
```bash
pip install flask flask-sqlalchemy flask-cors