Votecast demonstration

Votecast

2026

A fault-tolerant, real-time polling system where votes are never lost. Built with an event-driven architecture using Apache Kafka for durable vote queuing, PostgreSQL for persistence, and WebSockets for live result updates.

Key Milestones & Technical Implementation

  • Architected an event-driven vote pipeline where each vote is published to a Kafka topic, consumed by a Node.js worker, and persisted to PostgreSQL — ensuring zero vote loss even under server failure.
  • Implemented idempotent vote processing using producer-stamped UUIDs and a unique constraint in Postgres, preventing duplicate votes from Kafka's at-least-once delivery.
  • Built a WebSocket broadcast layer that pushes live vote counts to all connected clients within ~50ms of a vote being committed, with per-poll room management to avoid unnecessary broadcasts.
  • Containerised the full infrastructure — Kafka, Zookeeper, and PostgreSQL — using Docker Compose with health checks and ordered startup dependencies for a one-command dev environment.

Technologies & Tools Used

Node.jsTypeScriptKafkaZookeeperPostgreSQLPrismaWebSocketsDocker