Web · PWARole: Full Stack
Production · PrivateCentral CCTV
Web system for logbooks, camera rounds and shift handovers in private security.
43test suites (API + Playwright)
Private client system; architecture walkthrough and mock-data demo available.
Problem
Shift logs, camera checks and handovers were tracked on paper and spreadsheets: auditing incidents was slow, and internet drops stalled logging.
Key decisions
- Duplicate-safe offline queue
- Each queued event carries a unique key in IndexedDB, so flaky reconnections never create duplicate log entries.
- Input validation and shift-level roles
- Zod validates every request payload upfront, and role checks separate operator actions from supervisor approvals.
- 43 test suites and 15-minute backups
- API, concurrency and Playwright UI tests catch regressions before updates reach operators.
What I built
- Combined photo logbooks, camera rounds and shift handovers into one PWA with per-operator audit history.
- Built the Express 5 API with Prisma and SQLite, Zod input validation, JWT sessions, role permissions and rate limiting.
- Added an IndexedDB offline queue that saves events during outages and syncs them without duplicates once back online.
- Set up automated 15-minute database backups with integrity checks and 43 automated test suites in Docker.
Architecture flow
- 01Shift PWA: records photo logbooks, camera rounds and shift handovers.
- 02IndexedDB local queue: stores each event with a unique key during internet drops.
- 03Express 5 API + Zod: validates input, enforces role permissions and prevents duplicates on sync.
- 04SQLite with Prisma: automated 15-minute backups and 43 test suites in Docker.
Duplicate-safe offline queue
Result
Replaced paper logs on shift, keeps working through internet drops and leaves a clear audit trail per operator.
- React 19
- Node.js
- Express
- Prisma
- SQLite
- Zod
- Docker
- Playwright
- PWA
- IndexedDB
- TanStack Query
- Zustand
- Vite