🍬 DaisyKit — Quick-Start Cheat Sheet
Live truth > this page. Host: /dev/daisykit · Code: $lib/daisykit/* · Fork: kits/daisy-midway/
What: portable daisyUI Midway building blocks (juice · bones · booths · dopamine)
Who: humans + agents shipping theme-aware UI toys without touching Funday Nakama
When: before inventing a new micro-game / HUD / form loop from scratch
⚡ 30-second map
| 🎯 | Path | Job |
|---|
| 🖥️ Host | /dev/daisykit | Accordion showcase · inherits Funday theme · MockNakama only |
| 📦 Lib | frontend/src/lib/daisykit/ | Import into features like a game plugin |
| 🧰 Fork | kits/daisy-midway/ | Standalone SvelteKit carnival |
| 📜 Zip | /dev/daisykit/daisymidwaystarterkit.zip | Offline starter |
Funday theme + /dev chrome
│
▼
/dev/daisykit ──imports──► $lib/daisykit/{juice,bones,arcade,dopamine,booths,backend}
│ │
│ └── MockNakama only (never platform Nakama)
└── Folded row = auto mini-demo · click = full booth
🧱 Import recipes (copy-paste)
import { JuiceLab, DiceAlley, ToggleHeist } from '$lib/daisykit/booths';
import { rig, burst } from '$lib/daisykit/juice';
import { rollDice } from '$lib/daisykit/bones/dice';
import { getEngine } from '$lib/daisykit/dopamine/engine.svelte';
| 📂 Module | Use for |
|---|
booths/* | Ready playable surfaces (Juice Lab → Arcade → Blueprint demos) |
juice/* | Motions · FX · particle bursts |
bones/* | Pure math: dice · cards · turns · sheets · grids |
arcade/* | HUD atoms (HP, mana, hotbar, minimap…) |
dopamine/* | Tickets · streak/heat · pity · toasts · honest payouts |
backend/* | MockNakama playground API (reference nakama.ts exists — do not wire live Funday client from kit host) |
🕹️ Live booth roster
Core (full mounts)
| # | Booth | Controller vibe |
|---|
| 1 | Juice Lab | Motions / FX toolbox |
| 2 | Rating Riot | rating memory duel |
| 3 | Range Angler | range sweet-spot hold |
| 4 | Dice Alley | Honest EV dice |
| 5 | House of Cards | Carny 21 |
| 6 | Arcade Hall | 26 HUD atoms · one sim |
| 7 | Ticket Booth | Idle meta |
Blueprint — playable demos
| Booth | daisyUI spine |
|---|
| Toggle Heist | toggle |
| Modal Mole | dialog.modal |
| Skeleton Says | skeleton |
| Radial Roulette | radial-progress |
| Steps Sprint | steps |
Remaining Blueprint cards = idea recipes (not mounts). Build next; don’t fake “live”.
🧠 Dopamine engine (the law)
const engine = getEngine();
engine.win(); // streak / heat up
engine.lose(margin?); // reset; optional near-miss toast
await engine.finishRun(id, score); // tickets + score submit
engine.toast('success', '…');
| ✅ Do | 🚫 Don’t |
|---|
Pay out only via finishRun / engine helpers | Invent parallel wallet math |
| Print odds on the wall when they exist | Hide probabilities |
| Semantic daisyUI colors only | Hardcoded Tailwind palette / kit theme picker |
Import $lib/daisykit/* into your feature | Pollute app.css with Midway themes |
| Use MockNakama on the kit host | Touch Funday platform Nakama from daisykit |
🧪 Booth recipe (5 steps)
- Pick the controller — one daisyUI component is the toy
- Loop in runes —
$state / $derived · native onclick (no on:click)
- Steal bones —
$lib/daisykit/bones/* for math you already proved
- Pay honest —
engine.finishRun(boothId, score) only
- Show the math — if a probability exists, render it
🧼 Host hygiene (surgical plug-in)
| Rule | Why |
|---|
Thin route: routes/dev/daisykit/{+layout,+page} only | Kit stays portable |
Inherit Funday data-theme | No second theme picker |
| Lucide > emoji | Clean /dev language |
| Folded = auto demo · open = full mount | 0-click scan, 1-click play |
| No nested card-in-card chrome | Uncluttered Midway |