Codemojex · a course
Emoji Mastermind — Engine.
A room is a template; a game is one play in it. A secret of six emoji codes, guesses that cost a currency, a per-position score of 100 − 20·d summing to 600, and three currencies moving through Postgres atomically. Classic pays the top scorer live; the blind golden mode reveals a committed secret and pays the top K in one sealed pass. This course teaches the shipped game — the running reference implementation of the Branded Component System.
ten chapters · three dives each · the shipped engine (C0–C8), then the forward road to GameIsland (C9)
Course map
ten chapters · C0–C9Overview
The game in one paragraph, the Mastermind family it belongs to, and the four-layer architecture at a glance.
the game and the family · the engine and its policies · the architecture at a glance
C1The Game as Branded Systems
Fifteen branded namespaces are the primary keys; four layers own their tiers; the privacy boundary is structural.
branded ids are the keys · the four layers · the privacy boundary
C2Rooms, Modes, and the Secret
A room is a template carrying a mode and four policies; a game snapshots it and pins a six-code secret.
room as template and mode · the emoji set · the secret and its commitment
C3Guesses on Fair Lanes
Validated, locks overlaid, charged, then enqueued on the player’s own lane — to one scorer, fairly.
the guess and the lock · charged, then enqueued · fair lanes and the worker
C4Scoring and Settlement
100 − 20·d per position toward 600 — linear only; the close race resolved exactly once by SET NX.
distance and points · the total out of 600 · settlement strategies
C5The Economy and the Bank
Keys, clips, and diamonds on separate paths; every balance change locks the row and writes a paired TXN.
three currencies · the transactional wallet · the bank, the pool, and the rake
C6The Revenue Ledger and the KeyShop
The house’s own signed ledger and the multi-rail KeyShop that feeds it; cash-out is the forward cm.8.
the revenue ledger · the KeyShop · cash-out and the treasury (forward)
C7The Live Surface on Phoenix
Verified initData mints the one SES session; privacy-safe views; live pushes with no per-game process.
the auth floor · the JSON API · channels and PubSub
C8Production Deployment
One dependency-ordered supervision tree, a pinned release, a Valkey node sized for the latency tail.
the release · the pragmatic Valkey node · fault tolerance and correctness
C9The Road to GameIsland
Where we are to where we go: the player-facing game as a React/Effector island, crossed by one branded thread.
the crossing · one model, two transports · the road ahead
Every chapter link is live. The engine chapters C0–C8 teach the shipped game; C9 turns forward to the React/Effector road to GameIsland.
How to read this course
the grounding ethicStart with Overview, then read the chapters in order. The course teaches the
shipped engine as-built: every module, table, Valkey key, and figure traces to
echo/apps/codemojex, the binding design, or the generated stories — the acceptance catalog
the game emits from its own test suite. The one forward surface is the cm.8+ ladder — cash-out, the
rake, membership — marked forward wherever named, so a plan never reads as shipped surface. The map
above shows where each chapter stands.
The doors
the sibling coursesBCS — the architecture law
The Branded Component System this game is built to. Its B7 chapter is Codemojex taught inside the BCS course — and it doors back here.
/echomqEchoMQ — the protocol, in depth
The bus under the guesses: the keyspace, jobs and fair lanes, leases, and the stream tier, with conformance on Valkey.
/redis-patternsRedis Patterns Applied
The Valkey patterns this game exercises — sorted-set boards, SET NX locks, atomic Lua moves — applied on the same stack.
Echd, In Depth
The CAP weave over the same substrate: each surface makes its own consistency/availability trade, joined by one branded identity.
References
sources · relatedSources
- Mastermind (the board game)the guess-against-a-hidden-code loop Codemojex plays with emoji
- The feedback function and minimax code-breakingthe deductive structure the engine’s distance scoring sits in
- Commitment schemes (commit and reveal)the hiding + binding properties the golden secret needs
- All-pay auctionevery guess pays a fee whether or not it wins
- King — Announcing Snowflake (2010)the time-ordered ids that key every entity across every tier
- Helland — Life Beyond Distributed Transactions (CIDR 2007)entities behind boundaries and idempotent activities
- Kreps — The Logthe bus as the log work is dropped onto and drained from
- Valkey — Persistence (RDB and the AOF)the durable bus tier, with a one-second loss bound
- Fly.io — Fly Machinesthe machines the release and the Valkey node deploy as
- Telegram — Mini Apps (validating WebApp data)the initData signature check and Telegram Stars on the surface
Related
- BCS B7 — Codemojexthis game taught inside the BCS course
- EchoMQ — the coursethe bus the guesses ride