Personal PIN
Each user gets a unique code — not a shared gym PIN. Wrong attempts lock the pad. Company Admin can rotate a PIN without touching hardware.
One cloud platform for every door that matters: office buildings, gym floors, cafe staff rooms, and lifts. People unlock with a personal PIN, NFC tap, or phone — and Super Admin plus Company Admin watch it live.
The product is a React console for three roles, a Go backend, and MQTT from a hardware door controller on ESP32 / ESP32-S3. Each opening is a kit: ESP32 panel, PN532 or Wiegand reader, lock, contact, and request-to-exit. That board publishes unlocks, denials, and door state — Super Admin does not poll the pad.
Facility teams were running building lobbies, gym gates, cafe staff doors, and lift floors as separate systems. Physical keys sat in a drawer. One PIN was written on a sticky note behind the espresso machine. Gym members shared the same four-digit code. When someone left the company, nobody knew which doors they could still open.
Every method still checks schedule, zone, and role in the Go policy engine. The React apps only show what that role is allowed to do.
Each user gets a unique code — not a shared gym PIN. Wrong attempts lock the pad. Company Admin can rotate a PIN without touching hardware.
Tap the reader for contactless entry at lobby, gym, cafe, or lift. The event still appears on Super Admin and Company Admin live feeds.
The user panel lists only assigned doors. One tap unlocks if they are in range, or they walk to the pad and enter PIN for cafe staff rooms.
The MQTT client is an ESP32-S3 (or ESP32-WROOM-32 on two-door cafe staff rooms). Field devices hang off that board. Readers and locks do not talk to the cloud on their own.
Espressif ESP32-S3 (Wi-Fi + BLE) as the 2/4-door panel in the comms closet. GPIO relays for the lock, Wiegand/OSDP from the reader, TLS MQTT client that publishes every event. Cafe two-door sites use ESP32-WROOM-32.
ESP32-S3 · ESP32-WROOM-32NXP PN532 (13.56 MHz NFC / phone tap) on the unsecure side, plus a 125 kHz Wiegand RFID reader for badges. The ESP32 only receives the UID — it does not open the lock until Go (or local cache) says yes.
PN532 · Wiegand 26-bitMembrane 4×4 keypad on cafe staff doors and after-hours gym gates, read by the ESP32 GPIO. Wrong PINs lock the pad; the ESP32 still publishes the denial on MQTT.
4×4 keypadFail-secure 12V electric strike on office doors; 12V electromagnetic lock on glass gym and lobby leaves. An opto-isolated relay on the ESP32 is what actually unlocks — not the phone app.
12V lock · relayMC-38 magnetic reed on the frame, wired into ESP32 GPIO. Closed vs held-open vs forced. Super Admin alerts are from this sensor, not from a camera guess.
MC-38 DPSHC-SR501 PIR or a push-to-exit button on the secure side so people can leave without a PIN. ESP32 publishes REX so a free exit is not logged as a forced door.
12V for maglock and strike, 5V for the ESP32. On mains loss the ESP32 publishes POWER_FAIL and stays up on a small backup long enough to keep the gym gate honest.
My Doors unlock is not a Bluetooth lock. The phone hits the Go API; Go publishes a command the ESP32 subscribes to, then the same relay the PIN pad uses fires. The ESP32 still publishes the event.
ESP32 /cmdThe same IoT reader firmware is installed in four environments. Policy — not hardware — decides who can open which door and when.
Building
Main glass entrance, tenant floors, and server rooms. Staff PIN or badge for office hours. Visitors get a time-boxed lobby code from Company Admin. Super Admin sees every building’s reader health on one map.
Gym
Members unlock during paid hours only. Trainers keep after-hours access. When a membership expires, the user door list drops Gym Floor 2 immediately — no more shared four-digit code on the glass.
Cafe
Public cafe stays open. The staff door next to the bar uses PIN so only rostered baristas open stock and cash rooms. Company Admin assigns shift windows; failed PINs show as alerts on the live feed.
Lift
The reader beside the lift bank only enables the floors on that person’s door list. Executive floors stay hidden. Every call is logged with user, time, and destination for Super Admin audits.
Switch roles. Super Admin watches the whole estate. Company Admin runs one business. Users only see the doors they can open.
This is the control tower. Super Admin onboards companies, sees every ESP32 hardware door controller (building, gym, cafe, lift), and can emergency-lock a site. They do not manage a single employee’s gym hours — that stays with Company Admin.
React dashboard · MQTT from ESP32-S3 · Go event stream.
| Time | Zone | Event | Status |
|---|---|---|---|
| 10:24:31 | Gym | CTRL-04 PUB ACCESS_GRANTED | Granted |
| 10:24:18 | Cafe | CTRL-09 PUB DPS closed | OK |
| 10:23:47 | Lift | CTRL-02 PUB REX | Exit |
| 10:22:30 | Building | CTRL-12 PUB ACCESS_DENIED | Denied |
Day-to-day operators for one business. They assign staff to Building + Lift, members to Gym, baristas to Cafe staff door, and watch who entered in the last hour. They never see another company’s data.
If a PIN is shared, revoke it here. User door list updates instantly.
| Person | Zone | Method | Status |
|---|---|---|---|
| Asha Rao | Lobby + Lift 12–18 | App | Active |
| Mark Kim | Gym 06:00–22:00 | PIN | Active |
| Nora Lee | Cafe staff | PIN | Shift |
| Visitor · NL | Lobby only | PIN | Expires 18:00 |
Users never see other companies or global health. They open the app and get a clear list: which doors they can use, whether the reader is online, and whether this door needs an in-app unlock or a PIN at the pad.
Good morning, Asha
5 doors assigned to you
User enters PIN on the pad, taps NFC, or taps Unlock on their door list while standing at the reader.
The ESP32-S3 hardware door controller publishes the PIN, NFC UID, or app command over MQTT. Go checks identity, zone, schedule, and whether the code is still valid.
The ESP32 fires the 12V strike or maglock, or enables the lift floor. The pad shows Access Granted.
The same event appears on Super Admin and Company Admin live feeds, and in the user’s history.
Each ESP32-S3 (or ESP32-WROOM-32) is a client on the broker. It publishes door events and health. It subscribes only for commands (unlock, lock, schedule sync). Consoles never talk to the maglock directly.
access/{site}/{ctrl}/eventGranted, denied, REX, forced, held-openaccess/{site}/{ctrl}/healthOnline, tamper, power, batteryaccess/{site}/{ctrl}/lockStrike/maglock state after a relay changeaccess/{site}/{ctrl}/dpsDoor contact: closed, open, heldaccess/{site}/{ctrl}/cmdUnlock, lock, PIN cache, firmwarePUB access/tower-a/ctrl-04/event qos 1
{
"ts": "2026-09-19T10:24:31Z",
"hw": "ESP32-S3",
"controllerId": "CTRL-04",
"doorId": "gym-front",
"event": "ACCESS_GRANTED",
"method": "PIN",
"userId": "u_asha",
"lock": "UNLOCKED"
}
PUB access/tower-a/ctrl-04/dps qos 1
{ "hw": "ESP32-S3", "doorId": "gym-front", "sensor": "MC-38", "state": "OPEN" }
PUB access/tower-a/ctrl-12/event qos 1
{
"ts": "2026-09-19T10:22:30Z",
"hw": "ESP32-WROOM-32",
"controllerId": "CTRL-12",
"doorId": "lobby",
"event": "ACCESS_DENIED",
"method": "PIN",
"reason": "UNKNOWN_PIN"
}
PUB access/tower-a/ctrl-04/health qos 0 retained
{ "hw": "ESP32-S3", "online": true, "tamper": false, "mains": true }
Super Admin, Company Admin, and the user door list are React applications. The Go API owns authentication, PIN hashing, policy, and /cmd unlocks. Field hardware is named: ESP32-S3 / ESP32-WROOM-32 as the hardware door controller, PN532 NFC, Wiegand RFID, 4×4 PIN keypad, 12V maglock or strike, MC-38 door contact, and HC-SR501 REX.
The ESP32 publishes events even if nobody has the app open. When Company Admin opens live monitoring, the feed is already on the broker.
Live dashboards subscribe to controller topics. Super Admin and Company Admin never poll the pad.
Policy engine, PIN lifecycle, and MQTT commands back to the controller relay.
ACCESS_GRANTED, ACCESS_DENIED, REX, DOOR_FORCED, DPS, health. Broker fans those out to the live boards.
ESP32-S3 / ESP32-WROOM-32 · PN532 · Wiegand RFID · 4×4 keypad · 12V maglock · MC-38 · HC-SR501 — building, gym, cafe, and lift.
Cafe and gym codes stopped being shared. Each person has a PIN Company Admin can rotate without a site visit.
Super Admin and Company Admin see unlocks as they happen — including failed PIN attempts on staff doors.
The My Doors list ended reception guesswork. If Gym is not on the list, the gate will not open.
We map Super Admin monitoring, Company Admin PIN and people ops, a user door list, and an ESP32-S3 hardware door controller (MQTT publish) onto a React and Go platform your teams can run.