977: We built a CSS Challenge platform
Episode
41 min
Read time
2 min
Topics
Software Development, Science & Discovery, Economics & Policy
AI-Generated Summary
Key Takeaways
- ✓Real-time sync architecture: ZeroSync provides instant data synchronization by storing data locally in IndexedDB, sending only patch messages for updates via WebSocket to a sync server, then replicating to Postgres. This architecture eliminates polling and makes all changes appear instantly across all connected clients without full data transfers, achieving meteor-like reactivity.
- ✓Local development workflow: The platform uses the File System Access API to let competitors code in their own editors with familiar shortcuts and autocomplete rather than browser text boxes. Changes save directly from VS Code to the local file system, triggering mutations that sync in real-time, making the development experience as fast as using Vite locally.
- ✓Custom diffing algorithm: After testing six to seven approaches including vectorization and SSIM, they built a multi-threshold algorithm using SnapDOM to convert HTML to canvas images. The system punches out background colors, weights opacity differences less heavily, and uses color-coded diff visualization where red indicates significant pixel differences requiring attention versus minor green and blue variations.
- ✓Security sandboxing: Iframes with sandbox attributes combined with Content Security Policy headers prevent malicious code execution while allowing Tailwind CSS CDN. The CSP restricts inline JavaScript and limits script loading to one specific Tailwind URL, solving the problem of competitors potentially injecting scripts that would execute on other participants' machines during battles.
- ✓Auth and permissions refactor: ZeroSync 2.5 moved from handling auth in the sync server schema to standard API routes in the main application. This change allows developers to use existing authentication middleware and pass user context to ZeroSync, making it easier to incrementally adopt the sync engine in existing applications with established auth systems.
What It Covers
Scott Tolinski and Wes Bos built a custom CSS coding battle platform from scratch in two weeks for their March Madness-style tournament featuring 14 top CSS engineers. They detail the technical stack using SvelteKit, ZeroSync for real-time synchronization, local file system access, and a custom pixel-diffing algorithm to objectively score CSS recreations.
Key Questions Answered
- •Real-time sync architecture: ZeroSync provides instant data synchronization by storing data locally in IndexedDB, sending only patch messages for updates via WebSocket to a sync server, then replicating to Postgres. This architecture eliminates polling and makes all changes appear instantly across all connected clients without full data transfers, achieving meteor-like reactivity.
- •Local development workflow: The platform uses the File System Access API to let competitors code in their own editors with familiar shortcuts and autocomplete rather than browser text boxes. Changes save directly from VS Code to the local file system, triggering mutations that sync in real-time, making the development experience as fast as using Vite locally.
- •Custom diffing algorithm: After testing six to seven approaches including vectorization and SSIM, they built a multi-threshold algorithm using SnapDOM to convert HTML to canvas images. The system punches out background colors, weights opacity differences less heavily, and uses color-coded diff visualization where red indicates significant pixel differences requiring attention versus minor green and blue variations.
- •Security sandboxing: Iframes with sandbox attributes combined with Content Security Policy headers prevent malicious code execution while allowing Tailwind CSS CDN. The CSP restricts inline JavaScript and limits script loading to one specific Tailwind URL, solving the problem of competitors potentially injecting scripts that would execute on other participants' machines during battles.
- •Auth and permissions refactor: ZeroSync 2.5 moved from handling auth in the sync server schema to standard API routes in the main application. This change allows developers to use existing authentication middleware and pass user context to ZeroSync, making it easier to incrementally adopt the sync engine in existing applications with established auth systems.
Notable Moment
The team discovered a critical authorization bug hours before launch when the sync engine randomly disconnected users. After combing through logs and Sentry reports, CJ identified that the JWT token expired after fifteen minutes while the cookie lasted longer, causing mid-battle disconnections. They fixed it by extending the JWT expiration rather than rebuilding the sync client instance.
You just read a 3-minute summary of a 38-minute episode.
Get Syntax summarized like this every Monday — plus up to 2 more podcasts, free.
Pick Your Podcasts — FreeKeep Reading
More from Syntax
1011: tmux + Terminal Maxxing with Ben Vinegar
Jun 8 · 65 min
a16z Podcast
Rethinking Git for the Age of Coding Agents with GitHub Cofounder Scott Chacon
Apr 20
More from Syntax
1010: No one cares anymore?
Jun 3 · 56 min
Venture Stories
Recall Sessions: How Moveworks Went From First Customer to $2.85B with Bhavin Shah
Mar 11
Books, tools, and gear mentioned in this episode
SignalCast may earn commission on purchases via these links. As an Amazon Associate, SignalCast earns from qualifying purchases.
Tools
“The platform uses the File System Access API to let competitors code in their own editors with familiar shortcuts and autocomplete”
“they built a multi-threshold algorithm using SnapDOM to convert HTML to canvas images”
“Iframes with sandbox attributes combined with Content Security Policy headers prevent malicious code execution while allowing Tailwind CSS CDN”
“ZeroSync provides instant data synchronization by storing data locally in IndexedDB, sending only patch messages for updates via WebSocket to a sync server, then replicating to Postgres.”
“After combing through logs and Sentry reports, CJ identified that the JWT token expired”
“They detail the technical stack using SvelteKit, ZeroSync for real-time synchronization, local file system access, and a custom pixel-diffing algorithm”
“sending only patch messages for updates via WebSocket to a sync server, then replicating to Postgres”
“making the development experience as fast as using Vite locally”
More from Syntax
We summarize every new episode. Want them in your inbox?
1011: tmux + Terminal Maxxing with Ben Vinegar
1010: No one cares anymore?
1009: 54% AI-Generated and Climbing — State of AI
Diffs, Trees, and VS Code 2.0
1007: 8 Tech Choices to Lock In Before Agentmaxxing
Similar Episodes
Related episodes from other podcasts
a16z Podcast
Apr 20
Rethinking Git for the Age of Coding Agents with GitHub Cofounder Scott Chacon
Venture Stories
Mar 11
Recall Sessions: How Moveworks Went From First Customer to $2.85B with Bhavin Shah
Venture Stories
Feb 23
Recall Sessions: Itai Damti on Embedded Finance and the Art of Getting Your First Customer
No Priors: Artificial Intelligence | Technology | Startups
Jan 22
No Priors Live: Building Durable Software in the AI Age with MongoDB President & CEO CJ Desai
The AI Breakdown
Jan 10
Building a Personal AI Model Map [AI Operators Bonus Episode]
Explore Related Topics
This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.
Read this week's Software Engineering Podcast Insights — cross-podcast analysis updated weekly.
You're clearly into Syntax.
Every Monday, we deliver AI summaries of the latest episodes from Syntax and 192+ other podcasts. Free for up to 3 shows.
Start My Monday DigestNo credit card · Unsubscribe anytime