{"id":17480012,"url":"https://github.com/dacr/counters","last_synced_at":"2026-02-26T06:46:39.269Z","repository":{"id":144561240,"uuid":"347744729","full_name":"dacr/counters","owner":"dacr","description":"Just count things with API","archived":false,"fork":false,"pushed_at":"2025-04-12T17:41:17.000Z","size":3886,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T12:12:20.832Z","etag":null,"topics":["api","openapi","pekko","pekko-http"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dacr.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":"2021-03-14T20:19:54.000Z","updated_at":"2025-04-12T17:41:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"35dbc9c5-ac3b-4a76-a0ec-c9c7cb3971f2","html_url":"https://github.com/dacr/counters","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacr%2Fcounters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacr%2Fcounters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacr%2Fcounters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dacr%2Fcounters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dacr","download_url":"https://codeload.github.com/dacr/counters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237832,"owners_count":21397401,"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":["api","openapi","pekko","pekko-http"],"created_at":"2024-10-18T21:42:24.514Z","updated_at":"2026-02-26T06:46:34.230Z","avatar_url":"https://github.com/dacr.png","language":"Scala","readme":"# ![](images/logo-base-64.png) Counters ![tests][tests-workflow] [![License][licenseImg]][licenseLink] [![][CountersImg]][CountersLnk]\nJust count whatever you want. Two steps to create a counter :\n1. Create a counters group\n2. Create your counter\n\nIt has been deployed on [https://mapland.fr/counters][deployed].\nVisit [this link](https://mapland.fr/counters/d5d6a0be-7ba7-41cc-aa37-beb7d957bfa0/count/cfcd5fa9-f4cb-4426-a2de-e2238339158e)\nto increment and get access to the counter state, or check [this page](https://mapland.fr/counters/d5d6a0be-7ba7-41cc-aa37-beb7d957bfa0/state/cfcd5fa9-f4cb-4426-a2de-e2238339158e) directly get \nthe current counter state\n\n\n## curl usage example\n```\nBASE=http://127.0.0.1:8080\nAPI=$BASE/api\n\ncurl -d '{\"name\":\"test\"}' -H \"Content-Type: application/json\" $API/group\n# extract the group ID from the response\nGROUP=d5d6a0be-7ba7-41cc-aa37-beb7d957bfa0\n\ncurl -d '{\"name\":\"counter#1\"}' -H \"Content-Type: application/json\" $API/group/$GROUP/counter\n# extract the counter ID from the response\nCOUNTER=cfcd5fa9-f4cb-4426-a2de-e2238339158e\n\ncurl $API/group/$GROUP/counter/$COUNTER\n\ncurl $API/increment/$GROUP/$COUNTER\n\ncurl $BASE/$GROUP/count/$COUNTER\n\ncurl $BASE/$GROUP/state/$COUNTER\n```\n\n## Quick local start\n\nThanks to [scala-cli][scl],\nthis application is quite easy to start, just execute :\n```\nscala-cli --dep fr.janalyse::counters:1.0.6 -e 'counters.Main.main(args)'\n```\n\n## Configuration\n\n| Environment variable | Description                            | default value           |\n|----------------------|----------------------------------------|-------------------------|\n| COUNTERS_LISTEN_IP   | Listening network interface            | \"0.0.0.0\"               |\n| COUNTERS_LISTEN_PORT | Listening port                         | 8080                    |\n| COUNTERS_PREFIX      | Add a prefix to all defined routes     | \"\"                      |\n| COUNTERS_URL         | How this service is known from outside | \"http://127.0.0.1:8080\" |\n| COUNTERS_STORE_PATH  | Where data is stored                   | \"/tmp/counters-data\"    |\n\n[cs]: https://get-coursier.io/\n[scl]: https://scala-cli.virtuslab.org/\n\n[deployed]:   https://mapland.fr/counters\n[akka-http]:  https://doc.akka.io/docs/akka-http/current/index.html\n\n[Counters]:       https://github.com/dacr/counters\n[CountersImg]: https://img.shields.io/maven-central/v/fr.janalyse/counters_2.13.svg\n[CountersLnk]: https://search.maven.org/#search%7Cga%7C1%7Cfr.janalyse.counters\n\n[tests-workflow]: https://github.com/dacr/counters/actions/workflows/scala.yml/badge.svg\n\n[licenseImg]: https://img.shields.io/github/license/dacr/counters.svg\n[licenseLink]: LICENSE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacr%2Fcounters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdacr%2Fcounters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdacr%2Fcounters/lists"}