Pollmodoro is a blazing-fast, open-source polling platform built with SvelteKit and CloudFlare Workers. While still in early development, you can try it out at pollmodoro.com.
Pollmodoro leverages CloudFlare's edge computing infrastructure to deliver a fast, globally distributed polling platform:
Request Routing: When a user creates a poll, their browser sends a tRPC request to a CloudFlare Worker deployed at CloudFlare's global edge network.
Geographic Distribution: CloudFlare automatically routes the request to the geographically closest data center, minimizing latency and ensuring optimal performance worldwide.
Durable Object Creation: The Worker generates a unique poll ID using nanoid and creates a CloudFlare Durable Object instance with that ID as its globally unique identifier.
Stateful Storage: Each Durable Object contains:
Real-Time Updates: The Durable Object maintains WebSocket connections for real-time vote updates, broadcasting results to all connected clients instantly.
Global Coordination: Since each poll has a globally unique Durable Object identifier, users worldwide can vote on the same poll while maintaining data consistency and coordination.
Location Optimization: Each Durable Object is created in the CloudFlare data center closest to the poll creator. This design assumes that the poll creator is typically located near most potential voters, optimizing for the common use case.
Cross-Region Trade-offs: If voters are geographically distant from the poll creator (e.g., creator in USA, voters in Brazil), those voters will experience higher latency since all requests must travel to the Durable Object's fixed location. This is a fundamental trade-off of the single-object-per-poll architecture that ensures strong consistency.
Install dependencies
# Backend
cd backend
npm install
# Frontend
cd ../frontend
npm install
Configure Wrangler CLI
npx wrangler login
Start the backend (CloudFlare Worker)
cd backend
npm run dev
The backend will run on http://localhost:8787
Start the frontend (SvelteKit)
cd frontend
npm run dev
The frontend will run on http://localhost:5173