{"id":15682776,"url":"https://github.com/theOGognf/private_poker","last_synced_at":"2025-10-14T09:31:54.005Z","repository":{"id":257805488,"uuid":"822224919","full_name":"theOGognf/private_poker","owner":"theOGognf","description":"A poker library, server, client, and TUI.","archived":false,"fork":false,"pushed_at":"2025-10-06T00:09:39.000Z","size":2593,"stargazers_count":87,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-06T02:26:34.546Z","etag":null,"topics":["docker","poker","ssh","tui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theOGognf.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":"2024-06-30T16:21:03.000Z","updated_at":"2025-10-06T00:09:42.000Z","dependencies_parsed_at":"2024-09-30T14:19:52.109Z","dependency_job_id":"f2523469-064a-4941-8ba5-0c5caf88b94c","html_url":"https://github.com/theOGognf/private_poker","commit_stats":{"total_commits":346,"total_committers":3,"mean_commits":"115.33333333333333","dds":"0.020231213872832332","last_synced_commit":"322e26c42d775766ede40f572d36e99a594df409"},"previous_names":["theogognf/private_poker"],"tags_count":43,"template":false,"template_full_name":null,"purl":"pkg:github/theOGognf/private_poker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theOGognf%2Fprivate_poker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theOGognf%2Fprivate_poker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theOGognf%2Fprivate_poker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theOGognf%2Fprivate_poker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theOGognf","download_url":"https://codeload.github.com/theOGognf/private_poker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theOGognf%2Fprivate_poker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018630,"owners_count":26086404,"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-14T02:00:06.444Z","response_time":60,"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":["docker","poker","ssh","tui"],"created_at":"2024-10-03T17:01:24.786Z","updated_at":"2025-10-14T09:31:54.000Z","avatar_url":"https://github.com/theOGognf.png","language":"Rust","funding_links":[],"categories":["💻 Apps"],"sub_categories":["🕹️ Games and Entertainment"],"readme":"![Demo][0]\n\n\u003cdiv align=\"center\"\u003e\n    \u003ci\u003eA poker library, server, client, and TUI.\u003c/i\u003e\n\u003c/div\u003e\n\n# 🃟 pri♦ate_p♡ker 🃏︎\n\n- Wanting to play poker but only have a computer and no playing cards?\n- Having a slow day at work and in need of something to pass the time\n  with your coworkers?\n- Managing an entirely legal gambling ring and in need of a secure,\n  private, and easy-to-use solution for running poker games?\n\nIf you answered \"yes\" to any of these rhetorical questions, then this project\nis for you! Host and manage a poker game from the comfort of your computer\nwith **p**ri♦ate_**p**♡ker (or **pp** for short)! Get started with any of the\nfollowing artifacts:\n\n- [Library crate][7]\n- [Server crate][8]\n- [Client crate][9]\n- [Bots crate][10]\n- [All-in-one Docker image (recommended)][1]\n\n# Poker over `ssh`\n\nOne can host a server within a Docker container for the following benefits:\n\n- The server is ephemeral and more isolated from the host system\n- Client binaries don't need to be distributed to users\n- Users are managed by the container's user space\n- Server connections are managed by `ssh`\n\nHost and manage poker over `ssh` with the following commands:\n\n1. Run the container (two options):\n\n   - From source:\n\n     ```bash\n     docker build -t poker .\n     docker run -d --name poker -p $port:22 --rm poker\n     ```\n\n   - From [the official Docker image][1]:\n\n     ```bash\n     docker run -d --name poker -p $port:22 --rm ognf/poker:latest\n     ```\n\n2. Create a user:\n\n   ```bash\n   docker exec poker ./create_user $username\n   ```\n\n   This creates a user in the container's user space and adds the user\n   to a group that enables the user to send their own public `ssh` key\n   to the server.\n\n3. Users can then create an `ssh` key pair and copy their public key to\n   the server:\n\n   ```bash\n   ssh-keygen -q -t rsa -b 4096 -N \"\" -f ~/.ssh/poker_id_rsa\n   export PUBLIC_KEY=\"$(cat ~/.ssh/poker_id_rsa.pub)\"\n   ssh -i ~/.ssh/poker_id_rsa -o SendEnv=PUBLIC_KEY -p $port $username@$host\n   ```\n\n   On success, users should be greeted by the poker TUI. Users also no longer\n   have to specify the `SendEnv` option in subsequent `ssh` commands:\n\n   ```bash\n   ssh -i ~/.ssh/poker_id_rsa -p $port $username@$host\n   ```\n\n4. (Optionally) Create a tmux session in the container for managing poker bots:\n\n   ```bash\n   docker exec poker tmux new-session -d -s bots ./pp_bots\n   ```\n\n   You can reattach to the session to manage the bots with a TUI:\n\n   ```bash\n   docker exec -it poker tmux attach -t bots\n   ```\n\n5. Delete a user:\n\n   ```bash\n   docker exec poker ./delete_user $username\n   ```\n\n6. Stop the server:\n\n   ```bash\n   docker stop poker\n   ```\n\n# Poker without Docker\n\nThe poker over `ssh` Docker image is \u003c 40MB, but requires some additional\nuser management on the host's part. If you're playing a poker game in a\nlocal or private network, and all your users are familiar with `cargo`,\nit's less work to just use the poker binaries directly rather than using\nDocker and `ssh`.\n\nFrom source:\n\n- For the host, run the server binary:\n\n  ```bash\n  RUST_LOG=info cargo run --bin pp_server -r -- --bind $host\n  ```\n\n- For users, run the client binary:\n\n  ```bash\n  cargo run --bin pp_client -r -- $username --connect $host\n  ```\n\nFrom crates.io:\n\n- For the host, install and run the server:\n\n  ```bash\n  cargo install pp_server\n  RUST_LOG=info pp_server --bind $host\n  ```\n\n- For users, install and run the client:\n\n  ```bash\n  cargo install pp_client\n  pp_client $username --connect $host\n  ```\n\n# Project structure\n\nSee each subdirectory's docs or `README.md`s for more specific info.\n\n```bash\n.\n├── pp_admin        # Scripts and configs for managing the server within Docker\n├── pp_bots         # Bots binary source\n├── pp_client       # Client binary source\n├── pp_server       # Server binary source\n└── private_poker   # Library that the client and server use\n```\n\n# Non-goals\n\nI use this project to learn Rust and to play poker with friends\nand family. I'm probably disinterested in anything related to this\nproject that doesn't contribute to those goals. Specifically, the\nfollowing features are omitted from this project and left as an\nexercise for forkers:\n\n- Server orchestration or scaling\n- Persistent storage or backups of game data\n- UIs beyond the TUI\n\n# Acknowledgements\n\n- [@Ilikemath642][2] for inspiring me to work on a poker game\n- [@zachstruck][3] for teaching me a lot about Rust\n- [@Mac-Genius][4] for TUI feedback\n- [@shazow][5] for inspiring me with [`ssh-chat`][6]\n\n[0]: assets/demo.gif?raw=true\n[1]: https://hub.docker.com/r/ognf/poker\n[2]: https://github.com/Ilikemath642\n[3]: https://github.com/zachstruck\n[4]: https://github.com/Mac-Genius\n[5]: https://github.com/shazow\n[6]: https://github.com/shazow/ssh-chat\n[7]: https://crates.io/crates/private_poker\n[8]: https://crates.io/crates/pp_server\n[9]: https://crates.io/crates/pp_client\n[10]: https://crates.io/crates/pp_bots\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FtheOGognf%2Fprivate_poker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FtheOGognf%2Fprivate_poker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FtheOGognf%2Fprivate_poker/lists"}