This is a transaction pipeline that simulates how transactions flow through a fintech system in three stages — Ingestion, Validation, and Processing. It aims to demonstrate modern DevOps practices including containerisation, monitoring, CI/CD, and cloud deployment.
- Three stage transaction pipeline (Ingestion → Validation → Processing)
- Docker-based containerisation
- Continuous testing on every push with GitHub Actions
- Prometheus metrics and Grafana dashboard
- Kubernetes deployment with Minikube
- AWS infrastructure with Terraform
- Git & GitHub
- GitHub Actions (CI/CD)
- Docker & Docker Compose
- Python (FastAPI)
- MySQL
- Redis (message queue)
- Prometheus & Grafana
- Kubernetes (Minikube)
- Terraform (AWS)
project/
├── .github/workflows/ci.yml
├── ingestion/
│ ├── main.py
│ ├── Dockerfile
│ └── requirements.txt
├── validation/
│ ├── main.py
│ ├── Dockerfile
│ └── requirements.txt
├── processing/
│ ├── main.py
│ ├── Dockerfile
│ └── requirements.txt
├── db/
│ └── init.sql
├── prometheus/
│ └── prometheus.yml
├── scripts/
│ ├── load_check.sh
│ └── health_check.sh
├── k8s/
├── infra/
├── RUNBOOK.md
├── README.md
└── docker-compose.yml
Clone the repo:
git clone <repo-url>
cd SCA-fintech-pipelineBuild and start all containers:
docker compose up --buildCheck all containers are running:
./scripts/health_check.shSend 50 test transactions through the pipeline:
./scripts/load_check.shWatch live logs from all three services:
docker compose logs -f ingestion validation processingCheck the database is storing transactions:
docker compose exec db mysql -u user -ppassword transactions -e "SELECT * FROM transactions;"Open Grafana at http://localhost:3000 (login: admin/admin), add Prometheus as a datasource using http://prometheus:9090, then build your dashboard with these queries:
transactions_received_total
transactions_validated_total
transactions_failed_total
transactions_approved_total
Start Minikube:
minikube start
minikube statusIf Minikube throws an error, do a clean restart:
minikube stop
minikube delete
minikube startApply in order:
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/configmap.yaml
kubectl apply -f k8s/secrets.yaml
kubectl apply -f k8s/redis/
kubectl apply -f k8s/ingestion/
kubectl apply -f k8s/validation/
kubectl apply -f k8s/processing/Check pods and services:
kubectl get pods -n payment-pipeline
kubectl get services -n payment-pipelineNote: Ingestion, validation and processing will likely show
ErrImageNeverPullbecause Minikube runs a separate Docker environment. Fix it by loading the images manually:
eval $(minikube docker-env --unset)
docker build -t ingestion:latest ./ingestion
docker build -t validation:latest ./validation
docker build -t processing:latest ./processing
minikube image load ingestion:latest
minikube image load validation:latest
minikube image load processing:latestRun kubectl get pods -n payment-pipeline again — status should now show Running.
Test the pipeline is working inside Kubernetes:
minikube service ingestion -n payment-pipeline --urlUse the URL it returns to send a test transaction:
curl -X POST {minikube url}/transaction \
-H "Content-Type: application/json" \
-d '{"amount": 500, "currency": "NGN", "sender": "minikube_test", "receiver": "merchant_01"}'A 202 Accepted response means the pipeline is working inside Kubernetes.
Check logs to confirm the transaction flowed through all stages:
kubectl logs -n payment-pipeline deployment/validation
kubectl logs -n payment-pipeline deployment/processingYou should see action=validated and action=approved in the output.
Configure your AWS credentials first:
aws configureThen:
cd infra
terraform init
terraform plan
terraform apply -var="db_password=yourpassword"Important: Run
terraform destroywhen done to avoid unnecessary AWS charges:
terraform destroyStop Docker Compose and Minikube when done:
docker compose down
minikube stop