Moth v2: Production Tambola server rewrite#2
Merged
Conversation
Replace plug_cowboy with bandit, add swoosh, tailwind, cors_plug, stream_data. Remove all old housie/accounts/channel/controller code. Update config skeleton, endpoint, router, and MothWeb for Phoenix 1.7. Add error handlers, telemetry, layouts, mailer, and test fixtures.
- Bump elixir constraint from ~> 1.4 to ~> 1.14 - Remove deprecated Mix.compilers() call - Remove stale .eex templates from lib/moth_web/templates/ - Wire DNSCluster into supervision tree - Merge split endpoint config blocks in dev.exs - Move ueberauth OAuth config inside prod guard in runtime.exs - Remove deprecated Router.Helpers alias from conn_case.ex
Final wiring pass: remove duplicate imports in html_helpers, fix unused GameComponents import in HostLive, fix unused variable in PlayLive mount.
- Add API controller tests for auth and game endpoints - Fix sanitize_state to convert MapSet/Board/Ticket structs to JSON-serializable formats - Update server_test to use list membership check
- Add .formatter.exs with Phoenix/Ecto/LiveView plugins - Run mix format across entire codebase - Remove unused aliases in server_test.exs - All 70 tests passing (67 tests + 3 properties)
Players must manually tap/strike numbers on their ticket as they're called — claims validate against struck numbers, not global picks. This preserves the Tambola engagement of paying attention. - Add struck state per player in Game Server - Add strike_out/3 to Server, Game context, API, and Channel - Update ticket_grid component: picked numbers pulse yellow until struck, struck numbers show solid green - Add auto-strike toggle in PlayLive (opt-in convenience) - Claim validation now uses player's struck set, not board picks
Add missing tailwind.config.js, replace old channel-based app.js with
LiveView socket setup, and update CSS with Tailwind directives. Fix
mix.exs aliases to include tailwind install/build steps.
Remove v1 remnants: Phoenix channels (game_channel, game_socket),
old controller layouts ("Tambola by Funtagious!"), unused HTML view
modules (GameHTML, BaseHTML), stock phoenix.css, channel socket.js,
and channel_case test support. Clean up endpoint.ex and moth_web.ex.
hashd
added a commit
that referenced
this pull request
Apr 13, 2026
…validation - Filter struck set per-ticket in prize claims to prevent cross-ticket fraud (#1) - Filter prize progress per-ticket to prevent cross-ticket info leak (#9) - Strip join_secret from sanitized state (#2) - Filter REST show endpoint to only return requesting user's data (#3) - Filter player_tickets_updated broadcast to target user only (#4) - Add chat text length limit (500 chars) and validation (#13) - Add reaction emoji allowlist (#14) - Add max players per game limit (100) (#11) - Add input validation for game creation params (#23) - Remove inspect(reason) from error responses (#22) - Store rich metadata in Registry for O(1) game listing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full rewrite of the Moth POC into a production-grade Tambola/Housie game server.
Stats
Test plan
mix test— all 73 tests passmix ecto.reset && mix phx.server— server starts, home page loads at localhost:4000