{"id":25050616,"url":"https://github.com/steadybit/shopping-demo","last_synced_at":"2026-04-08T14:08:42.031Z","repository":{"id":40674297,"uuid":"343723243","full_name":"steadybit/shopping-demo","owner":"steadybit","description":"Showcase application for demo purposes.","archived":false,"fork":false,"pushed_at":"2026-04-07T13:17:00.000Z","size":18099,"stargazers_count":6,"open_issues_count":1,"forks_count":6,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-04-07T13:20:06.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steadybit.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-02T09:50:05.000Z","updated_at":"2026-04-07T13:17:04.000Z","dependencies_parsed_at":"2023-02-17T07:16:16.011Z","dependency_job_id":"b9265cd9-8c14-49f0-92b5-43e821a2de89","html_url":"https://github.com/steadybit/shopping-demo","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/steadybit/shopping-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fshopping-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fshopping-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fshopping-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fshopping-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steadybit","download_url":"https://codeload.github.com/steadybit/shopping-demo/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steadybit%2Fshopping-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31558456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T10:21:54.569Z","status":"ssl_error","status_checked_at":"2026-04-08T10:21:38.171Z","response_time":54,"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":[],"created_at":"2025-02-06T09:16:58.876Z","updated_at":"2026-04-08T14:08:42.019Z","avatar_url":"https://github.com/steadybit.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Steadybit Shopping Demo\n\n## Introduction\n\nA microservices demo application for exploring Chaos Engineering with [Steadybit](https://steadybit.com).\nThe app is a product catalog with checkout, order processing, and notifications — built to showcase resilience patterns and failure modes.\n\n## Architecture\n\nThe live architecture overview with real-time health status is available in the UI at `/#/overview`.\n\n![Architecture](./architecture.svg)\n\n### Core Services\n\n| Service | Tech | Description |\n|---------|------|-------------|\n| **Gateway** | Java / Spring Boot | API gateway — proxies all requests, aggregates products, health checks |\n| **Fashion Bestseller** | Java / Spring Boot | Product catalog for fashion items |\n| **Toys Bestseller** | Go or Java | Product catalog for toys |\n| **Hot Deals** | Java / Spring Boot | Product catalog for hot deals |\n| **Inventory** | Go | Stock availability service used by all product services |\n| **Checkout** | Go | Cart management (Redis) and order submission (Kafka or ActiveMQ) |\n| **Orders** | Go | Consumes orders from Kafka, publishes events to RabbitMQ |\n| **Notification** | Go | Subscribes to order events from RabbitMQ |\n\n### Infrastructure (all opt-in via Helm values)\n\n| Component | Default | Purpose |\n|-----------|---------|---------|\n| **Redis** | disabled | Cart caching for checkout (`cart:{id}` keys, 24h TTL) |\n| **Kafka** | disabled | Async messaging between checkout and orders |\n| **ActiveMQ** | disabled | Alternative to Kafka for checkout → orders messaging |\n| **RabbitMQ** | disabled | Event bus between orders and notification |\n\n### Request Flow\n\n```\nUser → Gateway → Fashion / Toys / Hot Deals → Inventory\n                → Checkout → Redis (cart cache)\n                           → Kafka/ActiveMQ → Orders → RabbitMQ → Notification\n```\n\n## API Endpoints\n\n### Products\n\nThe gateway exposes products via `/products` with multiple resilience strategies:\n\n| Endpoint | Timeout | Fallback | Retry | Circuit Breaker | Behavior on failure |\n|----------|:-------:|:--------:|:-----:|:---------------:|---------------------|\n| `/products` | No | No | No | No | HTTP 500 or infinite delay |\n| `/products/exception` | No | Yes (catch) | No | No | Category omitted on error, infinite delay on slow response |\n| `/products/timeout` | Yes | Yes (catch) | No | No | Category omitted on error or slow response |\n| `/products/retry` | Yes | Yes (resilience4j) | Yes | No | Like timeout, with 3 retries at 500ms intervals |\n| `/products/circuitbreaker` | Yes | Yes (resilience4j) | Yes | Yes | Like retry, with circuit breaker to prevent overload |\n| `/products/parallel` | 30s default | No | No | No | Parallel fetch, same failure modes as basic |\n\n### Checkout\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `POST` | `/checkout/direct` | Synchronous checkout — publishes order to Kafka/ActiveMQ immediately |\n| `POST` | `/checkout/buffered` | Async checkout — saves cart to Redis, background worker publishes to Kafka |\n| `GET` | `/checkout/cart/{id}` | Retrieve a cart from Redis cache |\n\n### Health\n\n| Endpoint | Description |\n|----------|-------------|\n| `GET /api/health/dependencies` | Aggregated health of all deployed services (parallel checks, 500ms timeout) |\n\nThe health endpoint dynamically includes only deployed components — services behind disabled Helm values are excluded.\n\n## Deploying the Application\n\n### Installation via Helm\n\n```sh\nhelm repo add steadybit-shopping-demo https://steadybit.github.io/shopping-demo\nhelm repo update\nhelm upgrade steadybit-shopping-demo \\\n    --install \\\n    --wait \\\n    --timeout 5m0s \\\n    --set gateway.service.type=ClusterIP \\\n    steadybit-shopping-demo/steadybit-shopping-demo\n```\n\n### Enabling Optional Components\n\n```yaml\n# values.yaml\nredis:\n  enabled: true\n\nkafka:\n  enabled: true\n\nrabbitmq:\n  enabled: true\n\nnotification:\n  enabled: true  # requires rabbitmq.enabled=true\n```\n\n## Testing the Full Chain\n\nOnce deployed with Redis, Kafka, RabbitMQ, and Notification enabled, you can test the entire flow:\n\n```sh\n# 1. Fetch products through the gateway\ncurl https://\u003cyour-host\u003e/products\n\n# 2. Add an item to the cart (saved in Redis)\ncurl -X POST https://\u003cyour-host\u003e/checkout/buffered \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"id\": \"demo-cart\", \"items\": [{\"productId\": \"1\", \"quantity\": 2, \"price\": 9.99}]}'\n\n# 3. Retrieve the cart from Redis\ncurl https://\u003cyour-host\u003e/checkout/cart/demo-cart\n\n# 4. Submit an order directly (bypasses Redis, publishes to Kafka/ActiveMQ immediately)\ncurl -X POST https://\u003cyour-host\u003e/checkout/direct \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"id\": \"order-1\", \"items\": [{\"productId\": \"1\", \"quantity\": 1, \"price\": 9.99}]}'\n\n# 5. Check the health of all dependencies\ncurl https://\u003cyour-host\u003e/api/health/dependencies\n```\n\nThe buffered flow: checkout saves to Redis → background worker publishes to Kafka → orders consumes and publishes to RabbitMQ → notification consumes the event.\n\n## CI/CD Integration\n\n### Experiments\n\nRun experiments continuously to validate resilience. For a GitOps approach, version your experiments and run them on pull requests.\n\n- [GitHub Action definition](https://github.com/steadybit/shopping-demo/blob/develop/.github/workflows/run-experiments.yml)\n- [Latest runs](https://github.com/steadybit/shopping-demo/actions/workflows/run-experiments.yml)\n- [Blog post: GitOps + Chaos Engineering](https://steadybit.com/blog/boost-your-gitops-practices-by-integrating-chaos-engineering-with-steadybit)\n\n[![GITHUB-17](https://platform.steadybit.com/api/experiments/GITHUB-17/badge.svg?tenantKey=demo\u0026scale=1)](https://platform.steadybit.com/experiments/GITHUB/edit/GITHUB-17?tenant=demo)\n\n### Advice\n\nValidate advice status for targets from your CI/CD pipeline using the Steadybit CLI.\n\n- [GitHub Action definition](https://github.com/steadybit/shopping-demo/blob/develop/.github/workflows/advice.yml)\n- [Latest runs](https://github.com/steadybit/shopping-demo/actions/workflows/advice.yml)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadybit%2Fshopping-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteadybit%2Fshopping-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteadybit%2Fshopping-demo/lists"}