ding ding ding: https://dm.chillidonut.com/
|
|
1 mēnesi atpakaļ | |
|---|---|---|
| client | 1 mēnesi atpakaļ | |
| docs | 1 mēnesi atpakaļ | |
| drizzle | 1 mēnesi atpakaļ | |
| public | 1 mēnesi atpakaļ | |
| scripts | 1 mēnesi atpakaļ | |
| src | 1 mēnesi atpakaļ | |
| tests | 1 mēnesi atpakaļ | |
| .dev.vars.example | 1 mēnesi atpakaļ | |
| .gitignore | 1 mēnesi atpakaļ | |
| .prettierignore | 1 mēnesi atpakaļ | |
| .prettierrc | 1 mēnesi atpakaļ | |
| README.md | 1 mēnesi atpakaļ | |
| drizzle.config.ts | 1 mēnesi atpakaļ | |
| package.json | 1 mēnesi atpakaļ | |
| pnpm-lock.yaml | 1 mēnesi atpakaļ | |
| tsconfig.json | 1 mēnesi atpakaļ | |
| wrangler.toml | 1 mēnesi atpakaļ |
Spec: docs/spec.md (exported from the Claude Doc, which is the editable source). Learnings: docs/blog/.
Hono + Better Auth (phone OTP + anonymous) + D1/Drizzle + one Durable Object per hand + Jev (TypeSafe System One) for live odds and the lever.
npm install
cp .dev.vars.example .dev.vars # then paste TYPESAFE_API_KEY + BETTER_AUTH_SECRET
npm run db:migrate:dev # local D1 (miniflare)
npm run dev # http://localhost:8787 — OTP codes print to this console
Open / on two phones on the same LAN (or wrangler dev --ip 0.0.0.0), "Jump in" with a name, create a hand, open /h/<id> on the other phone.
npm run dev — wrangler dev, local D1 + DO, hot reloadnpm run cf-typegen — regenerate worker-configuration.d.ts after editing wrangler.tomlnpm run auth:update then npm run db:generate — after changing Better Auth pluginsnpm run db:migrate:dev / :prodnpm run deploy — wrangler deploy (first time: wrangler d1 create pm2000-db, paste id into wrangler.toml, wrangler secret put TYPESAFE_API_KEY, wrangler secret put BETTER_AUTH_SECRET)npx wrangler versions upload gives a preview URL without touching prodsrc/hand.ts — the Hand DO: state, WebSocket fan-out, chips/veto/lock, debounced Jev odds, the lever (seeded sample), roundssrc/jev.ts — typed Jev clientsrc/dealer.ts — human-authored dealer line bank; Jev picks by tagsrc/auth/index.ts — phone OTP (console in dev, Twilio when OTP_MODE=twilio) + anonymouspublic/index.html — mobile client: felt table, chip stacks, live odds bars, lever, reels reveal with near-miss, roundswrangler.toml [vars].PICK_INSTRUCTIONS — the "semi-decision-makery" dial. Edit and hot-reload.scripts/drive.sh runs a full two-member hand against a running dev server (sign-in, chips, veto, lock, pull, again, accept) and prints odds, winner, reel order and dealer line.
Options agent (screenshot intake / "More options" regen — the client prompts for labels), tables, ledger, rubber-banding, expiry alarms, run structure.