A daily.dev hackathon project. Put your daily.dev habits on the line, one spin at a time. It's built as a hub of "roulette" modes β the first (and currently only) mode is Bookmarks Roulette, with room to add more.
Your bookmarks pile up and rot β this forces a reckoning. One spin serves one bookmark: read it (spared) or pull the trigger (deleted forever). Funny, but it actually drains your backlog.
- Demo mode β runs entirely in the browser on a fake bookmark pile. No account, no token, no daily.dev Plus required. This is the headline experience and always works.
- Real mode β sign in with a daily.dev API token (Settings β API, requires Plus). The token is validated server-side and stored in an httpOnly cookie; every API call is proxied through Astro server routes, so the token never touches client JS and there are no CORS issues. Deletes hit the real
DELETE /bookmarks/{id}endpoint.
npm install
npm run dev # http://localhost:4321Targets Vercel out of the box (@astrojs/vercel, output: "server"). Push and import, or vercel. No env vars required (demo mode is fully client-side).
src/layouts/Layout.astroβ shared shell: global styles + header (avatar/name + sign out)src/pages/index.astroβ the hub: sign-in + the list of roulette modessrc/pages/roulette.astroβ Bookmarks Roulette game (demo via?demo=1, else requires login)src/pages/api/auth.tsβ sign in (validate token β set cookie) / sign outsrc/pages/api/bookmarks/*β server-side proxy: list (paginated) + deletesrc/lib/daily.tsβ daily.dev Public API client (server only): bookmarks + profilesrc/lib/auth.tsβ resolves the current user from the session cookiesrc/lib/session.tsβ httpOnly cookie sessionsrc/lib/mock.tsβ demo-mode fake bookmarks
daily.dev's Public API is REST + Bearer personal tokens (no OAuth), and requires Plus. Endpoints used: GET /bookmarks/ (cursor-paginated), DELETE /bookmarks/{id}, GET /profile/. Other resources exist (feeds, follows, tech stack) β candidates for future roulette modes. See spike/spike.mjs for a standalone API probe.

