YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Voltix Home
Smart-home automation with face-recognition gate access, MQTT device control, ESP32 firmware, and a real-time Next.js dashboard.
This repository is private. It contains biometric data (face embeddings and
camera snapshots of identifiable people) and device firmware. Access is
restricted to invited team members. Do not make it public β see SECURITY.md.
Stack
| Layer | Technology |
|---|---|
| Dashboard / API | Next.js (App Router), TypeScript, Socket.io |
| Realtime bus | Aedes MQTT broker (embedded, port 1884) |
| Database | PostgreSQL + Prisma |
| Vision service | Python, FastAPI, OpenCV, ONNX Runtime |
| Face recognition | SFace (ONNX) + YuNet detection |
| Anti-spoof | MiniFASNet deepfake detector |
| Firmware | ESP32-CAM (gate), ESP32 8-relay, ESP32 gas sensor |
Architecture
βββββββββββββββββββ HTTP POST /frame ββββββββββββββββββββββββββββββββ
β ESP32-CAM β βββββββββββββββββββββΆ β Next.js Server (Node) β
β Gate + Stream β βββββββββββββββββββββ β ββ API Routes (REST) β
βββββββββββββββββββ {authorized, name} β ββ Socket.io Gateway β
β ββ Aedes MQTT Broker :1884 β
βββββββββββββββββββ β ββ Face Engine Bridge β
β ESP32 8-Relay β βββββMQTTβββΆββββββββββΆβ β (Python face-recognitionβ
β x8 Appliances β voltix/devices/# β β microservice :8000) β
βββββββββββββββββββ β ββ Prisma β PostgreSQL β
β² physical buttons ββββββββββββ¬ββββββββββββββββββββ
β WebSocket (<100ms)
ββββββββΌβββββββ
β Dashboard β
β Next.js App β
βββββββββββββββ
Repository layout
voltix-home/
βββ voltixhome-main/ # the application
β βββ app/ # Next.js App Router pages + API routes
β β βββ api/ # REST: accesslogs, appliances, cam, gate, internal/
β βββ components/ # Dashboard UI (GatePanel, ApplianceGrid, StatsRow)
β βββ lib/ # prisma, auth, env, mqtt-handlers, face-bridge
β βββ hooks/ # useVoltixSocket β realtime client
β βββ prisma/ # schema.prisma, migrations, seed
β βββ services/vision/ # FastAPI face recognition microservice
β βββ engine/ # Face engine library + ONNX models
β β βββ src/ # face_engine.py, anti_spoof.py, gate_controller.py
β β βββ models/ # sface_2021dec.onnx, face_detection_yunet_2023mar.onnx
β β βββ database/ # embeddings.pkl β BIOMETRIC, do not redistribute
β βββ firmware/ # ESP32 sketches (Arduino/C++)
β β βββ esp32cam_gate/ # gate camera + MJPEG stream
β β βββ VoltixGateCam/ # gate camera (alt sketch)
β β βββ esp32_relay8/ # 8-channel relay board
β β βββ VoltixRelayGas/ # relay + gas sensor variant
β β βββ esp32_gas_sensor/ # standalone gas/sensor node
β β βββ CamTest/ # minimal camera bring-up test
β βββ public/
β β βββ images/ # product renders
β β βββ fonts/ # self-hosted webfonts
β β βββ snapshots/ # ACCESS SNAPSHOTS β contains identifiable faces
β βββ docs (root) # SYNOPSIS, FLASH-GUIDE, audit
β βββ new_degign/ # static Woblo export used as design reference
βββ firmware/.gitignore # keeps secrets.local.h out of git
βββ LICENSE # MIT
βββ SECURITY.md # threat model, known limitations, secret policy
βββ CONTRIBUTING.md # branch/commit/PR conventions
βββ .gitattributes # Git LFS rules for binaries, models, images
βββ .gitignore
Quick start
npm --prefix voltixhome-main install
cp voltixhome-main/.env.example voltixhome-main/.env
# edit .env: DATABASE_URL, VOLTIX_DEVICE_KEY, ADMIN_EMAIL, ADMIN_PASSWORD
npx --prefix voltixhome-main prisma migrate deploy
npx --prefix voltixhome-main prisma db seed
Run the three services in separate terminals:
npm --prefix voltixhome-main run dev # dashboard + MQTT broker :3000
pip install -r voltixhome-main/services/vision/requirements.txt
npm --prefix voltixhome-main run vision # face engine :8000
Windows convenience wrappers live at the repo root: start-voltix-dashboard.bat,
start-voltix-everywhere.bat, start-face-gate.bat, start-enroll.bat.
Firmware setup: edit voltixhome-main/firmware/<sketch>/secrets.h with your
Wi-Fi SSID/password, PC LAN IP, and the device key (must match
VOLTIX_DEVICE_KEY in .env), then flash from the Arduino IDE. See
voltixhome-main/FLASH-GUIDE.md.
MQTT protocol
| Topic | Direction | Payload |
|---|---|---|
voltix/devices/{deviceId}/set |
Broker β Device | {"state":"ON","key":"SECRET"} |
voltix/devices/{deviceId}/state |
Device β Broker | {"deviceId":"RELAY-01","relay":3,"state":"ON","rssi":-52} |
voltix/devices/{deviceId}/online |
LWT | {"online":true} |
voltix/gate/authorize |
Backend β Gate | {"decision":"GRANTED","person":"Alice","confidence":0.93} |
voltix/gate/set |
Dashboard β Relay | {"state":"OPEN"} |
Latency profile
- ESP32 β broker: ~5 ms on LAN
- Broker β Socket.io fan-out: ~2 ms
- UI toggle: optimistic, instant
- Device confirmation via retained state echo: ~30β80 ms
Documentation
voltixhome-main/README.mdβ full technical readme, deployment checklistvoltixhome-main/FLASH-GUIDE.mdβ firmware flashing walkthroughvoltixhome-main/SYNOPSIS_VOLTIX_HOME.md/SOFTWARE_SYNOPSIS_VOLTIX.mdβ project synopsisvoltixhome-main/SYNOPSIS-AUDIT.mdβ code audit notesSECURITY.mdβ threat model and known limitations (read before deploying)CONTRIBUTING.mdβ how to branch, commit, and open a PR
License
MIT β see LICENSE.
Third-party model weights (SFace, YuNet, MiniFASNet) remain under their own
upstream licences; see THIRD_PARTY_LICENSES.md.