← All projects
ElectronExpress 5 (Clustered)TypeScriptMongoDB + MongooseSharpFFmpegTensorFlow BodyPix 2025+

Selfie Time Kiosk Server

Hybrid Electron edge backend and local Express cluster running directly on physical photo booth machines.

Overview

The Selfie Time Kiosk Server is a local desktop application packaged with Electron, deployed directly on physical kiosk PCs inside malls. It serves as a high-availability local server, handling media assets, layout processing, offline transactions, and hardware communication for the tablet clients.

As the lead developer, I engineered the transition from a legacy Meteor.js platform to a clustered Express 5 architecture with TypeScript. This design leverages local hardware cores, limits memory bloat, and guarantees continuous kiosk uptime even during unstable internet connections.

Key Features

Clustered Local API Gateway

  • Clustered Express 5 architecture running on Node.js cluster mode, utilizing multi-core processors to handle multiple concurrent tablet API requests.
  • Local MongoDB + Mongoose caching layer enabling offline-first operations, caching settings, screensavers, and syncing transactions back to the cloud on reconnection.
  • Robust database connection pooling, auto-reconnection triggers, and HTTP socket-reaper protocols to prevent stalled client requests.

Deep-Learning Auto-Crop & Caching

  • Integrates TensorFlow **BodyPix** for automated head/shoulder detection and photo auto-cropping.
  • Implemented local model caching (serving model assets from the user data directory) to guarantee auto-crop features work 100% offline without querying external CDNs.
  • Engineered pre-execution image verification (magic byte checks) before handing buffers to the C++ libvips (via Sharp) pipeline, eliminating native process crashes (SIGABRT/SIGSEGV) caused by corrupt image files.

Media Processing Pipeline

  • High-performance image manipulation (watermarking, resizing, color correction) using Sharp with custom rate limiters and memory guards.
  • Automated video composting and MP4 processing using FFmpeg for generating user video summaries.
  • Asynchronous job queuing for image uploads to cloud storage (S3/DigitalOcean Spaces) with background retry fallback.

Observability & Security

  • Full OpenAPI/Swagger route documentation for development checks and tablet client compatibility.
  • Strict input verification using **Zod** schema contracts for all Express router entries.
  • Local Prometheus metrics server monitoring endpoint latencies, cluster health, and hardware metrics.

Role

Fullstack Developer. Designed and developed the Electron window wrapper, clustered Express API routes, offline database caching architecture, the BodyPix auto-crop cache service, and memory safety guards for the image pipelines.