{"id":50278137,"url":"https://github.com/faraplay/zundamahjong","last_synced_at":"2026-05-27T22:04:23.368Z","repository":{"id":314614944,"uuid":"1048111785","full_name":"faraplay/zundamahjong","owner":"faraplay","description":"Web-based mahjong game","archived":false,"fork":false,"pushed_at":"2026-05-06T20:06:19.000Z","size":5338,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-05-06T22:14:29.182Z","etag":null,"topics":["game","mahjong","webgame"],"latest_commit_sha":null,"homepage":"","language":"Python","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/faraplay.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-08-31T23:57:07.000Z","updated_at":"2026-05-06T20:06:19.000Z","dependencies_parsed_at":"2025-09-13T16:39:28.998Z","dependency_job_id":"b621a09f-0ed8-468b-9df8-1ee827758c57","html_url":"https://github.com/faraplay/zundamahjong","commit_stats":null,"previous_names":["faraplay/zundamahjong"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/faraplay/zundamahjong","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faraplay%2Fzundamahjong","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faraplay%2Fzundamahjong/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faraplay%2Fzundamahjong/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faraplay%2Fzundamahjong/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faraplay","download_url":"https://codeload.github.com/faraplay/zundamahjong/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faraplay%2Fzundamahjong/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33585226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":["game","mahjong","webgame"],"created_at":"2026-05-27T22:04:04.633Z","updated_at":"2026-05-27T22:04:23.360Z","avatar_url":"https://github.com/faraplay.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zundamahjong\n\n[![CI](https://img.shields.io/github/actions/workflow/status/faraplay/zundamahjong/build.yml?branch=main\u0026logo=github\u0026label=CI)](https://github.com/faraplay/zundamahjong/actions/workflows/build.yml)\n[![PyPI](https://img.shields.io/pypi/v/zundamahjong)](https://pypi.org/project/zundamahjong)\n[![License](https://img.shields.io/github/license/faraplay/zundamahjong.svg)](https://github.com/faraplay/zundamahjong/blob/main/LICENSE)\n\n![zundamahjong game screenshot](https://raw.githubusercontent.com/faraplay/zundamahjong/refs/heads/main/screenshot.jpg)\n\nWeb-based Mahjong game.\n\n## Quick Start\n\nInstall `zundamahjong` into a Python virtual environment with\n\n```sh\npython -m venv .venv\nsource .venv/bin/activate\npip install zundamahjong\n```\n\nTo start the bundled WSGI server, listening at the port `PORT`, run\n\n```sh\nzundamahjong [-p PORT]  # defaults to 5000\n```\n\n\u003e [!WARNING]\n\u003e The bundled WSGI server should not be used in production.\n\n## Running in Production\n\nInstall Gunicorn (or some other [production WSGI server](https://flask.palletsprojects.com/en/stable/deploying/))\nto your virtual environment with\n\n```sh\npip install gunicorn\n```\n\nYou'll need to generate a secret key for Flask to sign sessions. For example,\nyou can run\n\n```python\n\u003e\u003e\u003e import secrets\n\u003e\u003e\u003e print(secrets.token_hex())\n```\n\nand pass the result to `zundamahjong` through the `FLASK_SECRET_KEY`\nenvironment variable.\n\nOne way to go about this is with a `.env` file. Use `.env.example` as a\nstarting point.\n\nOnce you've figured out how to do that, tell Gunicorn to start `zundamahjong`\nup by running\n\n```sh\ngunicorn --threads 100 --bind 127.0.0.1:5000 zundamahjong.server:app\n```\n\n\u003e [!NOTE]\n\u003e It is recommended to run Gunicorn [behind a reverse proxy](https://docs.gunicorn.org/en/stable/deploy.html)\n\u003e such as nginx. But make sure to proxy [WebSocket requests](https://nginx.org/en/docs/http/websocket.html)\n\u003e to Gunicorn! If you don't, Socket.IO will fall back to using HTTP\n\u003e long-polling.\n\n### Database configuration\n\nBy default, `zundamahjong` uses a SQLite database with filename `debug.db` in\nthe working directory.\n\nTo instead use a PostgreSQL database, you'll have to install the needed\noptional dependencies with\n\n```sh\npip install 'zundamahjong[postgresql]'\n```\n\nThe database connection is configured using environment variables. Check the\n`.env.example` file.\n\n## Hacking on zundamahjong\n\nSet up a Python virtual environment and the project's dependencies with\n\n```sh\nuv venv\nsource .venv/bin/activate\nuv sync\n```\n\nTo install the Node.js dependencies, navigate to the `client` folder and run\n\n```sh\nnpm install\n```\n\nWhile you are still in the `client` folder, run an initial build of the client files\n\n```sh\nnpm run build\n```\n\nStart the bundled Werkzeug server in debug mode by running\n\n```sh\nuv run zundamahjong --debug [--vite-port PORT]  # defaults to 5173\n```\n\nThis will take care of starting the [Vite](https://vite.dev/) debug server in\nthe background and proxy requests for static assets directly to it. You are\nfree to start it manually (before running the above!) by navigating to the\n`client` folder and running\n\n```sh\nnpm run dev\n```\n\n## Generating documentation with Sphinx\n\nYou'll need to make sure you install the docs dependencies as well with\n\n```sh\nuv venv\nsource .venv/bin/activate\nuv sync --group docs\n```\n\nThen you can build the docs with\n\n```sh\nsphinx-build -M html docs/source/ docs/build/\n```\n\nIf you're working on the docs and want the docs to be rebuilt every time\nan edit is saved, you can run\n\n```sh\nsphinx-autobuild docs/source docs/build/html --watch src\n```\n\n## Generating password hashes\n\nTo reset a user's password if they have forgotten it, you can use\n\n```python\n\u003e\u003e\u003e from getpass import getpass\n\u003e\u003e\u003e from werkzeug.security import generate_password_hash\n\u003e\u003e\u003e print(generate_password_hash(getpass()))\n```\n\nand then input the result manually into the application database.\n\n## Credits\n\n[Mahjong tile graphics](https://demching.itch.io/mahjong)\nby [Cangjie6](https://commons.wikimedia.org/wiki/User:Cangjie6)\nwith modifications by [demching](https://itch.io/profile/demching),\nlicensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).\n\nAvatar graphics by [坂本アヒル](https://www.pixiv.net/en/users/12147115),\nsee [（ず・ω・きょ）](https://zunko.jp/guideline.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaraplay%2Fzundamahjong","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaraplay%2Fzundamahjong","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaraplay%2Fzundamahjong/lists"}