No description
  • Python 53.3%
  • Vue 31.2%
  • TypeScript 12.7%
  • Dockerfile 1.9%
  • JavaScript 0.4%
  • Other 0.5%
Find a file
unins0 514ff45465
All checks were successful
Build on commit / build (push) Successful in 12s
Test on commit / test (push) Successful in 13s
backend: fix model_dump(mode="json")
2026-04-18 23:58:25 +03:00
.forgejo/workflows ci: use venv 2026-04-18 23:58:19 +03:00
backend backend: fix model_dump(mode="json") 2026-04-18 23:58:25 +03:00
frontend nginx: add security headers and proxy timeouts 2026-04-17 09:42:12 +03:00
.gitignore add .gitignore 2026-04-18 23:55:53 +03:00
docker-compose.yml backend: add ws rate limiting, and timeout 2026-04-17 09:57:36 +03:00
LICENSE Initial commit 2026-04-10 13:40:22 +03:00
README.md Fallback deleted 2026-04-13 09:38:01 +03:00

bunker

minimal web edition of bunker.

stack

  • api: fastapi
  • web: vue 3, tailwind
  • ops: docker, nginx (alpine-slim)

run

nginx serves the SPA and proxies /api + /ws to the API container.

docker compose up -d

api

POST /api/create_room{"room_code":"AX8B7"}

websocket

path: /ws

client:

{"action":"join_room","room_code":"AX8B7","name":"alice"}
{"action":"join_room","room_code":"AX8B7","name":"alice","player_id":"abc12345"}
{"action":"start_game"}
{"action":"reveal_stat","stat_name":"phobia"}
{"action":"leave_room"}
{"action":"kick_player","target_id":"abc12345"}
{"action":"start_vote","target_id":"abc12345"}
{"action":"cast_vote","vote":"yes"}

Optional player_id reconnects the same seat together with the same name.

Without player_id, the server still reconnects to an existing seat when name matches a player who is not in online state (e.g. closed tab → disconnected, or after leave_roomleft). If that name is already taken by someone online, join is rejected. kicked names cannot rejoin.

Invite link (SPA): https://host/?room=AX8B7 — the client pre-fills the room code.

stat_name one of:

sex_age, gender, body_type, profession, health, hobby, phobia, large_inventory, backpack, extra_info

player display name = name from join_room (not a dealt card).

reveal adds stat to revealed_stats; server sends per-client room_state_update (others see null until revealed).

server:

{"event":"joined","payload":{"player_id":"…","room_code":"…"}}
{"event":"room_state_update","payload":{}}
{"event":"error","message":"…"}

data

json lists under backend/data/ (each file must exist and contain a non-empty JSON array).