Access Control Console for Dahua Devices
Live
  • Full-Stack Developer
  • API Solutions Ltd.
  • Web, 2026
  • Next.js, TypeScript, React, Express, PostgreSQL, Drizzle ORM, Redis, BullMQ, Tailwind CSS, Zod
  • Web
  • Access Control
  • Next.js
  • TypeScript
  • Express
  • PostgreSQL
  • Redis
  • BullMQ
Gatewise is an intelligent access and identity console for Dahua face and door controllers. Operators manage a central person registry and person groups; background jobs sync cards and faces to the right devices with queued imports, migration safety, and RBAC.

Objective

Build a central operator console for Dahua face and access controllers so people are enrolled once, assigned through person groups, and synchronized to the right devices asynchronously — without typing the same person into every terminal.

Tasks I have done

  • Full-stack product: Next.js operator console, Express REST API, and BullMQ device worker
  • Central person registry with person groups and many-to-many group ↔ device mapping
  • Desired-state reconciliation (ENSURE / REMOVE) with per-device sync rows and generation guards
  • Dahua CGI adapter — digest auth, concurrency limits, RecNo capture, face enroll, and query encoding quirks
  • Queued bulk import (Excel/CSV → zip), dry-run, per-row reports, and face photo normalization
  • Migration cutover with conflict review, removal dry-run, and safe removals gating
  • JWT/RBAC operator auth, encrypted device credentials, audit trail, and factory-reset lifecycle controls
  • In-app Help / user manual for operators

Features

  • Central persons, person groups, and device registration for Dahua ASI-series controllers
  • Background sync via BullMQ — create, update, remove, and face enroll with progress and cancel
  • Bulk onboarding from Excel/CSV with dry-run validation and face enrolment
  • Migration tools for multi-device cutover, attribute conflicts, and deferred removals
  • Operator RBAC, audit logging, and destructive reset flows with challenge confirmation
  • BFF proxy so the browser talks only to Next.js; scripts call the API with an API key

Architecture

Next.js Console Express API PostgreSQL Redis · BullMQ Dahua Devices BFF · JWT session REST · RBAC · adapter source of truth async device jobs Digest CGI

Operators manage the desired state in PostgreSQL. The worker pushes that state to Dahua controllers through a throttled Digest CGI client — card first, face enroll separately, with RecNo stored for safe deletes.