A production-ready, cloud-native polling application demonstrating modern DevOps practices, microservices architecture, and full-stack development skills.
This project showcases a full-stack polling application built with a microservices architecture and deployed to Azure Kubernetes Service (AKS). It demonstrates proficiency in modern software development, containerization, orchestration, and CI/CD practices.
What makes this project special:
- β Production-grade microservices architecture
- β Automated CI/CD pipelines with GitHub Actions
- β Kubernetes orchestration on Azure AKS
- β GitOps workflow with ArgoCD
- β Container registry management with Docker Hub
The application follows a microservices pattern with clear separation of concerns:
Frontend CI/CD Flow
Backend CI/CD Flow
Frontend Service
- React-based SPA
- Deployed to Vercel for edge optimization
- Communicates with backend via API gateway
Backend Services
-
Polling Service (Port 8000)
- Manages polls and nominations
- Handles voting logic
- Real-time vote counting
-
User Service (Port 8001)
- User authentication & authorization
- JWT-based session management
- Secure password hashing with bcrypt
Infrastructure Components
- Nginx API Gateway: Routes requests to appropriate microservices
- MongoDB: Persistent data storage with StatefulSet
- Docker Hub: Container image registry
- Azure AKS: Kubernetes cluster for orchestration
- ArgoCD: GitOps continuous delivery tool
Internet β Nginx API Gateway (80)
β
βββββββββββββββββ΄ββββββββββββββββ
β β
Polling Service (8000) User Service (8001)
β β
βββββββββββββββββ¬ββββββββββββββββ
β
MongoDB (27017)
- React - UI library
- React Router - Client-side routing
- Axios - HTTP client
- Bulma CSS - Responsive styling
- Chart.js - Data visualization
- Vite - Build tool and dev server
- Vitest - Unit testing
- Node.js - Runtime environment
- Express.js - Web framework
- MongoDB - NoSQL database
- Mongoose - ODM for MongoDB
- JWT - Authentication tokens
- Bcrypt - Password hashing
- Jest/Supertest - Testing framework
- Docker - Containerization
- Docker Compose - Local orchestration
- Kubernetes - Production orchestration
- Azure AKS - Managed Kubernetes service
- ArgoCD - GitOps CD tool
- GitHub Actions - CI/CD automation
- Nginx - Reverse proxy & load balancer
- Docker Hub - Container registry
- β User registration and authentication
- β Create custom polls
- β Add multiple nominations to polls
- β Real-time voting with instant updates
- β Visual vote results with charts
- β Responsive design for all devices
- β Stateless microservices for horizontal scaling
- β JWT-based authentication
- β RESTful API design
- β Database connection pooling
- β Health checks and readiness probes
- β Graceful shutdown handling
- β CORS-enabled API
Each microservice is containerized with optimized Docker images:
Multi-stage builds for reduced image size:
FROM node:22-slim
WORKDIR /src
COPY package*.json ./
RUN npm ci --only=production
COPY . .
EXPOSE 8000
CMD ["npm", "start"]Image optimization results:
- Production-only dependencies
- Minimal base images (node:22-slim)
- Layer caching for faster builds
ArgoCD Application Management Interface
Detailed view of Kubernetes deployments, services, and pods with ArgoCD
Deployment Strategy:
- Rolling updates with zero downtime
- Resource limits and requests defined
- Liveness and readiness probes configured
- ConfigMaps for environment-specific config
- Secrets for sensitive data
- Persistent volumes for database
Sample Kubernetes Configuration:
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "250m"
memory: "256Mi"
readinessProbe:
httpGet:
path: /api/polling/hello
port: 8000
initialDelaySeconds: 15
periodSeconds: 10- Declarative infrastructure management
- Automatic sync from Git repository
- Visual deployment tracking
- Rollback capabilities
- Health status monitoring
Application showing "Healthy" and "Synced" status in production
- Node.js 22+
- Docker & Docker Compose
- Git
- Clone the repositories:
# Backend
git clone https://github.com/yourusername/microservice-app-server.git
cd microservice-app-server
# Frontend (separate terminal)
git clone https://github.com/yourusername/microservice-app-client.git
cd microservice-app-client- Set up environment variables:
# In backend directory
cp .env.example .env
# Edit .env with your configuration- Start services with Docker Compose:
docker-compose up -d- Access the application:
- Frontend: http://localhost:3000
- Polling Service: http://localhost:8000
- User Service: http://localhost:8001
- MongoDB: localhost:27017
# View logs
docker-compose logs -f
# Restart a service
docker-compose restart polling-service
# Stop all services
docker-compose down
# Remove all data
docker-compose down -v# Run backend tests
npm test
# Run frontend tests
cd microservice-app-client
npm test
# Run with coverage
npm test -- --coverage
Azure Kubernetes Service cluster configuration details
Cluster Specifications:
- Kubernetes Version: 1.32.7
- Region: East Asia
- Node Pool: 1 node (scalable)
- Network: Azure CNI Overlay
- Load Balancer: Standard SKU
- Build Docker images (automated via GitHub Actions)
- Push to Docker Hub with version tags
- Update Kubernetes manifests with new image tags
- ArgoCD detects changes and syncs cluster state
- Rolling update deploys new version
List of Kubernetes services
All pods in Running state with restart counts and ages*
Service Endpoints:
- Nginx LoadBalancer: External access point
- Polling Service: Internal ClusterIP
- User Service: Internal ClusterIP
- MongoDB: Internal ClusterIP with StatefulSet
MongoDB StatefulSet:
- Persistent Volume Claims for data retention
- Automatic pod rescheduling on node failure
- Init scripts for schema setup
- Secrets management for credentials
1. Polling Service Pipeline
Trigger β Test β Build Docker Image β Push to Registry β Update K8s Manifests2. User Service Pipeline
Trigger β Test β Build Docker Image β Push to Registry β Wait for Polling* β Update K8s Manifests*Implements concurrency control to prevent manifest conflicts
3. Frontend Pipeline
Trigger β Test β Build β Deploy to Vercel- β Automated Testing: All tests must pass before deployment
- β Docker Layer Caching: Faster builds with GitHub Actions cache
- β Semantic Versioning: Images tagged with build numbers
- β Concurrency Control: Prevents race conditions in manifest updates
- β Automatic Rollback: Failed deployments trigger alerts
- β Environment Separation: Different configs for dev/staging/prod
To handle concurrent updates, the User Service workflow includes:
- Detection of running Polling Service CI
- Wait mechanism (up to 10 minutes)
- Sequential manifest updates
- Conflict prevention
-
Microservices Complexity
- Managing inter-service communication requires careful planning
- Service discovery and health checks are critical
- Distributed logging becomes essential at scale
-
CI/CD Challenges
- Concurrent pipeline runs need synchronization
- Manifest updates require careful version control
- Testing in production-like environments is crucial
-
Kubernetes Operations
- Proper resource limits prevent cluster instability
- Readiness probes are different from liveness probes
- StatefulSets are necessary for databases
-
GitOps Benefits
- Declarative infrastructure is easier to manage
- Git history provides audit trail
- Rollbacks are straightforward
- β Infrastructure as Code for reproducibility
- β Automated testing in CI pipeline
- β Container image versioning
- β Health checks for all services
- β Secrets management
- β Documentation as code
- Frontend Repository: microservice-app-client
- Backend Repository: microservice-app-server
Built with modern DevOps practices and cloud-native technologies to demonstrate real-world production deployment skills.
Technologies: React β’ Node.js β’ Express β’ MongoDB β’ Docker β’ Kubernetes β’ Azure AKS β’ ArgoCD β’ GitHub Actions β’ Nginx
Last Updated: October 2025