{"id":28599060,"url":"https://github.com/webexsamples/lockout-game","last_synced_at":"2025-06-11T12:07:52.230Z","repository":{"id":291173066,"uuid":"947510098","full_name":"WebexSamples/lockout-game","owner":"WebexSamples","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-05T18:10:24.000Z","size":4231,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T18:44:45.416Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebexSamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-12T19:57:34.000Z","updated_at":"2025-05-02T20:53:17.000Z","dependencies_parsed_at":"2025-05-02T21:38:41.095Z","dependency_job_id":"00e2fdc9-aca7-47da-ad65-181d86c65d9b","html_url":"https://github.com/WebexSamples/lockout-game","commit_stats":null,"previous_names":["webexsamples/lockout-game"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebexSamples%2Flockout-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebexSamples%2Flockout-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebexSamples%2Flockout-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebexSamples%2Flockout-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebexSamples","download_url":"https://codeload.github.com/WebexSamples/lockout-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebexSamples%2Flockout-game/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259262610,"owners_count":22830560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-11T12:05:42.832Z","updated_at":"2025-06-11T12:07:52.220Z","avatar_url":"https://github.com/WebexSamples.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Lockout Game Header](./frontend/src/lockout.png)\n\n# 🔐 Lockout Game\n\n**Lockout** game — a Webex-integrated, real-time multiplayer word game inspired by _Codenames_, reimagined with a **hacker vs cybersecurity AI theme**.\n\nPlayers join teams, take on roles, ready up, and launch into a game session directly within a Webex meeting using **Socket.IO + LobbyContext-powered React frontend**.\n\n---\n\n## 🚀 Gameplay Theme – Lockout\n\nIn the digital underworld, two rival hacker groups — **Bluewave** and **Redshift** — compete to extract sensitive data from a hostile AI system known as **Sentinel**.\n\n- 🧠 **Hackers** (Team Leads): Give strategic clues\n- 🤖 **AI Agents** (Teammates): Decode clues and extract files\n- 💀 **Cybersecurity Traps**: One wrong guess, game over\n- 🕸 **Honeypots**: Decoys planted by Sentinel\n\nOnly one team will breach the vault. Will you outsmart the AI, or fall into its trap?\n\n---\n\n## 🧩 Architecture Overview\n\nThis frontend is a **Vite + React application** using:\n\n- **React Context API** (no Redux, no external state libraries)\n- **MUI v6** for component design\n- **Socket.IO** for real-time updates\n- **Webex Embedded Apps SDK** for user and meeting identity\n\n---\n\n## 🔧 Key Features\n\n| Feature                          | Description                                                                                                   |\n| -------------------------------- | ------------------------------------------------------------------------------------------------------------- |\n| 🔐 **LobbyContext**              | All lobby state (participants, roles, team, ready status) is managed globally via React Context               |\n| 🔄 **WebSocket Updates**         | All state changes are real-time via `Socket.IO`                                                               |\n| 💬 **Team Role Assignment**      | One Hacker per team; players can switch teams or roles                                                        |\n| ✅ **Ready Up System**           | Players mark themselves \"Ready\"; game won't start until conditions are met                                    |\n| 🗡 **Self-contained Components** | UI components like `LobbyDetails`, `LobbyParticipants`, and `LobbyActions` are all context-aware and reusable |\n| ⚡ **Hot Module Reload Safe**    | All context is split properly for HMR support                                                                 |\n\n---\n\n## 📚 How to Use `LobbyContext` in Components\n\n```js\nimport { useLobbyContext } from '../context/useLobbyContext';\n\nconst MyComponent = () =\u003e {\n  const {\n    lobby,\n    user,\n    joinLobby,\n    toggleReady,\n    isUserTeamLead,\n    updateDisplayName,\n  } = useLobbyContext();\n\n  return \u003cdiv\u003eWelcome, {user?.display_name}\u003c/div\u003e;\n};\n```\n\n\u003e Must be rendered within a `\u003cLobbyProvider lobbyId=\"...\" initialUser={...}\u003e` scope.\n\n---\n\n## 🧪 Developer Tip – Testing a Component in Isolation\n\n```jsx\nimport { LobbyContext } from '../context/LobbyContext';\n\n\u003cLobbyContext.Provider value={mockContextValue}\u003e\n  \u003cMyComponent /\u003e\n\u003c/LobbyContext.Provider\u003e;\n```\n\n---\n\n## 🎞 Game Start Conditions (Enforced by Backend)\n\n- ✅ **Each team has one Hacker (team lead)**\n- ✅ **Teams are balanced**\n- ✅ **All players are Ready**\n\nOptionally, the **Game Host** can use **Force Start** (bypasses balance check but not readiness).\n\n---\n\n## 📜 Contribution Notes\n\n- Use `Grid2` from `@mui/material` with the `size={{ xs, sm }}` prop.\n- Follow Prettier config:\n  ```json\n  {\n    \"singleQuote\": true,\n    \"tabWidth\": 2,\n    \"useTabs\": false,\n    \"semi\": true,\n    \"endOfLine\": \"auto\"\n  }\n  ```\n- All Python backend code is formatted via Ruff.\n- Context-based code is preferred over prop-drilling or hooks with duplicate state.\n\n---\n\nMade with ❤️ by the Webex Developer Relations Team\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebexsamples%2Flockout-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebexsamples%2Flockout-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebexsamples%2Flockout-game/lists"}