Elevating Digital Auctions with Dynamic Bidding, Instant Notifications, and Unparalleled Scalability
- ⭐ Overview
- ✨ Key Features
- 🛠️ Architecture & Requirements
- 🚀 Local Deployment (Minikube & Ansible)
- 🔧 Usage
The Realtime Auction System is a robust, scalable platform designed to facilitate dynamic online auctions with immediate user feedback. Built as a comprehensive microservices ecosystem with Spring Boot, React, and MySQL, the entire system is architected exclusively for Kubernetes deployment.
Important Note: This project relies on Kubernetes
StatefulSetresources andPersistentVolumeClaimsto guarantee database persistence across pod restarts. Standalone local execution (e.g., running services directly via Maven) is not fully supported, as data will not persist effectively outside of the orchestrated cluster environment.
- Real-time Bidding & Notifications: Powered by WebSockets for instant client updates.
- Microservices Architecture: Independent services (
auction-service,bidding-service,auth-service) managed by Eureka and an API Gateway. - Persistent Data: MySQL databases running as Kubernetes StatefulSets.
- Automated Infrastructure: Full deployment orchestration via Ansible playbooks.
- Backend: Java 21, Spring Boot 3.4, Spring Cloud, Maven
- Frontend: React 19, Vite, Tailwind CSS
- Database: MySQL 8.4
- DevOps: Docker, Kubernetes (Minikube), Ansible
Ensure you have the following installed on your Linux machine (tested on Fedora/RHEL):
- Java Development Kit (JDK) 21 (Must be set as default compiler via
alternatives) - Apache Maven 3.9+
- Docker Engine
- Minikube (Using the
dockerdriver) - Ansible & Ansible Kubernetes Collection
pip3 install kubernetes ansible-galaxy collection install kubernetes.core
Follow these steps exactly to deploy the entire ecosystem to your local Minikube cluster.
We use the Docker driver to avoid complex KVM firewall restrictions, ensuring the cluster has internet access for pulling base images.
# Start Minikube with required resources
minikube start --memory=6144 --cpus=4 --driver=docker
# Enable required addons for networking and scaling
minikube addons enable ingress
minikube addons enable metrics-serverCompile all Spring Boot microservices.
cd backend
mvn clean package -DskipTests
cd ..(Note: Ensure your JAVA_HOME or default javac points to Java 21, otherwise Lombok compilation will fail).
Instead of pushing images to Docker Hub, we point our local Docker CLI directly to Minikube's internal Docker daemon. This allows Kubernetes to immediately see our newly built images.
# Point shell to Minikube's Docker daemon
eval $(minikube docker-env)
# Build Backend Images
docker build -t ankur2k19/eureka-server:latest backend/eureka-server/
docker build -t ankur2k19/api-gateway:latest backend/api-gateway/
docker build -t ankur2k19/auth-service:latest backend/auth-service/
docker build -t ankur2k19/auction-service:latest backend/auction-service/
docker build -t ankur2k19/bidding-service:latest backend/bidding-service/
# Build Frontend Image
docker build -t ankur2k19/auction-system-frontend:latest frontend/All secure credentials (database passwords, JWT secrets) are safely stored in an encrypted Ansible Vault. The default vault already contains development credentials (e.g., username ankur).
When you run the deployment in the next step, Ansible will decrypt this vault, create a Kubernetes Secret (auth-service-secrets, etc.), and the Spring Boot applications will automatically use those credentials instead of their local application.yml defaults.
To view the existing vault credentials:
cd devops
ansible-vault view ansible/backend/vault/secrets.yml --vault-password-file ansible/backend/vault_pass.txt
cd ..The project includes automated Ansible playbooks that create the Kubernetes namespace, configure secrets, deploy StatefulSets for MySQL, and spin up all microservices and Ingress controllers.
1. Deploy Backend & Databases:
cd devops
ansible-playbook -i ansible/backend/inventory \
ansible/backend/deploy.yml \
--vault-password-file ansible/backend/vault_pass.txt2. Deploy Frontend:
cd devops
ansible-playbook -i ansible/frontend/inventory ansible/frontend/ansible_playbook.ymlMonitor the pods until they are all in the Running state. The MySQL pods may take a few minutes to initialize their Persistent Volumes.
kubectl get pods -n auction-system -wOnce all pods are running successfully, you can access the application via Minikube's networking.
Option A: Minikube Service (Easiest)
minikube service frontend-service -n auction-systemOption B: Host File Routing (For Ingress)
To use the configured DNS names, add the Minikube IP to your /etc/hosts file:
# Get the IP
minikube ip
# Add this line to /etc/hosts (replace MINIKUBE_IP with the actual IP)
# MINIKUBE_IP api.local frontend.auction.comYou can then access the app at http://frontend.auction.com and the APIs at http://api.local.
Because we use Kubernetes StatefulSet with PersistentVolumeClaims, your database data is safe. You can test this by deleting a MySQL pod:
kubectl delete pod mysql-auth-0 -n auction-systemKubernetes will immediately recreate the pod, and your previously created users/auctions will still exist because the new pod automatically reattaches to the Persistent Volume.