{"id":19554613,"url":"https://github.com/m4tx/chombo-gen","last_synced_at":"2025-04-26T21:32:14.615Z","repository":{"id":158203486,"uuid":"633116560","full_name":"m4tx/chombo-gen","owner":"m4tx","description":"Web service generating images of Japanese (Riichi) Mahjong hands.","archived":false,"fork":false,"pushed_at":"2024-11-01T20:39:38.000Z","size":511,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-01T21:18:30.750Z","etag":null,"topics":["mahjong","riichi","rust","webapp"],"latest_commit_sha":null,"homepage":"https://hand.chombo.club","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m4tx.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}},"created_at":"2023-04-26T20:19:13.000Z","updated_at":"2024-11-01T20:39:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"87e3ef2f-ad4f-4b52-bed6-d80904e593e6","html_url":"https://github.com/m4tx/chombo-gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fchombo-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fchombo-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fchombo-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m4tx%2Fchombo-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m4tx","download_url":"https://codeload.github.com/m4tx/chombo-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224047826,"owners_count":17246908,"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":["mahjong","riichi","rust","webapp"],"created_at":"2024-11-11T04:28:18.248Z","updated_at":"2024-11-11T04:28:19.395Z","avatar_url":"https://github.com/m4tx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"chombo-gen\n==========\n\n[![Rust Build Status](https://github.com/m4tx/chombo-gen/workflows/Rust%20CI/badge.svg)](https://github.com/m4tx/chombo-gen/actions/workflows/rust.yml)\n[![Docker Build Status](https://github.com/m4tx/chombo-gen/workflows/Docker/badge.svg)](https://github.com/m4tx/chombo-gen/actions/workflows/docker-publish.yml)\n[![GNU AGPL v3 licensed](https://img.shields.io/github/license/m4tx/chombo-gen)](https://github.com/m4tx/chombo-gen/blob/master/LICENSE)\n\nChomboGen is a web service that allows to generate images of Japanese (Riichi) Mahjong hands. The hands are provided in a text format and are generated in PNG format.\n\n**See it in action on [hand.chombo.club](https://hand.chombo.club).**\n\n![Riichi Hand Generator screenshot](docs/screenshot1.png)\n\n## Development\n\nThe project is written purely in [Rust](https://www.rust-lang.org/), both its backend and frontend.\n\n### Backend\n\nTo run the development server, execute:\n\n```shell\ncd chombo-gen-backend\ncargo run\n```\n\nThis will start the server at [localhost:8000](http://localhost:8000).\n\nTo build a release version, execute:\n\n```shell\ncargo build --release\n```\n\nThe target binary will be put at `target/release/chombo-gen-backend`.\n\n### Frontend\n\nFrontend uses the [yew](https://yew.rs/docs/getting-started/build-a-sample-app) framework. The code is compiled into a WebAssembly binary and then statically served.\n\nFirst, install the [Trunk](https://trunkrs.dev/) bundler and add wasm32 target support to your Rust toolchain.\n\n```shell\nrustup target add wasm32-unknown-unknown\ncargo install trunk\n```\n\nThen, you can use:\n\n```shell\ncd chombo-gen-frontend\ntrunk serve\n```\n\nto start local server at [localhost:8080](http://localhost:8080). It assumes that the backend is running at [localhost:8000](http://localhost:8000).\n\nTo build a distributable version of the frontend, execute:\n\n```shell\ntrunk build --release\n```\n\nThis will build a website in `frontend/dist/` directory that can be statically served by a server such as nginx. You can override th backend URL by providing it as the `CHOMBO_GEN_API_URL` environment variable, like so:\n\n```sh\nexport CHOMBO_GEN_API_URL=http://api.hand.example.com\ntrunk build --release\n```\n\n#### `pre-commit`\nWe encourage contributors to use predefined [`pre-commit`](https://pre-commit.com/) hooks — to install them in your local repo, make sure you have `pre-commit` installed and run:\n\n```shell\npre-commit install\n```\n\n## Deployment\n\nThe easiest way to try locally or deploy _chombo-gen_ is to use auto-generated Docker images. There is a separate image for backend, frontend, and a reverse proxy (that exposes both the backend and frontend under the same server), all of which are published on [the GitHub Container Registry](https://github.com/m4tx?tab=packages\u0026repo_name=chombo-gen). There is an example `docker-compose.yml` file provided in the repository root.\n\nIn the project root directory, execute:\n\n```shell\ndocker compose up -d\n```\n\nAfter that, the website will be available on at [localhost:8000](http://localhost:8000).\n\n## Attribution\n\nThis project uses [riichi-hand-rs](https://github.com/m4tx/riichi-hand-rs) library, which uses:\n\n* modified [riichi-mahjong-tiles](https://github.com/FluffyStuff/riichi-mahjong-tiles) by [FluffyStuff](https://github.com/FluffyStuff) in [public domain/CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/),\n* mahjong tiles by [Martin Persson](https://www.martinpersson.org/) which are free for personal and commercial use under the condition that a link to the author's page is provided.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4tx%2Fchombo-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm4tx%2Fchombo-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm4tx%2Fchombo-gen/lists"}