{"id":32868499,"url":"https://github.com/h-bayer/pos","last_synced_at":"2026-04-08T22:32:27.391Z","repository":{"id":318670649,"uuid":"1072223501","full_name":"h-bayer/pos","owner":"h-bayer","description":"POS and Spring Boot Playground","archived":false,"fork":false,"pushed_at":"2025-11-04T15:34:59.000Z","size":211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-09T08:14:35.010Z","etag":null,"topics":["docker","fun","helm","kafka","kubernetes","play","postgresql","spring"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h-bayer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"audit-service/pom.xml","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":"2025-10-08T12:30:37.000Z","updated_at":"2025-11-04T15:35:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"25974ddf-20d9-448b-89ad-64349a2087c1","html_url":"https://github.com/h-bayer/pos","commit_stats":null,"previous_names":["h-bayer/pos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/h-bayer/pos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h-bayer%2Fpos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h-bayer%2Fpos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h-bayer%2Fpos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h-bayer%2Fpos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h-bayer","download_url":"https://codeload.github.com/h-bayer/pos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h-bayer%2Fpos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31577444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","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":["docker","fun","helm","kafka","kubernetes","play","postgresql","spring"],"created_at":"2025-11-09T08:01:23.262Z","updated_at":"2026-04-08T22:32:27.384Z","avatar_url":"https://github.com/h-bayer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# POS (Maven multi-module, Spring Boot 3.5.5, Java 24)\n\nMulti-module services with Postgres/JPA, Redis, Kafka demos, Docker \u0026 Helm.\nEach service exposes:\n- `GET /api/hello`\n- DB: `POST /api/db/greet?message=Hi`, `GET /api/db/all`\n- Redis: `POST /api/redis/set?key=k\u0026value=v`, `GET /api/redis/get?key=k`\n- Kafka: `POST /api/kafka/publish?value=foo`, `GET /api/kafka/last`\n\n## Local development (Docker Compose)\n```bash\ndocker compose up -d             # start Postgres, Redis, Redpanda (persistent volumes)\n./scripts/build-all.sh           # build all jars\ncd edge-pos-api \u0026\u0026 mvn spring-boot:run\n# http://localhost:8080/api/hello\n```\n## Portforwarding \n```bash\nkubectl -n pos port-forward svc/postgres 5432:5432 \u0026 #portforward as background job in bash. \n# Only as long as shell is open. first port is localhost:5432, second in pod 5432\n\njobs #shows the running jobs in shell\n\nkill %ID #kills the job with the id ID  \n```\nfor Redis\n```bash\nkubectl -n pos port-forward svc/redis 6379:6379 \u0026\n```\nfor Kafka\n```bash\nkubectl -n pos port-forward svc/redpanda 19092:9092 \u0026\n```\n## deploy all of the serices\n```bash\nhelm upgrade --install pos deploy/helm/pos -n pos -f deploy/helm/pos/values.yaml\n```\n\n## Build single service and deploy using helm\n```bash\n# 1) go to the module folder\ncd edge-pos-api\n\n# 2) set the new version just for this module\nmvn -q versions:set -DnewVersion=0.0.2-SNAPSHOT -DgenerateBackupPoms=false\nmvn -q versions:commit\n\n# 3) verify\nmvn -q -DforceStdout help:evaluate -Dexpression=project.version\n# -\u003e 0.0.2-SNAPSHOT\n\n# from the project root\n# build only this module\nmvn -q -DskipTests -pl edge-pos-api -am package\n\nAPP_VER=0.0.3\ndocker build -f docker/Dockerfile.jvm \\\n  --build-arg MODULE=edge-pos-api \\\n  -t edge-pos-api:${APP_VER} .\n\nhelm upgrade --install pos deploy/helm/pos -n pos \\\n  -f deploy/helm/pos/values-dockerdesktop.yaml \\\n  --set edge-pos-api.image.repository=\"edge-pos-api\" \\\n  --set edge-pos-api.image.tag=\"${APP_VER}\" \\\n  --set edge-pos-api.image.pullPolicy=\"Never\"\n  \nkubectl -n pos rollout status deploy/pos-edge-pos-api\n\ncurl http://pos.localtest.me/edge/api/hello\n```\nlist all Helm installs\n```bash\nhelm list -A\n# Columns:\n# NAME | NAMESPACE | REVISION | UPDATED | STATUS | CHART (name-version) | APP VERSION\n\n## Build container images\n```bash\n./scripts/build-all.sh\n./scripts/docker-build.sh        # creates \u003cservice\u003e:0.0.1 locally\n```\n\nlist deployed workloads and what is running\n```bash\nkubectl get deploy,sts,ds -A \\\n  -o custom-columns=KIND:.kind,NS:.metadata.namespace,NAME:.metadata.name,IMAGES:.spec.template.spec.containers[*].image\n\n```\n\n## Kubernetes on Docker Desktop (Helm)\n```bash\n# one-shot installer: ingress + infra + apps + gateway\n./scripts/helm-install-all.sh\n\n# or step-by-step\n./scripts/helm-install-ingress.sh      # nginx ingress controller\n./scripts/helm-install-infra.sh        # Postgres/Redis/Redpanda (PVCs)\n./scripts/helm-deps.sh\n./scripts/helm-install-apps.sh         # app Deployments/Services\n./scripts/helm-install-gateway.sh      # path-based Ingress\n```\n\n### Access\n- Host: http://pos.localtest.me\n- Examples:\n  - http://pos.localtest.me/edge/api/hello\n  - http://pos.localtest.me/inventory/api/hello\n\n## Persistence \u0026 credentials\n- Docker volumes: `pgdata`, `redisdata`, `redpandadata`.\n- Helm infra PVCs: Postgres (1Gi), Redis (1Gi), Redpanda (5Gi).\n- Postgres creds: `admin` / `admin` (dev only).\n- Each service has a unique DB (e.g., `pos_edge_pos_api`, `pos_pricing_service`, ...).\n\n## Using a remote registry (optional)\n```bash\nREGISTRY=registry.example.com/pharmacy VERSION=0.0.1 ./scripts/docker-build.sh\nREGISTRY=registry.example.com/pharmacy VERSION=0.0.1 ./scripts/docker-push.sh\nhelm upgrade --install pos deploy/helm/pos -n pos -f deploy/helm/pos/values.yaml   --set global.image.registry=registry.example.com/pharmacy\n```\n\n# Kafka\n```bash\n\n#create a test event and send it to Kafka\n printf 'test-key\\ttest-value\\n' | kcat -b localhost:19092 -t productEvents -K $'\\t' -P\n\n#check is the event is send to kafka and processed\nkcat -b localhost:19092 -t productEvents -C -o beginning -e\n\n#redpanda commands\nrpk topic list\nrpk topic delete productEvents\nrpk topic create productEvents -p 6 -r 1\n\n#for kafka running in pod (we are using redpanda so far)\nkubectl exec -it \u003ckafka-pod-name\u003e -n \u003cnamespace\u003e -- bash\ncd /opt/kafka/bin\n./kafka-topics.sh --bootstrap-server localhost:9092 --list\n\n\n# Letzte N Nachrichten holen\nrpk topic consume productEvents --brokers localhost:19092 --num 10\n\n# Live mitlesen (folgt neuen Nachrichten)\nrpk topic consume productEvents --brokers localhost:19092 -f\n\n# Welche Gruppen gibt’s?\nrpk group list --brokers localhost:19092\n\n# Deine Gruppe ansehen (z. B. inventory-cg)\nrpk group describe inventory-cg --brokers localhost:19092\n\n# Offsets für productEvents an den Anfang setzen\nrpk group seek inventory-cg --to-start -t productEvents --brokers localhost:19092\n\n# erase all data but keep topic\nrpk topic alter-config productEvents --set retention.ms=0 --brokers localhost:19092\nsleep 5   # allow background deletion\nrpk topic alter-config productEvents --set retention.ms=604800000 --brokers localhost:19092\n\n\n```\n\n### McpInspector\n```bash\n#start the inspector  https://github.com/modelcontextprotocol/inspector\n\nnpx @modelcontextprotocol/inspector\n\n#url http://localhost:8085/sse\n#TransportType: SSE\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh-bayer%2Fpos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh-bayer%2Fpos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh-bayer%2Fpos/lists"}