{"id":19000898,"url":"https://github.com/tbtiberiu/chess-snapshot-api","last_synced_at":"2026-04-30T19:31:57.067Z","repository":{"id":254985113,"uuid":"758920367","full_name":"tbtiberiu/chess-snapshot-api","owner":"tbtiberiu","description":"API for detecting chess positions from images and analyzing them with the Stockfish engine.","archived":false,"fork":false,"pushed_at":"2024-08-27T08:10:44.000Z","size":91575,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T23:10:13.348Z","etag":null,"topics":["chessboard-detection","flask","stockfish-engine"],"latest_commit_sha":null,"homepage":"https://online.fliphtml5.com/qtzgs/qunc/","language":"Python","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/tbtiberiu.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-17T13:20:34.000Z","updated_at":"2024-08-27T08:22:48.000Z","dependencies_parsed_at":"2024-08-27T10:51:14.870Z","dependency_job_id":null,"html_url":"https://github.com/tbtiberiu/chess-snapshot-api","commit_stats":null,"previous_names":["tbtiberiu/chess-snapshot-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tbtiberiu/chess-snapshot-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2Fchess-snapshot-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2Fchess-snapshot-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2Fchess-snapshot-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2Fchess-snapshot-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbtiberiu","download_url":"https://codeload.github.com/tbtiberiu/chess-snapshot-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbtiberiu%2Fchess-snapshot-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475191,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["chessboard-detection","flask","stockfish-engine"],"created_at":"2024-11-08T18:08:36.991Z","updated_at":"2026-04-30T19:31:57.050Z","avatar_url":"https://github.com/tbtiberiu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Banner](banner.png)\n\n# Chess Snapshot API\n\nThe Chess Snapshot API provides an easy-to-use RESTful interface for detecting and analyzing chess positions from images. It utilizes the [Chess Position Detector](https://github.com/tbtiberiu/chess-position-detector.git) to convert a chessboard image into a FEN string and integrates the powerful Stockfish chess engine to determine the best move from any given position.\n\nThis API is intended for integration with a Flutter application, offering seamless support for the [Chess Snapshot App](https://github.com/tbtiberiu/chess_snapshot_app.git).\n\n## Installation\n\n### Prerequisites\n\n- Python 3 ([Python 3.10](https://www.python.org/downloads/release/python-31014/) is recommended)\n- [Ngrok](https://ngrok.com/download)\n\n### Requirements\n\nEnsure that Python is installed on your machine. You can install the necessary dependencies using `pip` and the `requirements.txt` file.\n\n```bash\npip install -r requirements.txt\n```\n\n### Dependencies\n\n- OpenCV\n- Numpy\n- Flask\n- Stockfish\n- ...\n\nThese dependencies are necessary for image processing, detection algorithms, and chess analysis.\n\n## Usage\n\nTo use the `Chess Snapshot API`, follow these steps:\n\n1. **Start the Flask Server**:\n\n   ```bash\n   python app.py\n   ```\n\n2. **Expose the Server with Ngrok**:\n   ```bash\n   ngrok http --domain=knowing-fit-poodle.ngrok-free.app 8080\n   ```\n\n### Endpoints\n\n1. **Get Chess Position (FEN String)**\n\n   - **URL**: `/api/get_chess_position`\n   - **Method**: `POST`\n   - **Description**: This endpoint accepts an image file of a chessboard and returns the FEN string representing the position on the board.\n   - **Response Example**:\n     ```json\n     {\n       \"fen\": \"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR\"\n     }\n     ```\n\n2. **Get Best Move**\n   - **URL**: `/api/get_best_move`\n   - **Method**: `POST`\n   - **Description**: This endpoint accepts a FEN string and returns the best move as calculated by Stockfish.\n   - **Response Example**:\n     ```json\n     {\n       \"best_move\": \"e2e4\"\n     }\n     ```\n\n## Acknowledgments\n\nThis project is based on advanced computer vision techniques and was supervised by Lect. Dr. Ioana Cristina Plajer.\n\n**Read More:** [Chess Snapshot Full Documentation in Romanian (PDF)](ChessSnapshot.pdf)\n\n## Additional Resources\n\n- [Chess Position Detector GitHub Repository](https://github.com/tbtiberiu/chess-position-detector.git)\n- [Chess Snapshot App GitHub Repository](https://github.com/tbtiberiu/chess_snapshot_app.git)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbtiberiu%2Fchess-snapshot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbtiberiu%2Fchess-snapshot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbtiberiu%2Fchess-snapshot-api/lists"}