{"id":18026688,"url":"https://github.com/andreoss/mancala","last_synced_at":"2025-10-17T09:15:17.439Z","repository":{"id":38376821,"uuid":"303216704","full_name":"andreoss/mancala","owner":"andreoss","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-01T02:58:19.000Z","size":191,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T19:50:55.046Z","etag":null,"topics":["board-game","kahala","mancala","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreoss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-10-11T21:33:44.000Z","updated_at":"2021-12-14T03:55:16.000Z","dependencies_parsed_at":"2024-10-30T08:28:26.572Z","dependency_job_id":null,"html_url":"https://github.com/andreoss/mancala","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreoss/mancala","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreoss%2Fmancala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreoss%2Fmancala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreoss%2Fmancala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreoss%2Fmancala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreoss","download_url":"https://codeload.github.com/andreoss/mancala/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreoss%2Fmancala/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279316084,"owners_count":26146649,"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","status":"online","status_checked_at":"2025-10-17T02:00:07.504Z","response_time":56,"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":["board-game","kahala","mancala","rest-api"],"created_at":"2024-10-30T08:07:43.403Z","updated_at":"2025-10-17T09:15:17.385Z","avatar_url":"https://github.com/andreoss.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"/logo.webp\" width=\"92px\"/\u003e\n\n# Mancala\n[![Hits-of-Code](https://hitsofcode.com/github/andreoss/mancala)](https://hitsofcode.com/view/github/andreoss/mancala)\n[![codecov](https://codecov.io/gh/andreoss/mancala/branch/master/graph/badge.svg)](https://codecov.io/gh/andreoss/mancala)\n[![Build Status](https://app.travis-ci.com/andreoss/mancala.svg?branch=master)](https://app.travis-ci.com/andreoss/mancala)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=andreoss_mancala\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=andreoss_mancala)\n\nSimple implementation of [Mancala](https://en.wikipedia.org/wiki/Mancala).\n\n\n## Build and run\n\nWith JDK11+\n```bash\nmvn package\njava -jar target/mancala.jar\n```\n\n## Exercise the application\nSwagger is available at  http://localhost:8080/openapi-ui/index.html\n\n### Create a game\n```\n*  curl  -v -X POST -H \"Content-Type: application/json\" http://0.0.0.0:8080/games\n\u003e POST /games HTTP/1.1\n\u003e Host: 0.0.0.0:8080\n\u003e User-Agent: curl/7.70.0\n\u003e Accept: */*\n\u003e Content-Type: application/json\n\u003e\n\u003c HTTP/1.1 201 Created\n\u003c Content-Length: 0\n\u003c Date: Mon, 12 Oct 2020 01:25:41 +0300\n\u003c Location: http://127.0.0.1:8080/2\n\u003c connection: keep-alive\n\u003c\n* Connection #0 to host 0.0.0.0 left intact\n```\n\n### See status of a game\n```\n* curl  -v -X GET -H \"Content-Type: application/json\" http://0.0.0.0:8080/games/1\n* Connected to 0.0.0.0 (127.0.0.1) port 8080 (#0)\n\u003e GET /games/1 HTTP/1.1\n\u003e Host: 0.0.0.0:8080\n\u003e User-Agent: curl/7.70.0\n\u003e Accept: */*\n\u003e Content-Type: application/json\n\u003e\n\u003c HTTP/1.1 200 OK\n\u003c Content-Type: application/json\n\u003c Date: Mon, 12 Oct 2020 01:23:32 +0300\n\u003c connection: keep-alive\n\u003c content-length: 108\n\u003c\n* Connection #0 to host 0.0.0.0 left intact\n{\"id\":1,\"status\":{\"1\":6,\"2\":6,\"3\":6,\"4\":6,\"5\":6,\"6\":6,\"7\":0,\"8\":6,\"9\":6,\"10\":6,\"11\":6,\"12\":6,\"13\":6,\"14\":0}}\n\n```\n### Make a move\n```\n\n*  curl -v -X PUT -H \"Content-Type: application/json\" http://0.0.0.0:8080/games/2/pits/1\n*   Trying 0.0.0.0:8080...\n* Connected to 0.0.0.0 (127.0.0.1) port 8080 (#0)\n\u003e PUT /games/2/pits/1 HTTP/1.1\n\u003e Host: 0.0.0.0:8080\n\u003e User-Agent: curl/7.70.0\n\u003e Accept: */*\n\u003e Content-Type: application/json\n\u003e\n\u003c HTTP/1.1 202 Accepted\n\u003c Content-Length: 0\n\u003c Date: Mon, 12 Oct 2020 01:27:06 +0300\n\u003c Location: http://127.0.0.1:8080/2\n\u003c connection: keep-alive\n\u003c\n\n```\n\n## Try health and metrics\n\n```\ncurl -s -X GET http://localhost:8080/health\n{\"outcome\":\"UP\",...\n. . .\n\n# Prometheus Format\ncurl -s -X GET http://localhost:8080/metrics\n# TYPE base:gc_g1_young_generation_count gauge\n. . .\n\n# JSON Format\ncurl -H 'Accept: application/json' -X GET http://localhost:8080/metrics\n{\"base\":...\n. . .\n\n```\n\n## Build the Docker Image\n\n```\ndocker build -t mancala .\n```\n\n## Start the application with Docker\n\n```\ndocker run --rm -p 8080:8080 mancala:latest\n```\n\nExercise the application as described above\n\n## Deploy the application to Kubernetes\n\n```\nkubectl cluster-info                         # Verify which cluster\nkubectl get pods                             # Verify connectivity to cluster\nkubectl create -f app.yaml                   # Deploy application\nkubectl get pods                             # Wait for quickstart pod to be RUNNING\nkubectl get service helidon-quickstart-mp    # Verify deployed service\n```\n\nNote the PORTs. You can now exercise the application as you did before but use the second\nport number (the NodePort) instead of 8080.\n\nAfter you’re done, cleanup.\n\n```\nkubectl delete -f app.yaml\n```\n\n## Build a native image with GraalVM\n\nGraalVM allows you to compile your programs ahead-of-time into a native\n executable. See https://www.graalvm.org/docs/reference-manual/aot-compilation/\n for more information.\n\nYou can build a native executable in 2 different ways:\n* With a local installation of GraalVM\n* Using Docker\n\n### Local build\n\nDownload Graal VM at https://www.graalvm.org/downloads, the version\n currently supported for Helidon is `20.1.0`.\n\n```\n# Setup the environment\nexport GRAALVM_HOME=/path\n# build the native executable\nmvn package -Pnative-image\n```\n\nYou can also put the Graal VM `bin` directory in your PATH, or pass\n `-DgraalVMHome=/path` to the Maven command.\n\nSee https://github.com/oracle/helidon-build-tools/tree/master/helidon-maven-plugin#goal-native-image\n for more information.\n\nStart the application:\n\n```\n./target/mancala\n```\n\n### Multi-stage Docker build\n\nBuild the \"native\" Docker Image\n\n```\ndocker build -t mancala-native -f Dockerfile.native .\n```\n\nStart the application:\n\n```\ndocker run --rm -p 8080:8080 mancala-native:latest\n```\n\n\n## Build a Java Runtime Image using jlink\n\nYou can build a custom Java Runtime Image (JRI) containing the application jars and the JDK modules\non which they depend. This image also:\n\n* Enables Class Data Sharing by default to reduce startup time.\n* Contains a customized `start` script to simplify CDS usage and support debug and test modes.\n\nYou can build a custom JRI in two different ways:\n* Local\n* Using Docker\n\n\n### Local build\n\n```\n# build the JRI\nmvn package -Pjlink-image\n```\n\nSee https://github.com/oracle/helidon-build-tools/tree/master/helidon-maven-plugin#goal-jlink-image\n for more information.\n\nStart the application:\n\n```\n./target/mancala/bin/start\n```\n\n### Multi-stage Docker build\n\nBuild the \"jlink\" Docker Image\n\n```\ndocker build -t mancala-jlink -f Dockerfile.jlink .\n```\n\nStart the application:\n\n```\ndocker run --rm -p 8080:8080 mancala-jlink:latest\n```\n\nSee the start script help:\n\n```\ndocker run --rm mancala-jlink:latest --help\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreoss%2Fmancala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreoss%2Fmancala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreoss%2Fmancala/lists"}