Skip to content
tiernaughPublic

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

🎲 The Dice Man

A web app that uses AI to generate life choices and a dice roll to pick one — inspired by Luke Rhinehart's The Dice Man.

A retrofuturistic "therapy device" where you describe your situation in one sentence, get six AI-generated options from the fictional Dr. Rhinehart, and roll a dice to commit to one. No accounts, no memory, no profiles — a blank slate every time.

The aesthetic is a phosphor-green CRT terminal: pixel fonts, scanlines, glow, and a physical device frame. Think Game Boy meets medical equipment, not a SaaS app.


How it works

  1. Open the device — land on the screen, tap to begin.
  2. One utterance — describe your situation in a single sentence.
  3. Dr. Rhinehart responds — a theatrical loading beat, then an in-character preamble reacting to your input.
  4. Six options — six choices of escalating boldness (practical-with-a-twist → adventurous → absurd), all equal probability.
  5. Commit — agree to abide by whatever the dice picks.
  6. Roll & result — the dice lands on one option. No re-rolls. The commitment is the point.

"Ah, the paralysis of choice. You didn't come here to decide — you came here to stop deciding."


Tech stack

Layer Choice
Framework Next.js (App Router) + React + TypeScript
AI Claude Sonnet 4.5 via the Vercel AI SDK, with a Zod-constrained structured output (preamble + exactly 6 options)
Styling Tailwind CSS + custom CRT CSS (scanlines, glow, flicker)
Animation Framer Motion for the theatrical sequence; CSS 3D transforms for the dice
Hosting Vercel

A single server route (src/app/api/generate/route.ts) proxies the Anthropic call so the API key stays server-side. See product-documents/adr-tech-stack.md for the full rationale.


Running it locally

The app lives in product-prototype/.

cd product-prototype
nvm use                      # Node 22.11.0 (see .nvmrc)
npm install
cp .env.local.example .env.local   # then add your ANTHROPIC_API_KEY
npm run dev

Open http://localhost:3000. Get an API key at https://console.anthropic.com/. You can also run against mock data without a key by setting NEXT_PUBLIC_USE_MOCKS=true.

See product-prototype/README.md for scripts, the API contract, and directory-ownership conventions.


Status

Early prototype. The end-to-end flow works — input → AI generation → preamble → six options → commit → roll → result. The 3D dice is currently a placeholder ("Rolling…" + random face); the animated CSS cube is the next major piece of work.


Repository layout

dice-man/
├── product-documents/   PRD, tech-stack ADR, research, transcripts
├── product-prototype/   the Next.js app
├── tickets/             feature tickets + implementation roadmap
├── session-context/     per-session working-memory logs
└── CLAUDE.md            the ticket-driven development workflow

This repo follows a lightweight, ticket-driven workflow (discovery → ticket → plan → review → implement). Tickets live in tickets/; the roadmap is tickets/implementation-plan.md.


Let the dice decide.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages