{"id":15292476,"url":"https://github.com/prodyna/dapr-demo","last_synced_at":"2026-01-20T03:02:14.160Z","repository":{"id":38107910,"uuid":"468072675","full_name":"PRODYNA/dapr-demo","owner":"PRODYNA","description":"DAPR Demo application","archived":false,"fork":false,"pushed_at":"2023-09-13T00:44:32.000Z","size":504,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-15T06:09:12.395Z","etag":null,"topics":["dapr","kubernetes","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","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/PRODYNA.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}},"created_at":"2022-03-09T19:52:38.000Z","updated_at":"2022-06-28T08:11:45.000Z","dependencies_parsed_at":"2024-01-26T05:09:49.902Z","dependency_job_id":"59dbc6a0-c307-4530-b788-eacf6455cf31","html_url":"https://github.com/PRODYNA/dapr-demo","commit_stats":null,"previous_names":["dkrizic/demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PRODYNA/dapr-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRODYNA%2Fdapr-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRODYNA%2Fdapr-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRODYNA%2Fdapr-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRODYNA%2Fdapr-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PRODYNA","download_url":"https://codeload.github.com/PRODYNA/dapr-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRODYNA%2Fdapr-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28594958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"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":["dapr","kubernetes","terraform"],"created_at":"2024-09-30T16:18:07.206Z","updated_at":"2026-01-20T03:02:14.139Z","avatar_url":"https://github.com/PRODYNA.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# demo\nDAPR Demo application\n\n![Overview](images/overview.png)\n\n## Installation\n\nConfigure and lauch minikube\n\n```\nminikube config set memory 8000\nminikube config set cpus 4\nminikube config set kubernetes-version 1.23.3\nminikube start\n```\n\nOnce minikube is running enable the ingress controller\n\n```\nminikube addons enable ingress\n```\n\nRead out the IP address of minikube with\n\n```\nminikube ip\n```\n\nand write those entries to your /etc/hosts\n\n```\n\u003cminikube-ip\u003e dapr.minikube backend.minikube grafana.minikube prometheus.minikube\n```\n\nIn the subdirectory terraform run terraform apply, but first only for the resources that create CRDs\n\n```\nterraform apply -target=helm_release.kube-prometheus-stack -target=helm_release.dapr-system\n```\n\nThen create everything else\n\n```\nterraform apply\n```\n\nThis will install \n\n* DAPR in the namespace dapr-system\n* The business services\n* Monitoring\n\n### DAPR\n\nDAPR should be available under the http://dapr.minikube and show our services\n\n![DAPR Overview](images/dapr-overview.png)\n\nand the following components\n\n![DAPR Components](images/dapr-components.png)\n\n## Number\n\nNumber will return an incrementing number\n\n```\ncurl http://backend.minikube/number\n```\n\nThis call should return an incrementing value\n\n## Checkout\n\nCreate a checkout. It does two things\n\n* Call the number service to obtain a number\n* Create a message to the topic checkout\n\n```\ncurl -XPOST http://backend.minikube/checkout\n```\n \n## Order \n\nSubscribed to the topic checkout\n\n```\ncurl http://backend.minikube/order\n```\n\n## Redis\n\nRedis is used for the persistence\n\n```\nkubectl -n messaging exec -ti redis-master-0 -- redis-cli --pass redis keys \\* \n```\n\n### State\n\nRedis is a state store\n\n```\nkubectl -n messaging exec -ti redis-master-0 -- redis-cli --pass redis hgetall 'number||orderNumber'\n```\n\nshould return something like\n\n```\n1) \"data\"\n2) \"5\"\n3) \"version\"\n4) \"5\"\n```\n\n### Stream\n\nStreams are used for sending asynchrous messages.\n\n```\nkubectl -n messaging exec -ti redis-master-0 -- redis-cli --pass redis xrange checkout - +\n```\n\nshould give you some output like\n\n```\n1) 1) \"1654699830640-0\"\n   2) 1) \"data\"\n      2) \"{\\\"datacontenttype\\\":\\\"text/plain\\\",\\\"source\\\":\\\"checkout\\\",\\\"type\\\":\\\"com.dapr.event.sent\\\",\\\"tracestate\\\":\\\"\\\",\\\"traceparent\\\":\\\"00-22295cc10dd4eb53ae9879363d0e4943-11aac0459158b429-00\\\",\\\"data\\\":\\\"1\\\",\\\"id\\\":\\\"e20734c9-607d-4b11-94fd-bd735c43bea4\\\",\\\"specversion\\\":\\\"1.0\\\",\\\"topic\\\":\\\"checkout\\\",\\\"pubsubname\\\":\\\"pubsub\\\",\\\"traceid\\\":\\\"00-22295cc10dd4eb53ae9879363d0e4943-11aac0459158b429-00\\\"}\"\n2) 1) \"1654699925789-0\"\n   2) 1) \"data\"\n      2) \"{\\\"data\\\":\\\"2\\\",\\\"source\\\":\\\"checkout\\\",\\\"pubsubname\\\":\\\"pubsub\\\",\\\"traceparent\\\":\\\"00-7644aab7b8b858c9f99883fe6f6b8b03-07930bba2d1eccc5-00\\\",\\\"tracestate\\\":\\\"\\\",\\\"topic\\\":\\\"checkout\\\",\\\"traceid\\\":\\\"00-7644aab7b8b858c9f99883fe6f6b8b03-07930bba2d1eccc5-00\\\",\\\"id\\\":\\\"763d3813-887c-4bc1-a50b-94a83f28cfbc\\\",\\\"specversion\\\":\\\"1.0\\\",\\\"datacontenttype\\\":\\\"text/plain\\\",\\\"type\\\":\\\"com.dapr.event.sent\\\"}\"\n```\n\n## Tips\n\nRestart all business services pods\n\n```\nkubectl -n backend get deployments | grep -v NAME | awk '{print $1}' | xargs kubectl -n backend rollout restart deployment\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodyna%2Fdapr-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprodyna%2Fdapr-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprodyna%2Fdapr-demo/lists"}