๐ŸงŠ JEV SOLVES THE CUBE ๐Ÿ—ฟ

September 19, 2026 ยท View on GitHub

๐ŸงŠ JEV SOLVES THE CUBE ๐Ÿ—ฟ

You scramble like a menace. Jev โ€” the in-house AI solver โ€” judges the chaos, roasts you, and cooks the solve live.

Live Site Next.js Three.js Tailwind

TypeSafe Jev shadcn/ui Vercel Compliance

GitHub X GitHub Followers Stars

An AI-gamified twisty puzzle โ€” scramble it, gamble it, watch Jev cook. ๐ŸŽฐ

Jev Solves The Cube

โœจ What is this?

A one-page, no-scroll Rubik's cube playground with an AI attitude:

  1. ๐ŸŒช๏ธ You scramble โ€” pick a preset (Chill โ†’ Spicy โ†’ GIGACHAD โ†’ ๐Ÿคฏ UNHINGED), mash the manual turn buttons, or unleash a custom number of turns (up to 4900).
  2. ๐Ÿง  Jev judges โ€” a System One judgment model rates your chaos: one of five meme tiers, a 1โ€“5 star difficulty rating, and exactly one roast.
  3. ๐Ÿค– Jev solves โ€” an agent loop: Jev reads the live cube state, picks its next job from a toolbox step by step, and every move streams over SSE while the 3D cube executes it at adaptive speed.
  4. ๐ŸŽฐ You gamble โ€” bank the XP, or feed it to Jev's Gambit: a double-or-nothing slot machine (ร—2, ร—3, ร—5, ร—10โ€ฆ or ๐Ÿ’€ bust).

Plus: XP, ranks (NPC โ†’ Mid Scrambler โ†’ Certified Cook โ†’ GIGACHAD โ†’ Sigma Orchestrator), badges, run stats, confetti, victory spins, and a live feed that never stops talking.

๐Ÿ•น๏ธ How to play

StepAction
1Choose a preset or hand-scramble / unleash custom turns
2Hit SCRAMBLE โ€” the cube shakes while chaos is applied
3Hit SOLVE WITH JEV โ€” verdict streams in, cube animates the solve
4Watch the โœ… SOLVED banner with your run stats
5๐Ÿฆ Bank the XPโ€ฆ or ๐ŸŽฒ double or nothing it on the slot
6Climb the ranks: NPC โ†’ Mid Scrambler โ†’ Certified Cook โ†’ GIGACHAD โ†’ Sigma Orchestrator

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ browser โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Next.js App Router ยท React Three Fiber ยท Tailwind v4       โ”‚
โ”‚  shadcn/ui ยท zustand (localStorage) ยท canvas-confetti       โ”‚
โ”‚  receives ONLY curated game events (SSE)                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚  POST /api/solve
                               โ”‚  { history: ["R","U'",โ€ฆ] }
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  /api/solve  (server-only route)                            โ”‚
โ”‚  โ€ข validates + simplifies the scramble                      โ”‚
โ”‚  โ€ข computes the real cube state (cubie model + facelets)    โ”‚
โ”‚  โ€ข MOVE-BY-MOVE LOOP: Jev judges EVERY single move โ€” the    โ”‚
โ”‚    18-move alphabet is declared once, then it sees only the โ”‚
โ”‚    live cube state (facelets + progress โ€” NEVER the move    โ”‚
โ”‚    history) each turn and plays one move; the only non-Jev  โ”‚
โ”‚    moves are the superhuman tool's, streamed only when Jev  โ”‚
โ”‚    itself invokes it (tagged โšก) โ€” no engine, no rotation    โ”‚
โ”‚  โ€ข judgment pass via engine adapter  โ”€โ”€โ–บ  JEV (AI verdict)  โ”‚
โ”‚  โ€ข every solution verified vs a reference model before      โ”‚
โ”‚    streaming; raw inference is never leaked                 โ”‚
โ”‚  โ€ข streams curated events: meta โ–ธ waypoint โ–ธ move โ–ธ done    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The cube machinery (adapted from buuing/Rubiks-Cube, the most-starred Three.js cube, rebuilt for React Three Fiber) only turns for judged moves: Jev plays one judged move per call against the live state; the sole non-Jev mover is the Kociemba two-phase solver, and only when Jev itself invokes it as a tool (tagged โšก in the stream). Every solve is verified against an independent reference model before streaming, and the ๐Ÿ“œ Audit tab logs every turn that rotated the cube (๐ŸŒช๏ธ yours ยท ๐Ÿง  Jev's ยท โšก its tool's). Harnesses: pnpm check (scripts/solver-check.mjs: model + facelets + randomized Kociemba, reference cross-checked) and scripts/cube-math-check.mjs (200 animation-math trials). Every cubie returns home, always.

