Inspiration
The best daily games on Reddit combine three things: rules you understand in 5 seconds, an "aha!" deduction moment under 60 seconds, and a spoiler-free result artifact you immediately want to drop into the comments. We wanted to bring the tactile satisfaction of optical drafting benches and laser-prism puzzles natively inside a Reddit post.
What it does
- Same Daily Bench Worldwide: Every UTC day (
00:00 UTC), a Devvit Scheduler task publishes a new interactive optical bench with a unique issue number (#335,#336, ...) and verified exact Par (3–5 mirrors). - Dichroic Prisms & Translucent Crystals: Route the beam around obsidian walls using
/and\mirrors, split beams 90° through dichroic prisms, and chain through translucent crystals. - Anti-Cheat Server Verification + Redis Board: Completions are re-traced server-side before updating the subreddit leaderboard, daily percentile (
Top X%), and user streak. - One-Click Spoiler-Free Comment Grid: Players post their optical path card straight into the Reddit thread comments—showing lit crystals, mirrors used, time, and streak without revealing
/vs\mirror angles.
How we built it
- Frontend: React 19 + TypeScript + Vite (
dist/client) with custom inline SVG raytracing, zero-dependency Web Audio tactile feedback, and dual Light Archival Paper / Optical Darkroom themes. - Optical Engine: Deterministic seeded generator + exact iterative-deepening solver (
src/shared/engine.ts), verified by Vitest across 365 consecutive daily puzzles (100%solvable, exact minimum Par, zero infinite-loop hangs). - Backend: Devvit Web (
devvit.jsonv1 schema) Express server (src/server/index.ts) bundled with@devvit/web/server, integrated with Redis leaderboards, user streaks,reddit.submitComment(), moderator menu post creation, and automated0 0 * * *daily posting.
Challenges we ran into
- Ensuring every deterministic UTC daily board has an exact, minimal Par solution without infinite mirror-reflection loops or trivial 1-mirror shortcuts. We wrote a 365-day Vitest verification harness proving 100% solvability across an entire calendar year.
- Complying with Devvit Web's strict Content Security Policy (zero inline scripts) while preserving instant theme detection and responsive mobile layout (
390x844) inside Reddit'stallcustom post container.
Accomplishments that we're proud of
- 100% deterministic 365-day puzzle generator verified by automated Vitest suite (
4/4tests passing). - Server-authoritative raytrace verification so Redis subreddit leaderboards and daily streaks cannot be spoofed client-side.
- Clean spoiler-free emoji trace card posted directly to Reddit comments via
reddit.submitComment().
What we learned
- Bundling
@devvit/web/servercleanly via esbuild CJS output and avoiding inline scripts inindex.htmlmakes Devvit Web Express apps deploy cleanly across Reddit's sandboxed webview runtime.
What's next for PRISM CIRCUIT
- Community-authored weekly challenge benches where Redditors submit their own prism boards via comment codes.
- Multi-color RGB wavelength filters and cooperative subreddit-wide milestone unlocks.
Built With
- devvit
- express.js
- react
- redis
- svg
- typescript
- vite
- web-audio