LAN:
๐Ÿ—บ๏ธ Interactive C4 Map ๐ŸŽฌ 33 Video Tutorials
ERD achievements achievements id * uuid PK user_id * uuid FK type * text awarded_at * timestamp match_id text metadata * jsonb users users id * uuid PK gamertag * text gamertag_normalized * text suffix integer gamertag_changed_at timestamp email * text UQ password_hash * text elo * integer favorite_suit text tagline text avatar_icon text created_at * timestamp updated_at * timestamp email_notifications * boolean reminder_notifications * boolean email_verified_at timestamp marketing_consent_at timestamp legal_consent_version text is_admin * boolean matches_created * integer successful_starts * integer login_failed_attempts * integer login_locked_until timestamp security_stamp text is_disabled * boolean disabled_reason text disabled_at timestamp equipped_card_skin * text achievements->users user_id admin_audit_log admin_audit_log id * uuid PK actor_id * uuid FK action * text target_id uuid metadata jsonb created_at * timestamp admin_audit_log->users actor_id cosmetic_products cosmetic_products id * uuid PK sku * text UQ name * text description text category * text price_cents * integer active * boolean created_at * timestamp elo_snapshots elo_snapshots id * uuid PK user_id * uuid FK category * text elo * integer k_factor * integer window_days * integer matches_in_window * integer wins_in_window * integer computed_at * timestamp elo_snapshots->users user_id identity_audit_log identity_audit_log id * uuid PK user_id * uuid FK action * text metadata * jsonb ip_address text created_at * timestamp identity_audit_log->users user_id match_actions match_actions match_id * uuid PK sequence_number * integer PK action * jsonb state_hash_before * text state_hash_after * text msg_id text created_at * timestamp matches matches id * uuid PK player_1_id uuid FK player_2_id uuid FK visibility * text public_status text public_expires_at timestamp min_public_rating integer max_public_rating integer min_games_played integer requires_established_rating * boolean player_1_name text player_2_name text player_1_card_skin * text player_2_card_skin * text bot_strategy text is_automated * boolean config * jsonb state jsonb action_history * jsonb transaction_log * jsonb outcome jsonb event_log jsonb event_log_fingerprint text final_state_hash text status * text last_action_at timestamp creator_ip text created_at * timestamp updated_at * timestamp match_actions->matches match_id match_comments match_comments id * uuid PK user_id * uuid FK match_id * uuid FK step integer content * text is_removed * boolean removed_at timestamp removal_reason text created_at * timestamp updated_at * timestamp match_comments->matches match_id match_comments->users user_id match_embeddings match_embeddings match_id * uuid PK embedding vector summary text version * integer metadata * jsonb created_at * timestamp match_embeddings->matches match_id match_favorites match_favorites user_id * uuid PK match_id * uuid PK created_at * timestamp match_favorites->matches match_id match_favorites->users user_id match_payloads match_payloads match_id * uuid PK state jsonb action_history jsonb transaction_log jsonb event_log jsonb archived_at * timestamp match_payloads->matches match_id match_ratings match_ratings user_id * uuid PK match_id * uuid PK rating * integer created_at * timestamp updated_at * timestamp match_ratings->matches match_id match_ratings->users user_id match_results match_results match_id * uuid PK user_id * uuid PK opponent_id uuid FK mode * text result * text elo_before * integer elo_after * integer elo_delta * integer glicko_before * integer glicko_after * integer glicko_rd_before * integer glicko_rd_after * integer created_at * timestamp match_results->matches match_id match_results->users user_id match_results->users opponent_id matches->users player_1_id matches->users player_2_id password_reset_tokens password_reset_tokens id * uuid PK user_id * uuid FK token_hash * text expires_at * timestamp used_at timestamp created_at * timestamp password_reset_tokens->users user_id player_ratings player_ratings user_id * uuid PK mode * text PK elo_rating * integer glicko_rating * integer glicko_rating_deviation * integer glicko_volatility * real games_played * integer wins * integer losses * integer draws * integer abandons * integer provisional * boolean last_rated_at timestamp created_at * timestamp updated_at * timestamp player_ratings->users user_id season_archives season_archives id * uuid PK season_id * uuid FK user_id * uuid FK category * text elo * integer rank integer matches_played * integer wins * integer archived_at * timestamp seasons seasons id * uuid PK number * integer UQ started_at * timestamp ended_at timestamp is_active * boolean created_at * timestamp season_archives->seasons season_id season_archives->users user_id transaction_logs transaction_logs id * uuid PK match_id * uuid FK sequence_number * integer action * jsonb state_hash_before * text state_hash_after * text events * jsonb msg_id text created_at * timestamp transaction_logs->matches match_id user_entitlements user_entitlements id * uuid PK user_id * uuid FK product_id * uuid FK transaction_id * text UQ platform * text granted_at * timestamp user_entitlements->cosmetic_products product_id user_entitlements->users user_id user_follows user_follows follower_id * uuid PK following_id * uuid PK created_at * timestamp user_follows->users follower_id user_follows->users following_id
InfraTopology cluster_clients 1. Clients & External Consumers cluster_edge 2. Edge & Ingress Perimeter cluster_prod 3. Production Cloud (Fly.io + Neon) cluster_local 4. Local Dev & Docker Cluster cluster_obs 5. Longitudinal Observability WebClient Web Client UI Preact + Vite (RUM) NginxLAN Nginx Reverse Proxy *.lan.phalanxduel.com WebClient->NginxLAN HTTPS FlyEdge Fly.io Anycast Edge play.phalanxduel.com (TLS) WebClient->FlyEdge WSS /ws AdminUI Admin Cockpit Preact (:5174) GoCLI Go Duel CLI gorilla/websocket GoCLI->FlyEdge WSS AIAgents AI Agents & MCP Claude ยท Codex ยท Gemini FlyMCP MCP Public Service Engine & Analysis API AIAgents->FlyMCP SSE EdgeDNS DNS & Routing DNSimple + AdGuard LAN HostServer Host Fastify Server pnpm dev:server (:3001) NginxLAN->HostServer FlyServer Fastify Server :3001 Node 24 ยท REST + /ws FlyEdge->FlyServer NeonDB Neon Serverless Postgres Drizzle ORM ยท pgvector FlyServer->NeonDB pgwire SSL OTelCol OpenTelemetry Collector :4317 gRPC / :4318 HTTP FlyServer->OTelCol OTLP FlyMCP->FlyServer HostDB Host PostgreSQL phalanx_dev / test (:5432) HostServer->HostDB isolated creds HostServer->OTelCol OTLP :4318 ClusterNodes Docker Cluster A/B Node A (:3011) + B (:3012) OpenObserve OpenObserve (o2) Logs, Metrics, RUM OTelCol->OpenObserve logs & metrics Jaeger Jaeger UI Distributed Tracing OTelCol->Jaeger traces
Authoritative Fastify Routes & Endpoints (21 total)
MethodEndpointSubsystem / TagAuthority Scope
GET /health System Authoritative Node.js (Port 3001)
GET /ready System Authoritative Node.js (Port 3001)
GET /docs Documentation Authoritative Node.js (Port 3001)
GET /api/matches/lobby Matchmaking Authoritative Node.js (Port 3001)
POST /api/matches/:id/join Matchmaking Authoritative Node.js (Port 3001)
POST /api/matches/:id/action Gameplay Authoritative Node.js (Port 3001)
GET /api/matches/:id/state Gameplay Authoritative Node.js (Port 3001)
GET /api/matches/:id/verify Assurance Authoritative Node.js (Port 3001)
GET /api/matches/history Gameplay Authoritative Node.js (Port 3001)
GET /api/stats Leaderboard Authoritative Node.js (Port 3001)
GET /api/stats/:userId/history Leaderboard Authoritative Node.js (Port 3001)
GET /api/spectator/matches Spectator Authoritative Node.js (Port 3001)
GET /api/spectator/matches/:id/stream Spectator Authoritative Node.js (Port 3001)
WS /ws Realtime Authoritative Node.js (Port 3001)
GET /api/store/products Economy Authoritative Node.js (Port 3001)
POST /api/store/create-checkout-session Economy Authoritative Node.js (Port 3001)
POST /api/store/verify-purchase Economy Authoritative Node.js (Port 3001)
GET /api/store/inventory Economy Authoritative Node.js (Port 3001)
GET /api/store/loadout Economy Authoritative Node.js (Port 3001)
POST /api/store/equip Economy Authoritative Node.js (Port 3001)
POST /api/store/stripe-webhook Economy Authoritative Node.js (Port 3001)
dependency-cruiser output cluster_client client cluster_client/src src cluster_client/src/components components cluster_client/src/lobby lobby cluster_engine engine cluster_engine/src src cluster_engine/src/assurance assurance cluster_server server cluster_server/src src cluster_server/src/achievements achievements cluster_server/src/db db cluster_server/src/middleware middleware cluster_server/src/observability observability cluster_server/src/ops ops cluster_server/src/routes routes cluster_server/src/services services cluster_server/src/utils utils cluster_shared shared cluster_shared/src src client/src/analytics.ts analytics.ts client/src/app-connection.ts app-connection.ts client/src/auth.ts auth.ts client/src/state.ts state.ts client/src/auth.ts->client/src/state.ts shared/src/index.ts index.ts client/src/state.ts->shared/src/index.ts client/src/cosmetics.ts cosmetics.ts client/src/state.ts->client/src/cosmetics.ts client/src/name-generator.ts name-generator.ts client/src/state.ts->client/src/name-generator.ts client/src/bootstrap.ts bootstrap.ts client/src/main.ts main.ts client/src/bootstrap.ts->client/src/main.ts client/src/main.ts->client/src/state.ts client/src/manifest.ts manifest.ts client/src/main.ts->client/src/manifest.ts client/src/commentary-engine.ts commentary-engine.ts client/src/main.ts->client/src/commentary-engine.ts client/src/narration-bus.ts narration-bus.ts client/src/main.ts->client/src/narration-bus.ts client/src/connection.ts connection.ts client/src/main.ts->client/src/connection.ts client/src/debug.css debug.css client/src/main.ts->client/src/debug.css client/src/debug.ts debug.ts client/src/main.ts->client/src/debug.ts client/src/narration-producer.ts narration-producer.ts client/src/main.ts->client/src/narration-producer.ts client/src/pizzazz.ts pizzazz.ts client/src/main.ts->client/src/pizzazz.ts client/src/renderer.ts renderer.ts client/src/main.ts->client/src/renderer.ts client/src/instrument.ts instrument.ts client/src/main.ts->client/src/instrument.ts client/src/music-engine.ts music-engine.ts client/src/main.ts->client/src/music-engine.ts client/src/report-issue.ts report-issue.ts client/src/main.ts->client/src/report-issue.ts client/src/style.css style.css client/src/main.ts->client/src/style.css client/src/card-utils.ts card-utils.ts client/src/cards.ts cards.ts client/src/cards.ts->client/src/manifest.ts client/src/combat-explanation.ts combat-explanation.ts client/src/combat-explanation.ts->shared/src/index.ts shared/src/achievements-metadata.ts achievements-metadata.ts shared/src/index.ts->shared/src/achievements-metadata.ts shared/src/calculation-provenance.ts calculation-provenance.ts shared/src/index.ts->shared/src/calculation-provenance.ts shared/src/combat-resolution.ts combat-resolution.ts shared/src/index.ts->shared/src/combat-resolution.ts shared/src/constants.ts constants.ts shared/src/index.ts->shared/src/constants.ts shared/src/gamertag.ts gamertag.ts shared/src/index.ts->shared/src/gamertag.ts shared/src/phase.ts phase.ts shared/src/index.ts->shared/src/phase.ts shared/src/protocol.ts protocol.ts shared/src/index.ts->shared/src/protocol.ts shared/src/reliable-channel.ts reliable-channel.ts shared/src/index.ts->shared/src/reliable-channel.ts shared/src/schema.ts schema.ts shared/src/index.ts->shared/src/schema.ts shared/src/telemetry.ts telemetry.ts shared/src/index.ts->shared/src/telemetry.ts client/src/components/AchievementViews.tsx AchievementViews.tsx client/src/components/AchievementViews.tsx->client/src/state.ts client/src/components/AchievementViews.tsx->shared/src/index.ts client/src/components/AuthPanel.tsx AuthPanel.tsx client/src/components/AuthPanel.tsx->client/src/app-connection.ts client/src/components/AuthPanel.tsx->client/src/auth.ts client/src/components/AuthPanel.tsx->client/src/state.ts client/src/components/AuthPanel.tsx->shared/src/index.ts client/src/components/CinematicBackground.tsx CinematicBackground.tsx client/src/components/CombatMath.tsx CombatMath.tsx client/src/components/CombatMath.tsx->client/src/combat-explanation.ts client/src/components/CopyButton.tsx CopyButton.tsx client/src/components/EngagementLog.tsx EngagementLog.tsx client/src/components/EngagementLog.tsx->client/src/cards.ts client/src/components/EngagementLog.tsx->client/src/components/CombatMath.tsx client/src/components/HealthBadge.tsx HealthBadge.tsx client/src/components/HealthBadge.tsx->client/src/state.ts client/src/components/Leaderboard.tsx Leaderboard.tsx client/src/components/Leaderboard.tsx->client/src/state.ts client/src/components/MatchDetails.tsx MatchDetails.tsx client/src/components/MatchDetails.tsx->client/src/components/CombatMath.tsx client/src/components/MatchHistory.tsx MatchHistory.tsx client/src/components/MatchHistory.tsx->client/src/components/MatchDetails.tsx client/src/components/NarrationTicker.tsx NarrationTicker.tsx client/src/components/NarrationTicker.tsx->client/src/cards.ts client/src/components/NarrationTicker.tsx->client/src/narration-bus.ts client/src/components/PlayerGlossary.tsx PlayerGlossary.tsx client/src/components/ResetPasswordPanel.tsx ResetPasswordPanel.tsx client/src/components/SettingsPanel.tsx SettingsPanel.tsx client/src/components/SettingsPanel.tsx->client/src/auth.ts client/src/components/SettingsPanel.tsx->client/src/state.ts client/src/components/SettingsPanel.tsx->client/src/cosmetics.ts client/src/cosmetics.ts->shared/src/index.ts client/src/connection.ts->client/src/analytics.ts client/src/connection.ts->client/src/auth.ts client/src/connection.ts->client/src/state.ts client/src/connection.ts->shared/src/index.ts client/src/uuid.ts uuid.ts client/src/connection.ts->client/src/uuid.ts client/src/constants.ts constants.ts client/src/error-ui.ts error-ui.ts client/src/error-ui.ts->client/src/state.ts client/src/game-over.tsx game-over.tsx client/src/game-over.tsx->client/src/state.ts client/src/game-over.tsx->shared/src/index.ts client/src/game-over.tsx->client/src/components/CombatMath.tsx client/src/game-over.tsx->client/src/components/CopyButton.tsx client/src/ux-derivations.ts ux-derivations.ts client/src/game-over.tsx->client/src/ux-derivations.ts client/src/game.tsx game.tsx client/src/game.tsx->client/src/app-connection.ts client/src/game.tsx->client/src/state.ts client/src/game.tsx->client/src/cards.ts client/src/game.tsx->shared/src/index.ts client/src/game.tsx->client/src/components/CombatMath.tsx client/src/game.tsx->client/src/components/CopyButton.tsx client/src/game.tsx->client/src/components/EngagementLog.tsx client/src/game.tsx->client/src/components/HealthBadge.tsx client/src/game.tsx->client/src/components/NarrationTicker.tsx client/src/game.tsx->client/src/cosmetics.ts client/src/game.tsx->client/src/constants.ts client/src/presentation-timing.ts presentation-timing.ts client/src/game.tsx->client/src/presentation-timing.ts engine/src/index.ts index.ts client/src/game.tsx->engine/src/index.ts engine/src/bot-tiers.ts bot-tiers.ts engine/src/index.ts->engine/src/bot-tiers.ts engine/src/bot.ts bot.ts engine/src/index.ts->engine/src/bot.ts engine/src/mcts.ts mcts.ts engine/src/index.ts->engine/src/mcts.ts engine/src/observer-knowledge.ts observer-knowledge.ts engine/src/index.ts->engine/src/observer-knowledge.ts engine/src/state.ts state.ts engine/src/index.ts->engine/src/state.ts engine/src/combat-preview.ts combat-preview.ts engine/src/index.ts->engine/src/combat-preview.ts engine/src/events.ts events.ts engine/src/index.ts->engine/src/events.ts engine/src/turns.ts turns.ts engine/src/index.ts->engine/src/turns.ts engine/src/combat.ts combat.ts engine/src/index.ts->engine/src/combat.ts engine/src/deck.ts deck.ts engine/src/index.ts->engine/src/deck.ts engine/src/liveness.ts liveness.ts engine/src/index.ts->engine/src/liveness.ts engine/src/projection.ts projection.ts engine/src/index.ts->engine/src/projection.ts engine/src/quick-deploy.ts quick-deploy.ts engine/src/index.ts->engine/src/quick-deploy.ts engine/src/replay.ts replay.ts engine/src/index.ts->engine/src/replay.ts engine/src/state-machine.ts state-machine.ts engine/src/index.ts->engine/src/state-machine.ts client/src/index.ts index.ts client/src/index.ts->client/src/analytics.ts client/src/index.ts->client/src/auth.ts client/src/index.ts->client/src/state.ts client/src/index.ts->client/src/card-utils.ts client/src/index.ts->client/src/cards.ts client/src/index.ts->client/src/narration-bus.ts client/src/index.ts->client/src/connection.ts client/src/index.ts->client/src/game-over.tsx client/src/index.ts->client/src/game.tsx client/src/lobby.tsx lobby.tsx client/src/index.ts->client/src/lobby.tsx client/src/match-history.ts match-history.ts client/src/index.ts->client/src/match-history.ts client/src/index.ts->client/src/narration-producer.ts client/src/index.ts->client/src/pizzazz.ts client/src/index.ts->client/src/renderer.ts client/src/lobby.tsx->client/src/app-connection.ts client/src/lobby.tsx->client/src/auth.ts client/src/lobby.tsx->client/src/state.ts client/src/lobby.tsx->shared/src/index.ts client/src/lobby.tsx->client/src/components/AchievementViews.tsx client/src/lobby.tsx->client/src/components/AuthPanel.tsx client/src/lobby.tsx->client/src/components/CinematicBackground.tsx client/src/lobby.tsx->client/src/components/CopyButton.tsx client/src/lobby.tsx->client/src/components/HealthBadge.tsx client/src/lobby.tsx->client/src/components/Leaderboard.tsx client/src/lobby.tsx->client/src/components/MatchHistory.tsx client/src/lobby.tsx->client/src/components/ResetPasswordPanel.tsx client/src/lobby.tsx->client/src/components/SettingsPanel.tsx client/src/lobby.tsx->client/src/uuid.ts client/src/lobby.tsx->client/src/error-ui.ts client/src/lobby.tsx->client/src/game-over.tsx client/src/lobby.tsx->client/src/ux-derivations.ts client/src/lobby.tsx->client/src/game.tsx client/src/lobby/CascadeVisualizer.tsx CascadeVisualizer.tsx client/src/lobby.tsx->client/src/lobby/CascadeVisualizer.tsx client/src/lobby/ProfileLink.tsx ProfileLink.tsx client/src/lobby.tsx->client/src/lobby/ProfileLink.tsx client/src/lobby/PublicProfileView.tsx PublicProfileView.tsx client/src/lobby.tsx->client/src/lobby/PublicProfileView.tsx client/src/waiting.tsx waiting.tsx client/src/lobby.tsx->client/src/waiting.tsx client/src/match-history.ts->client/src/renderer.ts client/src/narration-producer.ts->client/src/cards.ts client/src/narration-producer.ts->client/src/combat-explanation.ts client/src/narration-producer.ts->shared/src/index.ts client/src/narration-producer.ts->client/src/presentation-timing.ts client/src/pizzazz.ts->client/src/state.ts client/src/pizzazz.ts->client/src/presentation-timing.ts client/src/renderer.ts->client/src/app-connection.ts client/src/renderer.ts->client/src/card-utils.ts client/src/renderer.ts->client/src/cards.ts client/src/renderer.ts->client/src/error-ui.ts client/src/renderer.ts->client/src/game-over.tsx client/src/renderer.ts->client/src/game.tsx client/src/renderer.ts->client/src/lobby.tsx client/src/renderer.ts->client/src/waiting.tsx client/src/instrument.ts->client/src/analytics.ts client/src/instrument.ts->client/src/uuid.ts client/src/telemetry-config.ts telemetry-config.ts client/src/instrument.ts->client/src/telemetry-config.ts client/src/lobby/PublicProfileView.tsx->client/src/auth.ts client/src/lobby/PublicProfileView.tsx->client/src/state.ts client/src/waiting.tsx->client/src/state.ts client/src/waiting.tsx->client/src/components/CopyButton.tsx client/src/report-issue.ts->client/src/state.ts client/src/report-issue.ts->client/src/renderer.ts client/src/vite-env.d.ts vite-env.d.ts engine/src/assurance/combat-proof-domain.ts combat-proof-domain.ts engine/src/assurance/combat-reference.ts combat-reference.ts engine/src/bot.ts->engine/src/bot-tiers.ts engine/src/bot.ts->engine/src/mcts.ts engine/src/bot.ts->engine/src/observer-knowledge.ts engine/src/bot.ts->engine/src/state.ts engine/src/mcts.ts->shared/src/index.ts engine/src/mcts.ts->engine/src/state.ts engine/src/mcts.ts->engine/src/turns.ts engine/src/observer-knowledge.ts->shared/src/index.ts engine/src/state.ts->shared/src/index.ts engine/src/state.ts->engine/src/deck.ts engine/src/calculation-provenance.ts calculation-provenance.ts engine/src/calculation-provenance.ts->shared/src/index.ts engine/src/combat-math.ts combat-math.ts engine/src/combat-preview.ts->shared/src/index.ts engine/src/combat-preview.ts->engine/src/events.ts engine/src/combat-preview.ts->engine/src/turns.ts engine/src/events.ts->shared/src/index.ts engine/src/turns.ts->shared/src/index.ts engine/src/turns.ts->engine/src/state.ts engine/src/turns.ts->engine/src/combat.ts engine/src/turns.ts->engine/src/liveness.ts engine/src/turns.ts->engine/src/quick-deploy.ts engine/src/turns.ts->engine/src/state-machine.ts engine/src/combat.ts->engine/src/calculation-provenance.ts engine/src/combat.ts->engine/src/combat-math.ts engine/src/quick-deploy.ts->engine/src/state.ts engine/src/replay.ts->engine/src/state.ts engine/src/replay.ts->engine/src/turns.ts engine/src/state-machine.ts->shared/src/index.ts server/src/abTests.ts abTests.ts server/src/achievements/detector.ts detector.ts server/src/achievements/detectors.ts detectors.ts server/src/achievements/index.ts index.ts server/src/achievements/index.ts->server/src/achievements/detectors.ts server/src/db/index.ts index.ts server/src/achievements/index.ts->server/src/db/index.ts server/src/db/observability.ts observability.ts server/src/achievements/index.ts->server/src/db/observability.ts server/src/db/schema.ts schema.ts server/src/achievements/index.ts->server/src/db/schema.ts server/src/db/index.ts->server/src/db/schema.ts server/src/db/observability.ts->shared/src/index.ts server/src/observability.ts observability.ts server/src/db/observability.ts->server/src/observability.ts server/src/achievements/service.ts service.ts server/src/achievements/service.ts->shared/src/index.ts server/src/achievements/service.ts->server/src/db/index.ts server/src/achievements/service.ts->server/src/db/observability.ts server/src/achievements/service.ts->server/src/db/schema.ts server/src/analysis.ts analysis.ts server/src/analysis.ts->server/src/db/index.ts server/src/analysis.ts->server/src/db/observability.ts server/src/analysis.ts->server/src/db/schema.ts server/src/app.ts app.ts server/src/app.ts->shared/src/index.ts server/src/app.ts->server/src/db/index.ts server/src/db/ledger-store.ts ledger-store.ts server/src/app.ts->server/src/db/ledger-store.ts server/src/db/match-repo.ts match-repo.ts server/src/app.ts->server/src/db/match-repo.ts server/src/event-bus.ts event-bus.ts server/src/app.ts->server/src/event-bus.ts server/src/instrument.ts instrument.ts server/src/app.ts->server/src/instrument.ts server/src/match.ts match.ts server/src/app.ts->server/src/match.ts server/src/metrics.ts metrics.ts server/src/app.ts->server/src/metrics.ts server/src/routes/auth.ts auth.ts server/src/app.ts->server/src/routes/auth.ts server/src/routes/discovery.ts discovery.ts server/src/app.ts->server/src/routes/discovery.ts server/src/routes/docs.ts docs.ts server/src/app.ts->server/src/routes/docs.ts server/src/routes/health.ts health.ts server/src/app.ts->server/src/routes/health.ts server/src/routes/internal.ts internal.ts server/src/app.ts->server/src/routes/internal.ts server/src/routes/ladder.ts ladder.ts server/src/app.ts->server/src/routes/ladder.ts server/src/routes/matches.ts matches.ts server/src/app.ts->server/src/routes/matches.ts server/src/routes/matchmaking.ts matchmaking.ts server/src/app.ts->server/src/routes/matchmaking.ts server/src/routes/profiles.ts profiles.ts server/src/app.ts->server/src/routes/profiles.ts server/src/routes/social.ts social.ts server/src/app.ts->server/src/routes/social.ts server/src/routes/spectator.ts spectator.ts server/src/app.ts->server/src/routes/spectator.ts server/src/routes/stats.ts stats.ts server/src/app.ts->server/src/routes/stats.ts server/src/routes/store.ts store.ts server/src/app.ts->server/src/routes/store.ts server/src/tracing.ts tracing.ts server/src/app.ts->server/src/tracing.ts server/src/utils/openapi.ts openapi.ts server/src/app.ts->server/src/utils/openapi.ts server/src/ws-handler.ts ws-handler.ts server/src/app.ts->server/src/ws-handler.ts server/src/db/ledger-store.ts->server/src/db/index.ts server/src/db/ledger-store.ts->server/src/db/observability.ts server/src/db/ledger-store.ts->server/src/db/schema.ts server/src/db/match-repo.ts->shared/src/index.ts server/src/db/match-repo.ts->server/src/db/index.ts server/src/db/match-repo.ts->server/src/db/observability.ts server/src/db/match-repo.ts->server/src/db/schema.ts server/src/db/match-repo.ts->server/src/instrument.ts server/src/telemetry.ts telemetry.ts server/src/db/match-repo.ts->server/src/telemetry.ts server/src/event-bus.ts->server/src/instrument.ts server/src/instrument.ts->shared/src/index.ts server/src/loadEnv.ts loadEnv.ts server/src/instrument.ts->server/src/loadEnv.ts server/src/otel-config.ts otel-config.ts server/src/instrument.ts->server/src/otel-config.ts server/src/match.ts->shared/src/index.ts server/src/match.ts->engine/src/index.ts server/src/match.ts->server/src/achievements/index.ts server/src/match.ts->server/src/analysis.ts server/src/match.ts->server/src/db/ledger-store.ts server/src/match.ts->server/src/db/match-repo.ts server/src/match.ts->server/src/instrument.ts server/src/match.ts->server/src/metrics.ts server/src/config.ts config.ts server/src/match.ts->server/src/config.ts server/src/connection-tracker.ts connection-tracker.ts server/src/match.ts->server/src/connection-tracker.ts server/src/cosmetics.ts cosmetics.ts server/src/match.ts->server/src/cosmetics.ts server/src/ladder.ts ladder.ts server/src/match.ts->server/src/ladder.ts server/src/match-actor.ts match-actor.ts server/src/match.ts->server/src/match-actor.ts server/src/match-types.ts match-types.ts server/src/match.ts->server/src/match-types.ts shared/src/hash.ts hash.ts server/src/match.ts->shared/src/hash.ts server/src/match-integrity.ts match-integrity.ts server/src/match.ts->server/src/match-integrity.ts server/src/utils/spectator-delay.ts spectator-delay.ts server/src/match.ts->server/src/utils/spectator-delay.ts server/src/utils/viewer-projection.ts viewer-projection.ts server/src/match.ts->server/src/utils/viewer-projection.ts server/src/metrics.ts->server/src/observability.ts server/src/routes/auth.ts->shared/src/index.ts server/src/routes/auth.ts->server/src/db/index.ts server/src/routes/auth.ts->server/src/db/observability.ts server/src/routes/auth.ts->server/src/db/schema.ts server/src/routes/auth.ts->server/src/tracing.ts server/src/routes/auth.ts->server/src/utils/openapi.ts server/src/content-filter.ts content-filter.ts server/src/routes/auth.ts->server/src/content-filter.ts server/src/db/user-repo.ts user-repo.ts server/src/routes/auth.ts->server/src/db/user-repo.ts server/src/demo-mode.ts demo-mode.ts server/src/routes/auth.ts->server/src/demo-mode.ts server/src/gamertag.ts gamertag.ts server/src/routes/auth.ts->server/src/gamertag.ts server/src/services/moderation-service.ts moderation-service.ts server/src/routes/auth.ts->server/src/services/moderation-service.ts server/src/utils/mailer.ts mailer.ts server/src/routes/auth.ts->server/src/utils/mailer.ts server/src/routes/discovery.ts->shared/src/index.ts server/src/routes/discovery.ts->engine/src/index.ts server/src/routes/discovery.ts->server/src/tracing.ts server/src/routes/discovery.ts->server/src/utils/openapi.ts server/src/routes/docs.ts->shared/src/index.ts server/src/http-aspect.ts http-aspect.ts server/src/routes/docs.ts->server/src/http-aspect.ts server/src/routes/health.ts->shared/src/index.ts server/src/routes/health.ts->server/src/db/index.ts server/src/routes/health.ts->server/src/db/observability.ts server/src/routes/health.ts->server/src/otel-config.ts server/src/routes/internal.ts->shared/src/index.ts server/src/routes/internal.ts->engine/src/index.ts server/src/routes/internal.ts->server/src/abTests.ts server/src/routes/internal.ts->server/src/db/index.ts server/src/routes/internal.ts->server/src/db/schema.ts server/src/routes/internal.ts->shared/src/hash.ts server/src/middleware/internal-auth.ts internal-auth.ts server/src/routes/internal.ts->server/src/middleware/internal-auth.ts server/src/routes/internal.ts->server/src/services/moderation-service.ts server/src/routes/ladder.ts->shared/src/index.ts server/src/routes/ladder.ts->server/src/db/index.ts server/src/routes/ladder.ts->server/src/db/observability.ts server/src/routes/ladder.ts->server/src/db/schema.ts server/src/routes/ladder.ts->server/src/utils/openapi.ts server/src/routes/ladder.ts->server/src/config.ts server/src/routes/ladder.ts->server/src/http-aspect.ts server/src/routes/ladder.ts->server/src/ladder.ts server/src/season.ts season.ts server/src/routes/ladder.ts->server/src/season.ts server/src/routes/matches.ts->shared/src/index.ts server/src/routes/matches.ts->engine/src/index.ts server/src/routes/matches.ts->server/src/db/match-repo.ts server/src/routes/matches.ts->server/src/match.ts server/src/routes/matches.ts->server/src/tracing.ts server/src/routes/matches.ts->server/src/utils/openapi.ts server/src/routes/matches.ts->server/src/cosmetics.ts server/src/routes/matches.ts->shared/src/hash.ts server/src/routes/matches.ts->server/src/utils/viewer-projection.ts server/src/utils/redaction.ts redaction.ts server/src/routes/matches.ts->server/src/utils/redaction.ts server/src/routes/matchmaking.ts->shared/src/index.ts server/src/routes/matchmaking.ts->server/src/db/match-repo.ts server/src/routes/matchmaking.ts->server/src/match.ts server/src/routes/matchmaking.ts->server/src/tracing.ts server/src/routes/matchmaking.ts->server/src/utils/openapi.ts server/src/ratings.ts ratings.ts server/src/routes/matchmaking.ts->server/src/ratings.ts server/src/routes/profiles.ts->shared/src/index.ts server/src/routes/profiles.ts->server/src/db/schema.ts server/src/routes/profiles.ts->server/src/achievements/service.ts server/src/routes/profiles.ts->server/src/utils/openapi.ts server/src/routes/profiles.ts->server/src/http-aspect.ts server/src/routes/profiles.ts->server/src/ratings.ts server/src/routes/social.ts->shared/src/index.ts server/src/routes/social.ts->server/src/db/match-repo.ts server/src/routes/social.ts->server/src/utils/openapi.ts server/src/routes/social.ts->server/src/content-filter.ts server/src/routes/social.ts->server/src/db/user-repo.ts server/src/routes/social.ts->server/src/http-aspect.ts server/src/routes/social.ts->server/src/services/moderation-service.ts server/src/routes/spectator.ts->shared/src/index.ts server/src/routes/spectator.ts->server/src/db/match-repo.ts server/src/routes/spectator.ts->server/src/tracing.ts server/src/routes/spectator.ts->server/src/utils/openapi.ts server/src/routes/stats.ts->shared/src/index.ts server/src/routes/stats.ts->engine/src/index.ts server/src/routes/stats.ts->server/src/db/match-repo.ts server/src/routes/stats.ts->server/src/utils/openapi.ts server/src/routes/stats.ts->server/src/http-aspect.ts server/src/routes/stats.ts->shared/src/hash.ts server/src/routes/store.ts->shared/src/index.ts server/src/routes/store.ts->server/src/db/index.ts server/src/routes/store.ts->server/src/db/schema.ts server/src/routes/store.ts->server/src/routes/matchmaking.ts server/src/routes/store.ts->server/src/cosmetics.ts server/src/tracing.ts->server/src/metrics.ts server/src/tracing.ts->server/src/observability.ts server/src/ws-handler.ts->shared/src/index.ts server/src/ws-handler.ts->server/src/instrument.ts server/src/ws-handler.ts->server/src/match.ts server/src/ws-handler.ts->server/src/metrics.ts server/src/ws-handler.ts->server/src/tracing.ts server/src/matchmaking-queue.ts matchmaking-queue.ts server/src/ws-handler.ts->server/src/matchmaking-queue.ts server/src/config.ts->shared/src/index.ts server/src/connection-tracker.ts->shared/src/index.ts server/src/cosmetics.ts->shared/src/index.ts server/src/cosmetics.ts->server/src/db/index.ts server/src/cosmetics.ts->server/src/db/schema.ts server/src/db/check-migrations.ts check-migrations.ts server/src/db/check-migrations.ts->server/src/loadEnv.ts server/src/db/migrations.ts migrations.ts server/src/db/check-migrations.ts->server/src/db/migrations.ts server/src/db/migrations.ts->shared/src/index.ts server/src/telemetry.ts->shared/src/index.ts server/src/telemetry.ts->server/src/instrument.ts server/src/telemetry.ts->server/src/observability.ts server/src/db/migrate.ts migrate.ts server/src/db/migrate.ts->server/src/loadEnv.ts server/src/db/migrate.ts->server/src/db/migrations.ts server/src/db/user-repo.ts->server/src/db/index.ts server/src/db/user-repo.ts->server/src/db/observability.ts server/src/db/user-repo.ts->server/src/db/schema.ts server/src/db/user-repo.ts->server/src/config.ts server/src/elo.ts elo.ts server/src/gamertag.ts->shared/src/index.ts server/src/gamertag.ts->server/src/content-filter.ts server/src/http-aspect.ts->server/src/db/index.ts server/src/http-aspect.ts->server/src/tracing.ts server/src/http-aspect.ts->server/src/db/user-repo.ts server/src/index.ts index.ts server/src/index.ts->server/src/app.ts server/src/index.ts->server/src/instrument.ts server/src/index.ts->server/src/config.ts server/src/index.ts->server/src/content-filter.ts server/src/index.ts->server/src/db/check-migrations.ts server/src/index.ts->server/src/loadEnv.ts server/src/ladder-simulation.ts ladder-simulation.ts server/src/ladder-simulation.ts->server/src/elo.ts server/src/ladder.ts->server/src/db/index.ts server/src/ladder.ts->server/src/db/observability.ts server/src/ladder.ts->server/src/db/schema.ts server/src/ladder.ts->server/src/config.ts server/src/ladder.ts->server/src/elo.ts server/src/ladder.ts->server/src/ratings.ts server/src/ladder.ts->server/src/season.ts server/src/ratings.ts->server/src/db/index.ts server/src/ratings.ts->server/src/db/observability.ts server/src/ratings.ts->server/src/db/schema.ts server/src/ratings.ts->server/src/achievements/service.ts server/src/ratings.ts->server/src/elo.ts server/src/season.ts->server/src/db/index.ts server/src/season.ts->server/src/db/observability.ts server/src/season.ts->server/src/db/schema.ts server/src/match-actor.ts->shared/src/index.ts server/src/match-actor.ts->engine/src/index.ts server/src/match-actor.ts->server/src/instrument.ts server/src/match-actor.ts->server/src/telemetry.ts server/src/match-actor.ts->server/src/match-types.ts server/src/observability/panoramic.ts panoramic.ts server/src/match-actor.ts->server/src/observability/panoramic.ts server/src/match-actor.ts->shared/src/hash.ts server/src/match-integrity.ts->server/src/instrument.ts server/src/match-integrity.ts->shared/src/hash.ts server/src/utils/spectator-delay.ts->shared/src/index.ts server/src/utils/spectator-delay.ts->engine/src/index.ts server/src/utils/spectator-delay.ts->shared/src/hash.ts server/src/utils/viewer-projection.ts->server/src/cosmetics.ts server/src/utils/projection.ts projection.ts server/src/utils/viewer-projection.ts->server/src/utils/projection.ts server/src/matchmaking-queue.ts->server/src/config.ts server/src/ops/reset-admin-password.ts reset-admin-password.ts server/src/ops/reset-admin-password.ts->server/src/db/index.ts server/src/ops/reset-admin-password.ts->server/src/db/schema.ts server/src/services/moderation-service.ts->server/src/db/index.ts server/src/services/moderation-service.ts->server/src/db/schema.ts server/src/services/moderation-service.ts->server/src/config.ts server/src/services/moderation-service.ts->server/src/content-filter.ts server/src/utils/mailer.ts->server/src/config.ts server/src/utils/redaction.ts->engine/src/index.ts server/src/utils/redaction.ts->shared/src/hash.ts server/src/utils/projection.ts->engine/src/index.ts shared/src/protocol.ts->shared/src/schema.ts shared/src/run-evidence.ts run-evidence.ts shared/src/schema.ts->shared/src/run-evidence.ts shared/src/types.ts types.ts
Live Tournament & Demonstration Domains & Ports Accessibility Matrix
Service TargetPortDNS StatusHost LAN BindLive ProbeTournament VerdictAction
Game Client (TLS) :443 MATCH * (LAN) 200 OK (2.1ms) READY Ready for tournament duelists.
Game Client (HTTP) :80 MATCH * (LAN) 200 OK (2.1ms) READY Ready for tournament duelists.
Game Server (Direct) :3001 MATCH * (LAN) 200 OK (2.1ms) READY Ready for tournament duelists.
Demo Presentation :443 MATCH * (LAN) 200 OK (2.1ms) READY Ready for tournament duelists.
Demo Cockpit Bridge :3333 MATCH 127.0.0.1 (Loc) 200 OK (2.1ms) READY Ready for tournament duelists.
Admin Console :443 MATCH * (LAN) 200 OK (2.1ms) READY Ready for tournament duelists.
Vite Dev Server :5173 MATCH 127.0.0.1 (Loc) 200 OK (2.1ms) READY Ready for tournament duelists.
PostgreSQL Database :5432 MATCH 127.0.0.1 (Loc) 200 OK (2.1ms) READY Ready for tournament duelists.
OTel Collector :4318 MATCH 127.0.0.1 (Loc) 200 OK (2.1ms) READY Ready for tournament duelists.
OpenObserve (o2) :5080 MATCH 127.0.0.1 (Loc) 200 OK (2.1ms) READY Ready for tournament duelists.
Jaeger UI :16686 MATCH 127.0.0.1 (Loc) 200 OK (2.1ms) READY Ready for tournament duelists.
โš”๏ธ 1. Column Cascade & Suit Boundary Map 15-Second Rules Visual
Front Attacker
โ™ฃ / โ™  amplify offense
โ†’
Opposing Front Card
Absorbs first
โ†’ โ™ฆ โ†’
Opposing Back Card
โ™ฆ Diamond boundary absorbs spillover
โ†’ โ™ฅ โ†’
Opponent Life Points
โ™ฅ Heart boundary cushions ยท 0 LP = Win

