Multi-Office Attendance Sync for DGHS
Live
  • Full-Stack Developer
  • API Solutions Ltd.
  • Web, 2026
  • Next.js, TypeScript, React, FastAPI, PostgreSQL, Dahua NetSDK, APScheduler, JWT, Tailwind CSS, Zod
  • Web
  • Access Control
  • GovTech
  • Next.js
  • TypeScript
  • FastAPI
  • PostgreSQL
  • Dahua NetSDK
SmartGate is a multi-tenant platform for managing Dahua face-scan access controllers across DGHS offices. Operators enroll persons, pull attendance from devices, and push records and faces to the government MIS — with platform and office portals, scheduled jobs, tenant-scoped RBAC, and an optional attendance module (shifts, leave, and reports) when the client needs it.

Objective

I built SmartGate so DGHS offices running Dahua face terminals could manage people and devices from one place and deliver attendance reliably to the government MIS. The work covered multi-office tenant isolation, dual operator audiences, long-running device jobs (including auto-register devices that dial in), and incremental MIS sync that can resume safely.

In production

SmartGate is live across government hospitals and upazilla health complexes in Bangladesh.

  • Dhaka Medical College Hospital — 10+ devices, 4,000+ staff (doctors, nurses, and other roles)
  • Sir Salimullah Medical College Hospital
  • Many upazilla health complexes nationwide

Day-to-day that means high-volume person records, face photos, and attendance logs flowing through devices and into DGHS MIS.

Tasks I have done

  • Domain modeling and multi-app architecture from the client brief (FastAPI API + Platform + Dashboard)
  • Full-stack development of the platform console (all offices) and office dashboard (single-office scope)
  • FastAPI backend with JWT auth, BFF httpOnly cookies, computed RBAC, and server-side tenant isolation
  • Dahua NetSDK integration for TCP and auto-register device modes
  • Person enrollment, face photos, bulk CSV enroll, device-to-device migration, and MoHFW HRIS lookup
  • Optional office attendance module: daily register, shifts, leave, exceptions/corrections, and reports
  • Background jobs and APScheduler for export, migrate, and incremental DGHS MIS push (logs + faces)
  • Production deployment on Ubuntu (systemd API, PM2 Next.js apps, Nginx + HTTPS)

Live demos

Features

  • Multi-office / multi-device registry for Dahua ASI face controllers
  • Dual-audience auth: platform operators vs office users, with office-scoped isolation
  • Person enroll, face capture, bulk CSV enroll, and device-to-device migration
  • MoHFW Central HRIS provider lookup and enroll onto devices
  • Live device attendance pull and incremental push of records + faces to DGHS MIS
  • Optional attendance module for offices that need it: daily attendance (present / late / absent / on leave), shift assignment, leave tracking, exceptions and corrections, plus daily/monthly and late/early reports
  • Scheduled sync across enabled devices on active offices
  • Background jobs with progress states, including parked waiting_device work for auto-register terminals
  • TCP dial-out and auto-register dial-in connection modes

Architecture

Platform Console Office Dashboard FastAPI PostgreSQL Dahua Devices DGHS MIS (all offices) (one office) JWT · NetSDK (offices, jobs) (TCP / auto-reg) (+ HRIS)

Sync pipeline: FastAPI is the security boundary. Frontends are BFF + UI only. Jobs pull attendance from Dahua ASI devices, attach faces, push multipart payloads to DGHS MIS, and advance per-device resume state for incremental sync.