{"id":21270660,"url":"https://github.com/timstr/taipan-webapp","last_synced_at":"2026-02-27T00:32:35.573Z","repository":{"id":41669733,"uuid":"256556520","full_name":"timstr/taipan-webapp","owner":"timstr","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-06T03:39:09.000Z","size":3210,"stargazers_count":3,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T07:59:32.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timstr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-17T16:36:45.000Z","updated_at":"2021-05-26T00:15:11.000Z","dependencies_parsed_at":"2023-02-05T05:46:42.227Z","dependency_job_id":null,"html_url":"https://github.com/timstr/taipan-webapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timstr/taipan-webapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstr%2Ftaipan-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstr%2Ftaipan-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstr%2Ftaipan-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstr%2Ftaipan-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timstr","download_url":"https://codeload.github.com/timstr/taipan-webapp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstr%2Ftaipan-webapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29879031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-21T08:18:13.572Z","updated_at":"2026-02-27T00:32:35.548Z","avatar_url":"https://github.com/timstr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# taipan-webapp\n\n# What it is\n\nA webapp for playing [Tai Pan (A.K.A Tichu)](https://en.wikipedia.org/wiki/Tichu) with your friends.\n\nSee it in action here (if you know the password): https://timstaipanserver.ca\n\nThe rules of the game are largely neither explained nor enforced. It is assumed that all players can\nhear eachother speaking while they play, to keep the gameplay more natural and social.\n\n## How to build it\n\nRequires [yarn](https://yarnpkg.com/). After cloning, run `$ yarn` in the project root to fetch the\ndependencies. Then to build, run `$ yarn build` from the project root. You can optionally set the\n`NODE_ENV` environment variable to either `development` or `production` to build in debug or release\nmode, respectively, before running the build command.\n\nTo deploy, simply copy everything in the `dist/` directory to where you want to host the server\nfrom. To run the server, you'll then need to set a few environment variables:\n\n- `PUBLIC_ROOT` : the path to the folder whose where files are served by the HTTPS server.\n  This is intended for the files placed into the `dist/public/` folder during build.\n- `SECRET_KEY_PATH` (not required if `--insecure` option is used) : the path to the key file for the HTTPS server. You can generate this\n  using OpenSSL (self-signed, but browsers will hate you), or, if you have a domain name,\n  you can easily get certification from [Let's Encrpyt](https://letsencrypt.org/) and\n  get a key in the process.\n- `SECRET_CERT_PATH` (not required if `--insecure` option is used) : the path to the certificate file for the HTTPS server. See\n  `SECRET_KEY_PATH` above for details; you'll generate this similarly.\n- `GAME_PASSWORD_PATH` (optional) : the path to a plaintext file containing the SHA256 digest\n  of the password required to join the game. If this is not set, no password will be required\n  to play, and users can enter anything into the password field to gain entry to the game.\n  You can create this file and choose a new password easily by running `$ node hashpassword.js`\n  which is found in the `dist/util` path after building.\n  \nThe files that these environment variables point to (with the exception of `PUBLIC_ROOT`) should all\nbe considered secret and carefully guarded. If HTTPS proves to be too complicated (e.g. during development), you can\nsimply run the app with the `--insecure` option to use HTTP only.\n\nFinally, once the environment variables above are set, run `$ node main.js` (or `$ node main.js --insecure` to use http instead of https, which is simpler for development but less safe), where `main.js` is taken\nfrom `dist/server/` after building. This will run an http server that can be visited at `http://localhost` if running on your local machine, or `http://yourdomainname.com` if running on a machine pointed to by a domain name that you own.\n\n## What it's made of\n\nBoth the frontend and backend are built using [TypeScript](https://www.typescriptlang.org/). The\nfrontend uses [React](https://reactjs.org/) for the html UI. Two-way communication is done using\n[WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) using a custom\nJSON-based message system. The game state is stored and maintained using a pattern similar to\n[Redux](https://redux.js.org/), in that the game state is stored in a single variable, which\nis replaced (not modified) by a function taking the old state and an action which describes\nthe desired changed. Indeed, most of this webapp is written in a very functional style. The build\nsystem uses [WebPack](https://webpack.js.org/) with a few plugins to easily and reliably build\nand bundle everything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimstr%2Ftaipan-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimstr%2Ftaipan-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimstr%2Ftaipan-webapp/lists"}