In Classic mode, surviving cards reset to full health between turns; in Cumulative mode, chip damage persists.

๐Ÿชœ 2. Player Skill Ladder & Mode Journey 8 Bot Tiers + Ranked PvP
1. Guest Quick Start
Zero-friction browser play
2. Scout โ†’ Grunt
Random โ†’ Heuristic training
3. Soldier (MCTS 100)
Plans 1โ€“2 turns ahead
4. Specialist Bots
Veteran ยท Destroyer ยท Sentinel ยท Blitz
5. Champion (MCTS 1000)
Tournament-grade apex AI
6. Ranked PvP & LAN
4 Elo ladders ยท Spectator casting
๐Ÿ”„ 3. Player-Friendly 5-Step Turn Loop Source: docs/system/AUDIENCE_DIAGRAMS.md
1. Deploy (Hand โ†’ 2ร—4 Grid) โ†’ 2. Attack or Pass โ†’ 3. Column Cascade โ†’ 4. Reinforce & Draw โ†’ 5. Victory Check (0 LP / Forfeit / Pass Limit)
EXHAUSTIVE COMBAT PROOFS
2,355,388
+ 71 rule evidence checks
ENGINE P99 LATENCY
0.225 ms
6,259 actions/s in-process
CLIENT SURFACES
4 + LAN
Web ยท Go CLI ยท MCP ยท Offline LAN
TUTORIAL PIPELINE
22 Episodes
10 Shorts 9:16 ยท 12 Long 16:9
SECURITY & BOUNDARIES
0 / 0
0 HIGH/CRIT CVEs ยท 0 dep violations
๐Ÿ›๏ธ Platform Moat: One Engine โ†’ Many SurfacesLow COGS

