No description
  • Elixir 78.9%
  • Nix 9.6%
  • CSS 8.1%
  • JavaScript 3.4%
Find a file
2026-08-06 11:06:59 +02:00
assets bombini update 2026-08-06 11:06:59 +02:00
config Initial commit: Bombini — Bomb Party clone (Phoenix LiveView) 2026-08-06 10:27:31 +02:00
lib bombini update 2026-08-06 11:06:59 +02:00
nix bombini update 2026-08-06 11:06:59 +02:00
priv/static Initial commit: Bombini — Bomb Party clone (Phoenix LiveView) 2026-08-06 10:27:31 +02:00
test bombini update 2026-08-06 11:06:59 +02:00
.formatter.exs Initial commit: Bombini — Bomb Party clone (Phoenix LiveView) 2026-08-06 10:27:31 +02:00
.gitignore bombini update 2026-08-06 11:06:59 +02:00
flake.lock Initial commit: Bombini — Bomb Party clone (Phoenix LiveView) 2026-08-06 10:27:31 +02:00
flake.nix bombini update 2026-08-06 11:06:59 +02:00
mix.exs Initial commit: Bombini — Bomb Party clone (Phoenix LiveView) 2026-08-06 10:27:31 +02:00
mix.lock Initial commit: Bombini — Bomb Party clone (Phoenix LiveView) 2026-08-06 10:27:31 +02:00
README.md Initial commit: Bombini — Bomb Party clone (Phoenix LiveView) 2026-08-06 10:27:31 +02:00

💣 Bombini

A clone of Bomb Party (the JKLM.fun word game): players share a room, a bomb with a ticking timer passes around, and on your turn you must type a real word containing the shown syllable before it goes off. Run out of time and you lose a life. Last player standing wins.

Built with Elixir / Phoenix LiveView — no separate JS frontend, one process per room on the BEAM. Dependencies are managed with a Nix flake.

Quick start

nix develop            # dev shell: elixir, erlang, esbuild, scowl, gen-words
gen-words              # generate priv/words.txt from SCOWL (run once)
mix setup              # fetch hex deps
mix phx.server         # http://localhost:4000

Open two browser tabs (each tab is its own player — identity is per-tab), create a room in one, and join with the same code in the other.

First run also needs Hex/rebar locally: mix local.hex --force && mix local.rebar --force (installs into ./.mix).

Tests

mix test
  • test/bombini/game_test.exs — the pure rules engine (turns, rejections, life loss, alphabet bonus, elimination, winner).
  • test/bombini/dictionary_test.exs — word validation + derived syllables.
  • test/bombini_web/game_live_test.exs — full end-to-end: two connected clients join → lobby → start → a real valid-word submission, over the live stack.

How it fits together

Piece Role
Bombini.Game Pure rules engine. Immutable struct + transition functions. Dictionary lookup and syllable generation are injected, so it's deterministic and needs no processes to test.
Bombini.Dictionary Loads priv/words.txt into a MapSet (valid?/1) and derives solvable syllables by counting 23 letter substrings across the corpus (random_prompt/0).
Bombini.RoomServer One GenServer per room. Wraps a Game with the bomb timer and broadcasts snapshots over Phoenix.PubSub.
Bombini.Rooms Finds/starts rooms by code via a Registry + DynamicSupervisor.
BombiniWeb.GameLive The entire UI: home → name → lobby → play → game over, driven by room snapshots.

The word list comes from SCOWL (wamerican.60, ~88k words), pinned in the flake so gen-words is reproducible. priv/words.txt is git-ignored; regenerate it with gen-words.

Settings

Tunable in Bombini.Game defaults (new/1): starting lives (2), min word length (2), full-alphabet bonus life (on), and the bomb timer window (820 s, fresh per turn).