ChrisChen667788/office-zoo
About
🐹OFFICE ZOO · 班味剧场 — 让 9 名 AI 鼠人替你狠狠去下班味精神倍增!AI 自演的职场狼人杀模拟器,3 种玩法 / 真人 TTS / 可玩可学的劳动法闯关
Games & EmulationMeasured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.en.md
Original
Midnight at the office — AI rats clock in, so you can clock out.
A company just got fired. Nine AI employees stayed late. You're the HR staring at the KPI screen — pick a mode, enjoy the show.
简体中文 · English · 📱 WeChat Mini-Program
"Can't grind harder, can't lie flat — let the AIs grind for you."
v6.2 · miHoYo-style storyboard + real gameplay, 30s composite · story-only · gameplay-only
Four ways to play
| Mode | One-liner | |
|---|---|---|
| 🏢 | Office Zoo Classic | 2.5D floor plan, 9 rat-people slack + scheme + backstab |
| 🎤 | Hot Mic | Real-voice TTS reads every "we need more granularity" out loud |
| ⚖️ | You're Fired | 1v1 vs HR, 5 chapters of PRC Labor Contract Law speed-run |
| 🍺 | Late-Night Bar (v6.2) | 2 a.m. lo-fi, 1v1 drinks + workplace venting with an AI rat |
Plus side modes: 🔮 daily fortune · 🎤 stand-up · 🤝 squad · 📜 7-day history · ⭐ UGC bits · 🏢 Company Packs (v6.37) · 🎁 Banwei Wrapped (v6.39)
🏗️ System Architecture
Data flows along the dashed lines — the three diagrams below are animated SVG (gold dots = data packets in motion; GitHub auto-plays them, no JS).
System architecture · spectator → server → engine → agent → LLM, broadcast back over Socket.IO
PSYWAR loop · spectator tactical @ → AI hears → AI quotes → Banwei score +6 (sequence)
Company Pack data loop · create → persist → share → coworker joins → roster override → Banwei check-in → leaderboard → your-company Top
🌟 v6.161 → v6.169 · Playable in the browser: bring your own model key + the baseline for going public
The product itself does not provide a model API. In the hosted version every AI line is generated with your own model key, billed to your own provider account; the server only relays it in memory and never stores or logs it. No key? You can still watch a sample game.
- 🔑 Bring your own key (BYOK) (v6.167) — click "🔑 Model" on the home page, pick a provider, paste a key, test the connection, play. Presets for DeepSeek / SiliconFlow / Kimi / Zhipu / Qwen / Doubao / OpenRouter / OpenAI / MiniMax with sign-up links and a per-game cost estimate (a classic game is roughly 20–35k tokens). The key stays in the current tab by default; voices use the browser's speech engine unless you opt in to a provider TTS.
- 🐳 One container (v6.165→v6.166) —
docker buildgives you an image that serves the page, the API and real-time games on a single port. Icons and portraits ship with the repo, so the server needs no keys at all. Deployment guide:docs/DEPLOY.md(Chinese). - 🛡 Public-internet baseline (v6.162) — cross-site origin allowlist, auth on memory deletion, TTS rate limit, real client IP for rate limiting, SSRF guard for custom model endpoints.
- 🏷 AI-generated content labels (v6.164) — site-wide notice, badges on AI content, per-frame watermark plus end card on exported videos; the "Fired" chats state they are not legal advice.
- 🎬 Export stand-up bits as short videos (v6.169) — portrait + line-by-line subtitles + voice, vertical or landscape, share straight to apps.
- ⚡ "Fired" first + 5-minute speedrun (v6.169) — the labor-law mode is now the first card, and a hero button drops you into level 1.
- 📊 Measurable (v6.161, v6.163) — GitHub Actions CI; optional Umami analytics (no third-party script unless configured); model-call failures counted by cause.
| 🔑 Bring your own key | 🎬 Short-video export |
|---|---|
![]() |
![]() |
🌟 v6.132 → v6.160 · Take a seat as a rat + AIs that speak English / Japanese / Korean
From "watching the AIs play" to "playing alongside them": claim a rat's seat and speak, vote and get laid off yourself — or start an all-English big-tech-jargon game.
- 🪑 Humans in the rat seats (v6.151→v6.155, Phase C) — claim a seat and you get a private identity card; a countdown speech box opens during discussion and a ballot during voting. Miss the timer and that seat's AI plays for you. AIs always keep the majority (cap
min(3, ⌊players/3⌋)), and leaving, closing the tab or disconnecting hands the seat back to the AI. - 🎙 Voice input (v6.151) — talk instead of type in both the guest bar and the seat speech box; the transcript lands in the input (never auto-sent), and the mic button hides itself on browsers without speech recognition.
- 🌐 AIs speak the game's language (v6.156→v6.157, Phase G) — English games switch to big-tech framing (PIP, stack-rank, RIF, "let's take this offline"), with English personas for all 9 personalities; Japanese and Korean games add local workplace-slang packs. The Chinese game is locked by 51 golden-snapshot prompts — unchanged byte for byte.
- ⚖️ Labor-law crash courses, batches 2 & 3 (v6.136→v6.139, v6.158) — bonus clawback right before payday, demotion pay cut, pregnancy "performance" trap, background-check threats, pre-Spring-Festival mass layoff, offer revoked before day one, dispatched worker "returned", Singles' Day overtime. Seasonal scenarios only headline the lobby while they're in season.
- 🏆 Spectator polish, wave 3 (v6.142→v6.147) — spectator-first phase hints, 3 new achievements, company battle report on the replay page, dedicated icons for Company Clash and Talkshow.
- 🧪 v6.160 wrap-up — 4 integration-review findings plus 11 from a four-dimension follow-up review (engine / socket / locale / content) fixed: late prompts no longer overwrite the current round, prompt boxes clear at game over, the 👤 marker appears the moment a seat is claimed, in-progress votes are no longer leaked mid-vote, English games no longer get Chinese text injected into AI prompts (guest tags, event log, company-pack memories, hot-quote seeds), and two labor-law numbers corrected. Real two-client Socket.IO integration tests; every fix mutation-checked.
🌟 v6.86 → v6.131 · Company Clash + spectators at the table + Gen-Z reskin
Two AI companies battling on one map, spectators betting / intervening / steering the plot for real, humans joining as sideline guests, and a full miHoYo-style visual pass — "watching" leveled up into "playing".
- ⚔️ Company Clash mode (v6.85→v6.93) — 4v4, two companies each hiding 1 mole: a market-share tug-of-war bar, cross-company poaching (the mole keeps their secret identity when they defect!), smear campaigns (half-true rumor warfare feeding the vote), and a company battle-report share card. Win matrix: monopoly > wipeout > both-moles-down > round cap.
- 🎤 Humans at the table (v6.124→v6.131, Phase C) — claim one of four sideline roles (Human HR / union rep / gossip lawyer / reporter) and your messages are injected into the AI discussion prompts with attribution. AIs must respond — if the Human HR calls someone out, they answer. Invite friends into the same room with one link.
- 🎰 Full spectator economy (v6.93→v6.96) — ghost votes + your own "🤥 they're acting" reads reshape the odds in real time; rejected interventions refund chips with a real reason; settle-history panel; mobile bottom-sheet betting bar.
- 🎨 Gen-Z visual pass (v6.98→v6.101) — gradient-mesh backgrounds everywhere, phase capsule cycling elemental colors (frost lobby → inferno meeting → void roast → solar vote), hexagonal stigma mode cards, GameMap recentered with room floors decoupled from faction colors.
- 🖼️ Portrait system (v6.98→v6.100) — 24 AI-illustrated workplace archetype portraits, 3 villain HR portraits for the negotiation mode, and a 7th talkshow persona "😎 The Disruptor" (Gen-Z workplace rebel). Image-to-video living-portrait pipeline ready (MiniMax Hailuo i2v).
- ⚖️ Labor-law scenario pack (v6.116→v6.119) — PUA'd into "voluntary resignation" / age-35 "restructuring" / non-compete trap / 996 overtime clawback — each round is a crash course in Chinese labor law.
- 🧪 Three adversarial audit sweeps (v6.93→v6.122) — 40+ confirmed findings shipped: onboarding overhaul, skippable elimination reveal, chip-based psy-war UI, grudge-dot discovery, dedicated clue card, leave-page confirm… 561 vitest green · main bundle −56% via route-level code-splitting.
🌟 v6.37 → v6.42 · Bring your coworkers into the game
Company Packs + cross-spectator leaderboard + year-end Wrapped — "work-fatigue" grows from a personal experience into a social loop.
- 🏢 Company Packs (v6.37→v6.41) — define "our company's 6-12 NPCs" (name + role + personality + emoji avatar), save as a private pack. Share a link → coworkers open the same
?pack=game → AI rats use your names, with the custom avatars rendered across GameMap, the elimination reveal, and the recap. - 🏆 Cross-spectator leaderboard (v6.36→v6.38) — public global Top-10 Banwei board + region/industry filters + "🏢 your-company Top", one-tap 1080×1350 leaderboard share card.
- 🎁 Banwei Wrapped (v6.39→v6.40) — Spotify-Wrapped-style year recap: peak week / average / trend / leak hit-rate / achievements / year persona, export to poster.
- 🔥 Hot-quote → game-world loop (v6.33→v6.36) — spectators submit workplace one-liners → nomination-weighted bias → AI rats are more likely to "cast" a nominated name next game, with a 🔥 badge on GameMap.
- 🧪 Quality — 327 vitest green · clean typecheck · Playwright visual probes for the Wrapped card + animated diagrams.
✨ What's new in v2.x → v3.0 (May 2026)
Turning "your work-fatigue persona" into an evolving, shareable, replayable identity system.
- 🪪 24-archetype catalogue (v2.0.0) — SOE Lifer / FAANG Cog / Startup Veteran / Finance Suit / EdTech Survivor / MCN Hustler / Beijing Drifter / Shanghai Yuppie / Shenzhen Money-chaser / Hangzhou Tech Youth / Chengdu Zen-Slacker / Overseas Escapee — plus the original 12 behavioral archetypes from v1.3
- 🌀 Archetypes evolve (v1.5.1 + v2.0.1 + v2.0.2) — every fired chat / squad / talkshow segment / pack completion drifts your 6-trait vector; drift enough and your top archetype flips ("🌀 You evolved into a new persona")
- 🎬 Daily-drama share card (v1.5.0) — 1080×1350 IG-portrait PNG, one-tap copy or download; renders in teaser mode or result mode (with grade + comp ratio baked in)
- 🏢 Tribe-aware recommendations (v2.1.0 + v2.3.0) — FAANG users get FAANG scenarios; Shanghai users get Lujiazui talkshow bits; Hangzhou users get the "my code-name is 'Wu-Ji'" segment
- 🎭 Chemistry-aware director (v3.0.0) — squad director now reads the full archetype mix and writes culture-clash arcs (SOE + FAANG = "iron rice bowl meets OKR speak"), group-portrait arcs (all Beijing drifters), or rival-pair arcs (Grinder + Anti-grinder eye-acting from act 1)
- 🎙️ Per-beat multi-voice (v1.4.2) — every squad-act beat plays with the speaker's own archetype voice (sultry sister / dominator / earnest junior) — no voice repetition across a 5-act drama
- 🌐 i18n for new 12 (v2.2.0) — Profile cards localized in zh/en/ja/ko including translations of region-specific jokes
What it does
- 🗣️ Authentic workplace rants — "Who's the owner on this? Granularity isn't tight enough — let's align the underlying logic first."
- 🔪 Capitalists optimize coworkers — each round, the C-suite quietly schedules someone for a "graduation"
- 🗳️ Town hall + voting — 8 rats around a table, going at it live via voice TTS
- 👻 Ghosts keep meddling — eliminated players unlock "labor arbitration tickets" to fight back through channels
Why star?
- 🎨 35+ AI portraits + 23 character avatars — fully procedural anime art, zero emoji filler
- 🎙️ 23 character-specific voices — naive boy / sultry woman / domineering CEO / PUA master — one round feels like binging a workplace mini-drama
- 📚 Real legal teaching — each chapter cites an article of the PRC Labor Contract Law (Articles 21 / 35 / 41 / 42 / 50); clearing unlocks a knowledge card
- 🎯 Memory layer (v0.8.2) — re-play a scenario and the HR remembers what tactics you used last time, pre-empts your moves
- 📦 UGC — write your own talkshow bits, compose 5-scenario challenge packs, share with a link
- 🤝 PvP rooms (v0.9.3) — invite a friend to play HR with PUA tactic chips, you negotiate live
- 👑 Premium Pack (v1.0.0) — 6 FAANG layoff scenarios (Twitter Purge, Meta efficiency year, Amazon RTO, Apple PM, Google reorg, Startup cliff dump) with US/UK labor law playbook
- 🏢 Enterprise (v1.1.0) — white-label iframe embed for law firms (consultation lead-capture) and HR training vendors (procedural-compliance sandbox)
Quick start
git clone https://github.com/ChrisChen667788/office-zoo
cd office-zoo
npm install
cp .env.example .env # fill in QINGYUN_API_KEY (or OPENAI_API_KEY) + MINIMAX_API_KEY
npm run dev # client on :5173, server on :3100, WS on :3101
Then open http://localhost:5173 and pick a mode.
API keys you need
| Service | Used for | How to get |
|---|---|---|
| QingYun (or OpenAI) | Chat LLM — drives every HR/employee dialogue + scoring | qingyuntop.top or platform.openai.com |
| Minimax | Real-voice TTS (the killer feature) | minimaxi.com |
Both have free trials. You can also skip .env and paste your own key in the page ("🔑 Model"); it takes precedence for your requests.
Self-host the public version (no model keys on the server; visitors bring their own):
docker build -t office-zoo .
docker run --rm -p 8080:8080 -v office-zoo-data:/data office-zoo
The product degrades gracefully:
- LLM down? Falls back from QingYun → Minimax-M2 → canned responses.
- TTS down? Falls back from Minimax → Qingyun → browser Web Speech API.
Architecture deep-dive
The fallback chains that keep the show running even when a provider dies:
LLM: QingYun gpt-4o-mini → Minimax-M2 → canned responses
TTS: Minimax speech-2.8-hd → Qingyun /audio/speech → browser Web Speech
Image: flux-schnell → doubao-seedream → qwen-image → gpt-image-1 → minimax:image-01
(For the full data flow, see the animated diagrams at the top.)
Roadmap (where we are)
Full per-version "why / what / verified" notes in
docs/CHANGELOG.md.
✅ v0.6-v0.9 Isometric floor + activity tick / talkshow / UGC + HR memory / packs + PvP
✅ v1.0 Premium paywall + 6 FAANG layoff scenarios
✅ v1.1 B2B white-label embeds + HR training mode
✅ v1.2 Internationalization (zh-CN / en-US / ja-JP / ko-KR)
✅ v1.3 Identity quiz + 12 archetypes + Y2K personality card
✅ v1.4 Squad mode + multi-voice + room history & leaderboard
✅ v1.5 Daily-drama share card + archetype evolution (single surface)
✅ v2.0.0 12 → 24 archetypes with region/industry tribes
✅ v2.0.1–.2 Evolution extended to squad / talkshow / pack completions
✅ v2.1 Tribe-aware fired-scenario recommendations
✅ v2.2 en/ja/ko translations for the new 12 archetypes
✅ v2.3 Region-tagged talkshow bits → daily drama picks city-flavored jokes
✅ v3.0 Chemistry-aware squad director — culture-clash + group-portrait + rival arcs
✅ v6.25-6.36 PSYWAR mind-games + Banwei index / hot-quotes / weekly report / leaderboard + mini-program
✅ v6.37-6.42 Company Packs (private NPC deploy) + cross-spectator leaderboard + Banwei Wrapped + animated diagrams
✅ v6.51 Real Stripe Checkout (replaces demo) + squad-director Sonnet A/B + cross-game pack memory + Wrapped email
✅ v6.52 Special-role abilities go live (HR investigate / union-rep protect, AI-driven) + core game-loop tests
✅ v6.53 Legal-counsel body-block + data-analyst OKR-leak — all in-rotation special roles now wired
✅ v6.54 🎬 Match replay — server-persisted timeline + deep-linkable replay page + Premium replay perk live
✅ v6.57-6.66 "Fired" roguelike card battles — tactic deck × HR counter matrix, relics, shop, tiered bosses, leaderboard
✅ v6.67-6.83 Show layer (portrait pop-ups / crowd danmaku / TTS crowd) + spectator betting bar + chip-bought interventions
✅ v6.85-6.93 ⚔️ Company Clash (4v4, moles, poaching, smear warfare) + spectator-economy closure + crash hardening
✅ v6.94-6.101 Living-portrait i2v pipeline + 4-step onboarding + Gen-Z visual pass (mesh / elemental phases / hex cards) + 27 portraits
✅ v6.102-6.122 20-version audit sweep (skippable reveals, leave-confirm, settle history, clue card, grudge dot…) + labor-law scenario pack
✅ v6.124-6.131 🎤 Phase C humans-at-the-table — claim HR/union/lawyer/reporter, your words enter AI prompts, AIs answer by name
✅ v6.132-6.150 README.en + launch kit refresh + 4-language mode cards / labor-law batch 2 + catalog regression net / spectator polish
✅ v6.151-6.155 🪑 Phase C deep end — humans take rat seats (private ID card, countdown speech & vote, AI stand-in on timeout) + 🎙 voice input
✅ v6.156-6.157 🌐 Phase G — AIs speak the game's language: English big-tech prompt set + Japanese / Korean flavor packs
✅ v6.158-6.160 Labor-law batch 3 + seasonal scenarios / integration-review fixes + public release sync
✅ v6.161-6.164 Stage 0 — CI / origin allowlist + memory-deletion auth + TTS rate limit / optional analytics / AI-content labels
✅ v6.165-6.168 Stage 1 — bundled assets / single-port Docker image + deploy guide / 🔑 BYOK (no model API provided) / sample-game plumbing
✅ v6.169 Line B — stand-up short-video export with per-frame AI watermark + "Fired" first with a 5-minute speedrun
🔜 next Deploy the hosted version; then (Nov 2026 revision) a no-key sample level for "Fired", AI SDK upgrade + streaming,
visible HR resistance, private clues for AI players, reveal ceremony — plan: docs/PRODUCT_REVIEW_2026-10.md (Chinese)
🙏 Acknowledgements
OFFICE ZOO stands on a stack of open-source AI + Web projects:
LLM & inference
- MiniMax —
speech-2.8-hdTTS /MiniMax-M2text /image-01portraits - Qwen / QingYunTop — domestic LLM backends + OpenAI-compatible multi-model routing
- OpenAI API spec — the whole project speaks OpenAI-compatible protocol, swap backends freely
- Multi-agent social-deduction architecture (per-rat persona + memory + prompt patch), inspired by the LLM-as-Agent / Generative Agents line of work
Backend · Frontend · Tooling
- Hono + Socket.IO · React + Vite + Zustand + Framer Motion
- glass-easel · Vitest + Playwright + git-cliff
Inspiration — Among Us / Werewolf / Spyfall, and every "let's embrace change" moment in a real office.
⭐ Star History
License
MIT — fork it, ship it, sell it. Just keep the LICENSE file.
Contributing
PRs welcome. Open issues for ideas. Read docs/DESIGN.md before submitting visual changes to keep the design system coherent across consumer + B2B surfaces.
git hooks (optional)
The repo ships a non-blocking pre-push hook: before each push it runs
git-cliff to list commits not yet written into
docs/CHANGELOG.md and prints a reminder — it only nags,
the push still goes through. Install it once:
npm run hooks:install # copies scripts/git-hooks/* into .git/hooks/
Silence it for a single push (e.g. a docs-only commit):
OFFICE_ZOO_SKIP_CHANGELOG_NUDGE=1 git push
Built with Claude Code · No webfonts, no analytics, no dark patterns.
Explore related projects
Loading…

