Microservice Pet Clinic
A fully distributed, cloud-native application demonstrating the power of microservices architecture using Java, Golang, Node.js, and Python.
Features
Microservices Architecture
Independently deployed services that work together to create a robust system.
Service Discovery
Eureka / Consul for dynamic service registration and discovery.
API Gateway
Kong / Traefik for centralized request handling and routing.
Configuration Management
Spring Cloud Config / HashiCorp Vault for centralized configuration.
Asynchronous Messaging
Kafka / RabbitMQ for event-driven architecture and communication.
Authentication & Authorization
Keycloak with OAuth2 & JWT for secure identity management.
Monitoring & Tracing
Prometheus, Grafana, Zipkin / Jaeger for observability.
Centralized Logging
ELK Stack (Elasticsearch, Logstash, Kibana) for log management.
CI/CD Pipeline
GitHub Actions, Jenkins, Kubernetes, Helm for continuous delivery.
Containerization & Orchestration
Docker, Kubernetes, Helm, ArgoCD for deployment and management.
Architecture
Repository Structure
microservice-pet-clinic/ │── api-gateway/ → Kong / Traefik │── service-registry/ → Eureka / Consul │── config-server/ → Spring Cloud Config │── services/ │ ├── auth-service/ → Java (Spring Boot) │ ├── pet-service/ → Golang (Gin) │ ├── owner-service/ → Python (FastAPI) │ ├── vet-service/ → Node.js (Express) │ ├── visit-service/ → Java (Spring Boot) │ ├── billing-service/ → Golang (Fiber) │ ├── notification-service/ → Python (Celery) │── event-streaming/ → Kafka / RabbitMQ │── monitoring/ → Prometheus + Grafana │── tracing/ → Zipkin / Jaeger │── logging/ → ELK Stack (Elasticsearch, Logstash, Kibana) │── k8s/ → Kubernetes manifests │── ci-cd/ → GitHub Actions / Jenkins pipelines │── README.md
Getting Started
Prerequisites
- Docker & Docker Compose
- Kubernetes & Helm
- Java 17, Golang, Node.js, Python
- PostgreSQL / MongoDB
- Kafka / RabbitMQ
Running Services Locally
With Docker Compose
With Kubernetes
API Endpoints
Service | Endpoint | Method |
---|---|---|
Auth Service | /auth/login | POST |
Pet Service | /pets | GET, POST |
Owner Service | /owners | GET, POST |
Vet Service | /vets | GET, POST |
Visit Service | /visits | GET, POST |
Billing Service | /billing | POST |
CI/CD Pipeline
- GitHub Actions - Code build & testing
- Jenkins - Continuous Integration
- ArgoCD - Kubernetes GitOps deployment
- Helm - Kubernetes package manager
Monitoring & Logging
Component | Purpose |
---|---|
Zipkin / Jaeger | Distributed Tracing |
Prometheus + Grafana | Metrics & Alerts |
ELK Stack | Centralized Logging |
Contributing
Feel free to contribute to this project! Open an issue or create a pull request on our GitHub repository.
License
MIT License - Feel free to use and modify this project.