{"id":31702127,"url":"https://github.com/stilliard/imposter","last_synced_at":"2025-10-08T21:12:00.230Z","repository":{"id":318197601,"uuid":"1070277097","full_name":"stilliard/imposter","owner":"stilliard","description":"Imposter - Social Deception Role Assignment. Add hidden imposter or traitor roles to any game. Transform cooperative board games, party games, or group activities by secretly assigning one player as the imposter, thief, saboteur, or traitor.","archived":false,"fork":false,"pushed_at":"2025-10-05T19:28:25.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T19:30:26.881Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stilliard.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-05T16:11:16.000Z","updated_at":"2025-10-05T19:28:28.000Z","dependencies_parsed_at":"2025-10-05T19:30:45.588Z","dependency_job_id":"643de79a-5502-4e63-bab3-d75e1ba63ffe","html_url":"https://github.com/stilliard/imposter","commit_stats":null,"previous_names":["stilliard/imposter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/stilliard/imposter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilliard%2Fimposter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilliard%2Fimposter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilliard%2Fimposter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilliard%2Fimposter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stilliard","download_url":"https://codeload.github.com/stilliard/imposter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stilliard%2Fimposter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000715,"owners_count":26082837,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-08T21:11:58.769Z","updated_at":"2025-10-08T21:12:00.215Z","avatar_url":"https://github.com/stilliard.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Imposter - Social Deception Role Assignment\n\nAdd hidden imposter or traitor roles to any game. Transform cooperative board games, party games, or group activities by secretly assigning one player as the imposter, thief, saboteur, or traitor.\n\n**Examples**: Play Monopoly with a secret thief stealing money, or any co-op game where one player secretly works against the group.\n\n## Features\n\n- 🎮 Retro pixel art aesthetic with CRT scanlines\n- 🎭 Random imposter selection\n- 🔒 Secure room-based gameplay\n- 📱 Mobile responsive\n- ⚡ Real-time multiplayer with WebSockets\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run development (client on :3000, server on :3001)\nnpm start\n\n# Or run separately\nnpm run dev     # Client only\nnpm run server  # Server only\n```\n\n## Production Deployment\n\n### Environment Variables\n\nCreate a `.env` file (see `.env.example`):\n\n```bash\n# Server\nCORS_ORIGIN=https://yourdomain.com\nPORT=3001\n\n# Client (for build)\nVITE_SOCKET_URL=https://yourdomain.com\n```\n\n### Build \u0026 Deploy\n\n```bash\n# Build client\nnpm run build\n\n# Run production server\nnpm run server:prod\n```\n\n### Digital Ocean Setup\n\n1. **Create Droplet** (Ubuntu recommended)\n2. **Install Node.js** (v20+)\n3. **Clone repo and install dependencies**\n4. **Set environment variables**\n5. **Build client**: `npm run build`\n6. **Serve built files**: Use nginx/Apache to serve `dist/` folder\n7. **Run server**: Use PM2 or systemd to run `npm run server:prod`\n\n### Systemd Service\n\nCreate `/etc/systemd/system/imposter.service`:\n\n```ini\n[Unit]\nDescription=Imposter Game Server\nAfter=network.target\n\n[Service]\nType=simple\nUser=andrew\nWorkingDirectory=/srv/imposter\nEnvironment=\"NODE_ENV=production\"\nExecStart=/bin/bash -c 'export PATH=/home/andrew/.nvm/versions/node/v20.19.5/bin:$PATH \u0026\u0026 npm run server:prod'\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen enable and start:\n```bash\nsudo systemctl enable imposter\nsudo systemctl start imposter\n```\n\n### Nginx Example\n\n```nginx\nserver {\n    listen 80;\n    server_name imposter.stapps.io;\n\n    # Serve client build\n    location / {\n        root /srv/imposter/dist;\n        try_files $uri $uri/ /index.html;\n    }\n\n    # Proxy WebSocket/API to Node server\n    location /socket.io/ {\n        proxy_pass http://localhost:3001;\n        proxy_http_version 1.1;\n        proxy_set_header Upgrade $http_upgrade;\n        proxy_set_header Connection \"upgrade\";\n        proxy_set_header Host $host;\n    }\n}\n```\n\n### Cloudflare\n\nWebSockets work fine through Cloudflare. No special configuration needed.\n\n## Security Features\n\n- ✅ Input validation (20 char max, alphanumeric only)\n- ✅ Rate limiting (2s cooldown on room creation)\n- ✅ Room size limits (max 10 players)\n- ✅ Host validation (only host can start game)\n- ✅ Stale room cleanup (30min inactivity timeout)\n- ✅ Memory leak prevention\n- ✅ CORS protection\n\n## Tech Stack\n\n- **Frontend**: Preact, Signals, Socket.io-client, Vite\n- **Backend**: Node.js, Express, Socket.io\n- **Styling**: Custom CSS (retro/pixel art theme)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstilliard%2Fimposter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstilliard%2Fimposter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstilliard%2Fimposter/lists"}