๐Ÿ” Security & compliance

The AI provider is a deliberate implementation detail:

SecretWhere it lives
JEV_ENGINE_API_KEYServer env only (Vercel Secret / .env.local) โ€” never NEXT_PUBLIC_*
JEV_ENGINE_BASE_URLServer env only โ€” the engine endpoint is not hardcoded anywhere
Raw inference (questions, criteria, probabilities, model ids, latency)Stays inside the API route โ€” never logged, never streamed
Client bundleZero provider strings (verified by bundle grep โ€” see COMPLIANCE.md ยง5)

The client receives exactly five curated event types โ€” meta, waypoint, move, done, error โ€” signed engine: "jev-stream/1", plus a generic token count.

๐Ÿ“„ COMPLIANCE.md maps every obligation of the engine's Master Customer Agreement (license scope ยง2.1โ€“2.3, credentials ยง2.4, input/output handling ยง4, end-user disclosures ยง5, publicity ยง15.4) to the exact files and mechanisms that satisfy it โ€” including the deliberate no-benchmarks rule (ยง2.3f) and the provider-anonymized public copy.

๐Ÿš€ Getting started

# 1. install
pnpm install

# 2. configure the engine (server-only secrets)
echo 'JEV_ENGINE_API_KEY=<your-key>'  >> .env.local
echo 'JEV_ENGINE_BASE_URL=<endpoint>' >> .env.local

# 3. run
pnpm dev        # http://localhost:3000

# 4. verify the cube math anytime
node scripts/cube-math-check.mjs
node scripts/cube-stress-large.mjs

โš™๏ธ Scripts

CommandWhat it does
pnpm devDev server
pnpm buildProduction build
pnpm startServe the production build
pnpm checkcube model + facelets + Kociemba harness (reference cross-checked)
node scripts/cube-math-check.mjs200-trial animation-math correctness harness
node scripts/cube-stress-large.mjs500-turn scramble stress harness

๐Ÿ“ Project map

src/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ api/solve/route.ts        ๐Ÿ”’ Jev agent loop + SSE stream (server-only)
โ”‚   โ”œโ”€โ”€ opengraph-image.tsx       dynamic OG image (ImageResponse)
โ”‚   โ”œโ”€โ”€ layout.tsx                fonts ยท metadata ยท JSON-LD ยท Analytics
โ”‚   โ”œโ”€โ”€ robots.ts ยท sitemap.ts ยท manifest.ts ยท icon.svg
โ”‚   โ””โ”€โ”€ page.tsx                  the one-page game
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ cube/RubiksCube.tsx       3D engine (r3f pivot-group turns)
โ”‚   โ”œโ”€โ”€ cube/CubeStage.tsx        canvas, lights, camera
โ”‚   โ”œโ”€โ”€ legal.tsx                 consent ยท privacy ยท disclaimer
โ”‚   โ”œโ”€โ”€ ErrorBoundary.tsx         localStorage corruption shield
โ”‚   โ””โ”€โ”€ Logo.tsx
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ cube.ts                   move alphabet (validate ยท invert ยท simplify)
โ”‚   โ”œโ”€โ”€ cubie.ts                  cubie state model (perm + orientation)
โ”‚   โ”œโ”€โ”€ solve-kociemba.ts         โšก superhuman solver + reference verification
โ”‚   โ”œโ”€โ”€ store.ts                  XP ยท badges ยท run stats (persisted)
โ”‚   โ””โ”€โ”€ memes.ts                  tier banks ยท roasts ยท ranks
โ””โ”€โ”€ server/
    โ””โ”€โ”€ jev-engine.ts             ๐Ÿ”’ single engine choke point (server-only)

๐Ÿ™ Credits

  • Cube model adapted from buuing/Rubiks-Cube โ€” the most-starred Three.js Rubik's cube.
  • Font vibes from Bruno Simon's portfolio (Amatic SC + Nunito).
  • Judgments by Jev via the TypeSafe System One API โ€” probabilistic, for fun, never a fact.

๐Ÿซก Author

Trou ยท 0xtrou

the one who taught Jev to cook ๐Ÿ‘จโ€๐Ÿณ

GitHub X

enjoyed the chaos? drop a โญ โ€” Jev counts the stars too

โš ๏ธ Disclaimer

Fan-made demo, provided as is, for entertainment only. Not affiliated with Rubik's Brand Ltd or Spin Master Ltd โ€” "Rubik's Cube" is a trademark of its respective owner; this project simulates a classic 3ร—3 twisty puzzle. AI output is probabilistic and may be inaccurate. Scores and XP have no value outside this site. See the in-app Disclaimer, Privacy & Cookies, and Experimental Notice for the full text.


๐Ÿ—ฟ scramble. cook. gamble. we move.

โ€” Trou ยท 0xtrou ยท @_trou3