A minimal web application that allows many clients to sync to a relative time with advanced features
584
A real-time, high-precision collaborative timing application. Create or join a shared room to track time together across different timezones.
Version: 1.2.1-p
requestAnimationFrame for a smooth, lag-free experience.├── backend/
│ ├── server.js # Express Server (API + Static Serving)
│ ├── package.json # Project configuration
│ └── package-lock.json
├── index.html # Landing page (Create/Join)
├── room.html # Dynamic room view
├── script.js # Core frontend logic
└── style.css # Modern dark-mode styling
Navigate to the backend directory, install dependencies, and start the server:
cd backend
npm install
npm start
Open your browser to http://localhost:3000.
The backend (Express) serves the frontend static files automatically, so there is no need to run a separate frontend server.
You can run the application instantly using the pre-built Docker image:
docker run -p 3000:3000 maskedmatters/timesync:v1.2.1-p
The app will be available at http://localhost:3000.
The app uses Server-Sent Events (SSE). When a client joins a room, it establishes a persistent connection to /events. The server pushes updates whenever:
close event on the SSE stream).timer-update).Unlike standard timers that use setInterval(..., 1000), Time Room uses requestAnimationFrame. This allows the stopwatch to render milliseconds smoothly and ensures the clocks are always accurate to the system time without "drifting."
By using URL parameters (?code=ROOM_ID&name=USER_NAME), the application is completely stateless on the client's side. Refreshing the page simply re-joins the session using the data in the URL.
Content type
Image
Digest
sha256:c92f39285…
Size
69.7 MB
Last updated
4 months ago
docker pull maskedmatters/timesync