Skip to content

chrom/ec_quarkus

Repository files navigation

E-Commerce Platform on Quarkus

Modern e-commerce platform with microservices architecture built on Quarkus.

🏗️ Architecture

Microservices

  • Gateway (8080) - API Gateway with authentication
  • User Service (8081) - User and role management
  • Catalog Service (8082) - Product catalog and categories
  • Order Service (8083) - Order management
  • Payment Service (8084) - Payment processing
  • Inventory Service (8085) - Inventory management
  • Analytics Service (8086) - Analytics and reporting
  • Content Service (8087) - Content management
  • Notification Service (8088) - Notifications and email
  • Search Service (8089) - Product search

Frontend Applications

  • Customer App (3001) - Customer interface
  • Admin App (3002) - Administrative interface

Infrastructure

  • PostgreSQL - Main database
  • MongoDB - Content and files
  • ClickHouse - Analytics database
  • Redis - Cache and message queues
  • Elasticsearch - Search and indexing
  • Keycloak - Authentication and authorization
  • Consul - Service Discovery
  • Prometheus + Grafana - Monitoring
  • Jaeger - Distributed Tracing

🚀 Quick Start

Requirements

  • Docker & Docker Compose
  • Java 21
  • Make (optional)

1. Start all services

# Using Makefile
make up

# Or directly
docker-compose up -d

2. Step-by-step startup (recommended for first time)

# 1. Start databases
make db-up

# 2. Start Keycloak and Consul
make keycloak
make consul

# 3. Start monitoring
make monitor

# 4. Start all services
make up

3. Check status

# Status of all services
make status

# Health check
make health

# Logs
make logs

4. Documentation

🔧 Management

Basic commands

make help          # Help
make build         # Build all services
make up            # Start
make down          # Stop
make restart       # Restart
make logs          # Logs
make clean         # Full cleanup

Specialized commands

make db-up         # Databases only
make monitor       # Monitoring only
make keycloak      # Keycloak only
make consul        # Consul only
make backup        # Backup

Utility Scripts

# Check all services health
./scripts/check-services.sh

# Verify .gitignore configuration
./scripts/check-gitignore.sh

# Update all .gitignore files
./scripts/update-gitignore.sh

# Initialize multiple databases
./scripts/init-multiple-databases.sh

📚 Scripts Documentation: scripts/README.md

🌐 Available Services

Service URL Description
Gateway http://localhost:8080 API Gateway
Customer App http://localhost:3001 Customer interface
Admin App http://localhost:3002 Administrative interface
Keycloak http://localhost:8080 Authentication
Consul http://localhost:8500 Service Discovery
Prometheus http://localhost:9090 Metrics
Grafana http://localhost:3000 Visualization (admin/admin)
Jaeger http://localhost:16686 Tracing

🐛 Conflict Resolution

✅ Fixed:

  1. Java version: Unified to Java 21
  2. Docker Compose: Created single file for all services
  3. Configuration: Added all necessary environment variables
  4. Monitoring: Configured Prometheus and Grafana

⚠️ Need to fix:

  1. Microservices: Need to generate code from JDL files
  2. Build files: Create build.gradle for each microservice
  3. Dockerfile: Create Dockerfile for each service

🔄 Microservices Generation

From JDL file

# Generate from main JDL
jhipster jdl microservices-quarkus.jdl

# Or from alternative
jhipster jdl microservices.jdl

Structure after generation

├── gateway/                 # API Gateway
├── user_service/           # User Management
├── catalog_service/        # Product Catalog
├── order_service/          # Order Management
├── payment_service/        # Payment Processing
├── inventory_service/      # Inventory Management
├── analytics_service/      # Analytics & Reporting
├── content_service/        # Content Management
├── notification_service/   # Notifications
└── search_service/         # Search Engine

📊 Monitoring and Logging

Prometheus metrics

  • CPU and memory usage
  • HTTP requests and responses
  • Database connections
  • Custom business metrics

Grafana dashboards

  • System overview
  • Service performance
  • Business metrics
  • Error rates

Jaeger tracing

  • Request flows
  • Service dependencies
  • Performance bottlenecks
  • Error investigation

🔐 Security

Keycloak configuration

  • OAuth2/OIDC protocol
  • Role-based access control
  • Multi-tenant support
  • Social login integration

Network security

  • Service-to-service authentication
  • API rate limiting
  • CORS configuration
  • SSL/TLS encryption

🚀 Production deployment

Kubernetes

# Apply Istio configuration
kubectl apply -f istio-config.yaml

# Deploy to Kubernetes
kubectl apply -f k8s/

Docker Swarm

# Initialize swarm
docker swarm init

# Deploy stack
docker stack deploy -c docker-compose.yml ecommerce

📝 Logging

Centralized logging

  • ELK Stack (Elasticsearch, Logstash, Kibana)
  • Fluentd for log collection
  • Structured logging (JSON)
  • Log levels and filtering

🧪 Testing

Unit tests

./gradlew test

Integration tests

./gradlew integrationTest

E2E tests

npm run e2e:headless

📚 Documentation

Project Documentation

External Documentation

🤝 Support

If you encounter issues:

  1. Check logs: make logs
  2. Check status: make status
  3. Check health: make health
  4. Clean and restart: make clean && make up

Note: This project is under development. Some services may require additional configuration.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published