{"id":15523311,"url":"https://github.com/evg-tso/sample-donkey-api","last_synced_at":"2026-01-21T10:02:40.034Z","repository":{"id":37783961,"uuid":"371388242","full_name":"evg-tso/sample-donkey-api","owner":"evg-tso","description":"A sample Clojure web API, integrating many of the common public repos","archived":false,"fork":false,"pushed_at":"2024-04-30T14:30:19.000Z","size":230,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T20:18:23.955Z","etag":null,"topics":["clojure","donkey","integrant","ketu","malli","reitit","testcontainers"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/evg-tso.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-27T13:44:38.000Z","updated_at":"2024-10-05T17:17:30.000Z","dependencies_parsed_at":"2023-10-20T15:35:04.598Z","dependency_job_id":"c9b1fd3e-8aa2-4307-ac47-319a6b126ff8","html_url":"https://github.com/evg-tso/sample-donkey-api","commit_stats":{"total_commits":350,"total_committers":4,"mean_commits":87.5,"dds":"0.13714285714285712","last_synced_commit":"fb02b79222f59a738fc5247f0919a1d22876bce4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evg-tso/sample-donkey-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evg-tso%2Fsample-donkey-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evg-tso%2Fsample-donkey-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evg-tso%2Fsample-donkey-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evg-tso%2Fsample-donkey-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evg-tso","download_url":"https://codeload.github.com/evg-tso/sample-donkey-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evg-tso%2Fsample-donkey-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"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":["clojure","donkey","integrant","ketu","malli","reitit","testcontainers"],"created_at":"2024-10-02T10:44:37.462Z","updated_at":"2026-01-21T10:02:40.014Z","avatar_url":"https://github.com/evg-tso.png","language":"Clojure","readme":"# Sample Clojure web api\n\n[![GitHub CI](https://github.com/evg-tso/sample-donkey-api/actions/workflows/push_ci.yml/badge.svg)](https://github.com/evg-tso/sample-donkey-api/actions/workflows/push_ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/evg-tso/sample-donkey-api/badge.svg?branch=master)](https://coveralls.io/github/evg-tso/sample-donkey-api?branch=master)\n\nThis is a sample Clojure web api that will:\n- Display a [swagger](https://swagger.io/) page.\n- Validate or reject http requests based on a schema.\n- Do an async http request to resolve the client's IP address.\n- Map the request to a Kafka proto message.\n- Enqueue and publish that message.\n- Integration tests, relying on [testcontainers](https://www.testcontainers.org).\n\n\n## Requirements\n- [Java](https://www.oracle.com/java/technologies/downloads/#JDK17)\n  17+\n- [Leiningen](https://leiningen.org/) 2.9.3+\n\n## Installation\n\n    $ lein protodeps generate\n    $ lein uberjar\n\n## Usage\n\n    $ java -jar sample-donkey-api-0.1.0-standalone.jar\n\n### Configuration\n\nThe configuration is loaded using [walmartlabs/dyn-edn](https://github.com/walmartlabs/dyn-edn).  \nThese parts are configurable:\n```shell\nexport CHANNEL_SIZE_PER_CORE=250\nexport KAFKA_BROKERS=my-broker:9093\nexport IP_STACK_ACCESS_KEY=CHANGE ME\nexport INTERNAL_PORT=8081\nexport EXTERNAL_PORT=8080\n```\n\n## Used libraries\n\n- [AppsFlyer/Donkey](https://github.com/appsflyer/donkey) as the http server.\n- [clj-test-containers](https://github.com/javahippie/clj-test-containers) for integration tests.\n- [Metosin/malli](https://github.com/metosin/malli) for request validation.\n- [Metosin/reitit](https://github.com/metosin/reitit) for routing requests.\n- [Integrant](https://github.com/weavejester/integrant) for state management.\n- [walmartlabs/dyn-edn](https://github.com/walmartlabs/dyn-edn) for dynamic configuration.\n- [AppsFlyer/Ketu](https://github.com/appsflyer/ketu) as the Kafka library.\n- [AppsFlyer/lein-protodeps](https://github.com/AppsFlyer/lein-protodeps) to generate java classes from .proto files.\n- [AppsFlyer/pronto](https://github.com/AppsFlyer/pronto) to use protobuf simply in Clojure.\n\n## Examples\n\n    $ export KAFKA_BROKERS=my-broker:9092\n    $ lein uberjar\n    $ java -jar target/uberjar/sample-donkey-api-0.1.0-SNAPSHOT-standalone.jar\n    .. in another terminal session\n    $ curl --location --request POST 'http://localhost:8080/api/v1.0/stocks/order/AAPL' \\\n      --header 'Content-Type: application/json' \\\n      --data-raw '{\n      \"amount_usd\": 3.47,\n      \"request_id\": \"71dad7da-7926-40d8-9b15-b94a6d46e15a\",\n      \"ip\": \"35.244.183.10\",\n      \"direction\": \"buy\"\n      }'\n\n## Testing\n\n- `lein test` - To run all unit \u0026 integration tests.\n\n## License\n\nCopyright © 2021 Yevgeni Tsodikov\n\nThis program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\nhttp://www.eclipse.org/legal/epl-2.0.\n\nThis Source Code may also be made available under the following Secondary\nLicenses when the conditions for such availability set forth in the Eclipse\nPublic License, v. 2.0 are satisfied: GNU General Public License as published by\nthe Free Software Foundation, either version 2 of the License, or (at your\noption) any later version, with the GNU Classpath Exception which is available\nat https://www.gnu.org/software/classpath/license.html.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevg-tso%2Fsample-donkey-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevg-tso%2Fsample-donkey-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevg-tso%2Fsample-donkey-api/lists"}