{"id":13821888,"url":"https://github.com/plasmoapp/jigsaw-bot","last_synced_at":"2026-02-16T07:35:23.220Z","repository":{"id":199553510,"uuid":"696953657","full_name":"plasmoapp/jigsaw-bot","owner":"plasmoapp","description":"Turn any image into a Jigsaw Puzzle and solve it together with friends without leaving Telegram","archived":false,"fork":false,"pushed_at":"2024-12-16T13:09:29.000Z","size":6235,"stargazers_count":19,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T15:43:08.859Z","etag":null,"topics":["axum","godot","rust","telegram","telegram-miniapp-contest-2023","teloxide"],"latest_commit_sha":null,"homepage":"https://t.me/jigsawpuzzlebot","language":"Rust","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/plasmoapp.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}},"created_at":"2023-09-26T18:49:06.000Z","updated_at":"2025-04-09T19:29:51.000Z","dependencies_parsed_at":"2023-10-13T08:39:46.607Z","dependency_job_id":"c876607f-7801-4f95-89fe-dd3b0c9d0e1a","html_url":"https://github.com/plasmoapp/jigsaw-bot","commit_stats":null,"previous_names":["plasmoapp/jigsaw-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/plasmoapp/jigsaw-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasmoapp%2Fjigsaw-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasmoapp%2Fjigsaw-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasmoapp%2Fjigsaw-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasmoapp%2Fjigsaw-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plasmoapp","download_url":"https://codeload.github.com/plasmoapp/jigsaw-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plasmoapp%2Fjigsaw-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29502934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T05:57:17.024Z","status":"ssl_error","status_checked_at":"2026-02-16T05:56:49.929Z","response_time":115,"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":["axum","godot","rust","telegram","telegram-miniapp-contest-2023","teloxide"],"created_at":"2024-08-04T08:01:32.463Z","updated_at":"2026-02-16T07:35:23.197Z","avatar_url":"https://github.com/plasmoapp.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cimg src=\"https://i.imgur.com/0xKkOvz.png\" width=\"128\"/\u003e\n\n# Jigsaw Puzzle Bot\n\nTurn any image into a Jigsaw Puzzle and solve it together with friends without leaving Telegram\n\nMade with [Rust](https://www.rust-lang.org/) 🚀, [Godot](https://godotengine.org/) and [Redis](https://redis.io/)\n\nTry it out now: [@jigsawpuzzlebot](https://t.me/jigsawpuzzlebot)\n\nhttps://github.com/plasmoapp/jigsaw-bot/assets/27863947/33d762f9-6c69-4896-9314-4dc6cb318ad7\n\n## Project overview\n\n---\n\n**[jigsaw-generator](./jigsaw-generator)**\n\n- Made with Rust\n- Subscribed for a [Redis PubSub](https://redis.io/docs/interact/pubsub/) request to generate a puzzle from an image\n- Stores processed images in the file system and puzzle state in Redis\n- Publishes a [Redis PubSub](https://redis.io/docs/interact/pubsub/) event when a puzzle is generated. Or when it fails to generate a puzzle\n\n---\n\n**[jigsaw-bot](./jigsaw-bot)**\n\n- Made with [Teloxide](https://github.com/teloxide/teloxide) Rust framework\n- An entry point of the Mini App\n- Takes images from users and publishes a [Redis PubSub](https://redis.io/docs/interact/pubsub/) request to [jigsaw-generator](./jigsaw-generator) to generate a puzzle\n- Notifies users when a puzzle finished or failed generating\n- Allows users to share puzzles with friends using [Inline Query](https://core.telegram.org/bots/features#inline-requests)\n\n---\n\n**[jigsaw-game](./jigsaw-game)**\n\n- Made with [Godot Engine](https://godotengine.org/)\n- Frontend of the Mini App\n- Uses version 3.5 of Godot because version 4.x has worse HTML support \n\n---\n\n**[jigsaw-backend](./jigsaw-backend)**\n\n- Made with [Axum](https://github.com/tokio-rs/axum) Rust framework\n- HTTP and WebSocket server\n- Serves images generated by [jigsaw-generator](./jigsaw-generator)\n- Serves [jigsaw-game](./jigsaw-game) exported as HTML\n- Real-time multiplayer powered by WebSockets\n\n---\n\n**[jigsaw-common](./jigsaw-common)**\n\n- Common Rust module shared between all other Rust modules\n\n---\n\n## Documentation\n\nMost of the code has comments so if you're feeling courageous – clone the repo and jump straight into it\n\nHere is also a list of specific features you might want to use in your project\n\n### Mini App authorization flow on WebSockets\n\n- [/jigsaw-game/components/web_socket_client/web_socket_manager.gd](/jigsaw-game/components/web_socket_client/web_socket_manager.gd)\n- [/jigsaw-backend/src/websocket/unauthorized_handler.rs](/jigsaw-backend/src/websocket/unauthorized_handler.rs)\n- [Read Telegram Docs on Validating data](https://core.telegram.org/bots/webapps#validating-data-received-via-the-mini-app)\n\n### Custom HTML shell for Godot\n\nThe shell affects how the loading screen looks. This custom shell will match Telegram theme \n\n- [/jigsaw-game/custom_shell.html](/jigsaw-game/custom_shell.html)\n- [Read more on Godot Custom HTML Page](https://docs.godotengine.org/en/3.5/tutorials/platform/customizing_html5_shell.html)\n\n### Sync Godot Theme with Telegram Theme \n\n- [/jigsaw-game/global/theme_manager/theme_manager.gd](/jigsaw-game/global/theme_manager/theme_manager.gd)\n\n### Access Telegram startParam inside of Godot \n\n- [/jigsaw-game/components/game_manager/game_manager.gd#L30](/jigsaw-game/components/game_manager/game_manager.gd)\n\n## How to setup a developer enviroment\n\n### 1. Download Docker\n\nDocker Compose will allow us to install dependencies and launch multiple processes with one simple command\n\nInstall Docker Engine: https://docs.docker.com/engine/install/#desktop\n\n### 2. Setup Ngrok \n\nYou need a secure HTTP connection for a Telegram Web App. To test the app locally you can use ngrok \n\nDownload: https://ngrok.com/download\n\nThen use this command to open a tunnel\n\n```bash\nngrok http 3030\n```\n\nKeep the URL that looks like this: `https://\u003csomething\u003e-\u003csomething\u003e.ngrok-free.app`\n\n### 3. Create a Telegram Bot and a Web App \n\nCreate a bot using [@BotFather](https://t.me/BotFather). Don't forget to copy and save the bot token as you will need it later\n\n```\n/newbot\n```\n\nEnable Inline Mode\n\n```\n/setinline\n```\n\nCreate a Web App. Set URL to the one you got from ngrok. The app can have any name\n\n```\n/newapp\n```\n\n### 4. Clone the repo \n\n```\ngit clone https://github.com/plasmoapp/jigsaw-bot.git\ncd jigsaw-bot\n```\n\n### 5. Create .env file inside of the cloned repo \n\n```bash\ntouch .env\n```\n\n```env\n# URL of the Web App\nCONFIG.WEB_APP_URL=https://\u003csomething\u003e-\u003csomething\u003e.ngrok-free.app\n# Name of the bot. Like in @\u003cbot_name\u003e or t.me/\u003cbot_name\u003e\nCONFIG.BOT_NAME=jigsawpuzzlebot\n# Name of the Telegram Web App. Like in t.me/\u003cbot_name\u003e/\u003capp_name\u003e\nCONFIG.WEB_APP_NAME=game\n# Bot Token \nCONFIG.BOT_TOKEN=\u003cbot_token\u003e\n# Enable logs\nRUST_LOG=DEBUG\n```\n\n### 6. Start the containers \n\n```bash\ndocker-compose up --build -d\n```\n\n```bash\n# View status of the containers\ndocker-compose ps -a\n\n# View logs\ndocker-compose logs -f\n\n# Build a specific container\ndocker-compose up --build -d backend\ndocker-compose up --build -d bot\ndocker-compose up --build -d generator\n\n# Stop everything\ndocker-compose stop\n\n# If you want to build it in the release mode use this instead \ndocker-compose -f docker-compose-release.yaml up --build -d \n```\n\n### Keep in mind\n\n[jigsaw-game](./jigsaw-game) project is built inside of the [jigsaw-backend](./jigsaw-backend) Dockerfile\n\nAfter you've made changed to the [jigsaw-game](./jigsaw-game) project – you need to restart the `backend` container\n\nApp runs on the port `3030`. You can change it in `docker-compose.yaml`\n \n## Planned features\n\nI've made a list of features that I wanted to implement but didn't have time because of the contest deadline\n\nProbably will work on them eventually but I also welcome contributions 😊\n\n- [Chat UI #6](https://github.com/plasmoapp/jigsaw-bot/issues/6)\n- [Allow different tile dimensions #4](https://github.com/plasmoapp/jigsaw-bot/issues/4)\n- [Online player count #5](https://github.com/plasmoapp/jigsaw-bot/issues/5)\n- [Fix dragging ghost #8](https://github.com/plasmoapp/jigsaw-bot/issues/8)\n- [Sound effects #2](https://github.com/plasmoapp/jigsaw-bot/issues/2)\n- [Fix Z-index on tiles that don't snap to grid #7](https://github.com/plasmoapp/jigsaw-bot/issues/7)\n- [Check of user id collisions](https://github.com/plasmoapp/jigsaw-bot/issues/3) \n- [Send a picture or a gif on /start #1](https://github.com/plasmoapp/jigsaw-bot/issues/1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmoapp%2Fjigsaw-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplasmoapp%2Fjigsaw-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmoapp%2Fjigsaw-bot/lists"}