How june21621/car-pay-in-private works
This repository combines CarPayIn service code with a small slice of its private-cloud operations. The README’s principal private-cloud workflow is monitoring-triggered scaling: alerts reach the webhook adapter, which triggers GitLab CI and Ansible to adjust k3s capacity. The private-cloud runtime serves mock-card behind Octavia and Traefik. The tree does not include the documented Terraform or Ansible sources, so those operational components are represented as documented external systems; the broader AWS-hosted services are not expanded here.
Main entry points: card.py Card API · main.py Webhook adapter · approve_card_payment.py Card approval · verify_and_tokenize_card.py Card tokenization
Components 14
Autoscaling
- Prometheus
- AlertManager
- Webhook adapter
infra/webhook-adapter/main.py - GitLab CI
- Ansible scaling
Private Runtime
- k3s cluster
- Octavia LB
- Traefik ingress
- WireGuard VPN
Card Service
- Card API
services/mock-card/app/api/routes/card.py - Card approval
services/mock-card/app/application/card/approve_card_payment.py - Card tokenization
services/mock-card/app/application/card/verify_and_tokenize_card.py - Card database
services/mock-card/app/infra/db/models.py
Other components
- AWS traffic
Connections 11
- Prometheus → AlertManager: alerts on CPU
- AlertManager → Webhook adapter: posts alerts
- Webhook adapter → GitLab CI: triggers pipeline
- GitLab CI → Ansible scaling: runs scaling
- Ansible scaling → k3s cluster: adds or drains nodes
- AWS traffic → WireGuard VPN: tunnels traffic
- WireGuard VPN → Octavia LB: DNATs to VIP
- Octavia LB → Traefik ingress: forwards traffic
- Traefik ingress → Card API: routes to pods
- Card API → Card approval: invokes
services/mock-card/app/api/routes/card.py - Card API → Card tokenization: invokes
services/mock-card/app/api/routes/card.py