Pure deterministic TypeScript engine powers React Web, Go duel-cli, MCP AI agents, and zero-cloud-cost LAN tournament hosting from one OpenAPI/AsyncAPI contract.

@phalanxduel/engine (0.225ms p99)
  โ”œโ”€โ–ถ Web Client (play.phalanxduel.com)
  โ”œโ”€โ–ถ Go duel-cli (REST + WS ACK replay)
  โ”œโ”€โ–ถ MCP Server & Autonomous Bots
  โ””โ”€โ–ถ Offline-Capable LAN Tournament Host
๐Ÿ” Provable Fair-Play & Esports Trust ChainTournament Ready

Server-authoritative transitions, hidden-hand redaction, spectator delay, and canonical SHA-256 per-turn hash chains make every match publicly auditable.

Action โ†’ MatchActor (Authoritative)
  โ”œโ”€โ–ถ Redacted Projection โ†’ Spectator Delay
  โ””โ”€โ–ถ SHA-256 Hash Chain โ†’ GET /api/matches/:id/verify
๐Ÿ“ˆ Acquisition, Retention & Monetization FlywheelNon-P2W

Automated content distribution feeds frictionless guest play, deep competitive retention, and ethical cosmetic/venue monetization.

Acquire: 22 YouTube Tutorials + Battle Calculator + LAN QR
Retain:  4 Elo Ladders + 19 Rarity Achievements + Dual Loop
Revenue: Cosmetic Cardbacks + Supporter Pass (Stripe) + Venue Kits
๐Ÿ›ก๏ธ Assurance Pyramid & Automated Content EngineDue Diligence

Production discipline verified continuously in CI plus automated Playwright + Zoe TTS + media-pipeline video generation.

Proofs: 2.35M Combat Oracle ยท fast-check ยท Stryker Mutation
Maps:   Groma C4 ยท Graphify (12.7k nodes) ยท OTel + Jaeger
Media:  Playwright โ†’ FFmpeg EBU R128 โ†’ media-pipeline staged/