A microservice-based credential issuance and verification system built with Node.js, TypeScript, React, and Kubernetes. This is an assignment submission for Zupple Technologies
- Credential Issuance Service: Issue digital credentials with unique IDs
- Credential Verification Service: Verify issued credentials
- Scalable Architecture: Containerized microservices with Kubernetes
- Responsive Web Interface: Built with React and Material-UI
- Worker Tracking: Tracks which worker (pod) handles each request
- Node.js 18+
- Docker 20.10+
- Kubernetes (Minikube or cloud-based)
- npm or yarn
-
Frontend
- React with TypeScript
- Material-UI components
- Two main pages: Issuance and Verification
-
Backend Services
- Issuance Service: Handles credential creation and storage
- Verification Service: Validates credential authenticity
- Database: SQLite for persistence
-
Infrastructure
- Containerized with Docker
- Kubernetes for orchestration
- Auto-scaling based on load
git clone https://github.com/yourusername/kube-credential.git
cd kube-credentialcp .env.example .env
# Edit .env with your configuration# Install backend dependencies
cd services/issuance-service && npm install
cd ../verification-service && npm install
# Install frontend dependencies
cd ../../frontend
npm install# In separate terminals
cd services/issuance-service && npm run dev
cd services/verification-service && npm run devcd frontend
npm run dev# Build services
docker-compose build
# Or build individually
docker build -t kube-credential-issuance -f services/issuance-service/Dockerfile .
docker build -t kube-credential-verification -f services/verification-service/Dockerfile .
docker build -t kube-credential-frontend -f frontend/Dockerfile .# Create namespace
kubectl create namespace kube-credential
# Apply configurations
kubectl apply -f k8s/issuance-service/
kubectl apply -f k8s/verification-service/
kubectl apply -f k8s/frontend/
kubectl apply -f k8s/ingress/
# Check deployment status
kubectl get all -n kube-credential-
POST /api/issue
-
Description: Issue a new credential
-
Request Body:
{ "subject": { "name": "string", "email": "string" }, "issuer": "string", "data": { "course": "string", "grade": "string" } }
-
-
POST /api/verify
-
Description: Verify a credential
-
Request Body:
{ "subject": { "name": "string" }, "issuer": "string", "data": { "course": "string", "grade": "string" } }
-
# Backend tests
cd services/issuance-service && npm test
cd ../verification-service && npm test
# Frontend tests
cd ../../frontend && npm test# Issue a credential
curl -X POST http://localhost:3001/api/issue \
-H "Content-Type: application/json" \
-d '{
"subject": {"name":"John Doe","email":"[email protected]"},
"issuer": "Zupple Labs",
"data": {"course":"Blockchain","grade":"A"}
}'
# Verify a credential
curl -X POST http://localhost:3002/api/verify \
-H "Content-Type: application/json" \
-d '{
"subject": {"name":"John Doe"},
"issuer": "Zupple Labs",
"data": {"course":"Blockchain","grade":"A"}
}'# View logs
kubectl logs -n kube-credential -l app=issuance-service
kubectl logs -n kube-credential -l app=verification-service
# View pod status
kubectl get pods -n kube-credential
# View services
kubectl get svc -n kube-credential-
Microservices Architecture
- Separate issuance and verification services
- Independent scaling of services
- Clear API boundaries
-
Worker Tracking
- Each request is tagged with worker ID
- Easy debugging and monitoring
- Load balancing across pods
-
Frontend
- Responsive design
- Form validation
- Clear user feedback
-
Deployment
- Containerized with Docker
- Kubernetes manifests for production
- Environment-based configuration