jonnify·codemojex /codemojex/branded-systems

Codemojex · chapter C1

The game as branded systems.

Every entity in Codemojex is a 14-character branded snowflake — a three-character uppercase namespace and eleven Base62 characters over ts(41) | node(10) | seq(12) — and the id is the only value that crosses a boundary. It keys the row in Postgres, the entry in Valkey, the job on the bus, and the message that announces a result; because it carries its mint time, it doubles as a cache version and an idempotency token. Fifteen namespaces carry the game today.

Pick a brand below. The tiers it occupies light up — the id is placed only where it is needed.

Postgres · floor Valkey · bus + board EchoStore · L1 PLR players lanes · board — GAM games board · lock :cm_games TXN transactions — — SES — ecc:{sessions} :cm_sessions
The id is the thread; each brand is placed on the tiers it needs. Teal marks a tier the name occupies. Source: design §Identity · Codemojex.Tables · Codemojex.View.

PLR — the player. Rests on the Postgres floor (the balances row) and races on Valkey (the per-player guess lane and the leaderboard). No near-cache: a balance is mutable, so it is read from the floor under a row lock, never a stale copy.

§1

The chapter in three dives

C1.1 – C1.3

One id contract keys every tier; four layers hold the whole game; one boundary keeps the secret unreadable. The three dives take those in turn — the brand as the type, the four layers that own the tiers, and the privacy boundary drawn in structure rather than at the edge.

Grounding — the chapter reads from lib/codemojex/wire.ex (the one adapter onto the owned wire), the eleven schemas/*.ex (all keyed {:id, :string}), tables.ex (the EchoStore tier), view.ex (the privacy-safe reads), the design’s §Identity and §Privacy sections, and stories/privacy.stories.md.

§2

References

sources · related

Sources

Related