How m-elhamlaoui/keplereum works
Project Type and Purpose
• This is a full-stack, blockchain-backed, microservices architecture with:
– A React.js front-end for real-time monitoring (satellite positions, blockchain txns, metrics).
– Multiple Spring Boot & Go microservices (Satellite, Blockchain, User/GroundStation, Config Server, Discovery Server, API Gateway).
– A monolithic JHipster backend for domain data.
– Ethereum blockchain nodes (Geth), smart contracts (Solidity), and a Go-based WebSocket gateway.
– DevOps infrastructure: Docker, Kubernetes, Jenkins CI/CD, Prometheus/Grafana, ELK logging.
Main Components
2.1 User Interface Layer (Frontend)
– React App (runs in browser)
– WebSocket connection to Blockchain_WebSocket_Gateway
– REST calls to apiGateway
2.2 Edge/API Layer
– apiGateway (Spring Cloud Gateway or Zuul)
– SecurityConfig, JwtAuthenticationFilter
2.3 Service Registry & Configuration
– DiscoveryServer (Eureka)
– ConfigServer (Spring Cloud Config)
2.4 Microservices
– Satellites_Service (Spring Boot)
– User_GroundStation_Service (Spring Boot, JWT auth)
– Blockchain_Service (Spring Boot + Web3j, interacts with Ethereum)
– (Optional) Monitoring Service & Logging Service (if separate)
2.5 Monolithic Backend (JHipster)
– BackendApp, REST resources, domain, repository layers
– PostgreSQL, Elasticsearch, Liquibase migrations
2.6 Blockchain Infrastructure
– Ethereum Geth cluster (docker-compose, load balancer)
– Smart contracts deployed (SatelliteSystem.abi/bin)
2.7 WebSocket Gateway
– Go service that listens for blockchain events and pushes via WebSocket
2.8 Data Stores & External Systems
– PostgreSQL instances (per service or shared?)
– Elasticsearch (search, analytics)
– Prometheus & Grafana (metrics)
– ELK (Elasticsearch, Logstash, Kibana) for logs
– Zipkin (distributed tracing)
2.9 DevOps & Infrastructure
– Jenkins CI/CD pipelines
– Docker images & Kubernetes cluster
– Terraform/Ansible IaC
Relationships & Data Flows
• Browser → apiGateway (HTTPS REST) → discovery → microservice → database
• Browser ← WebSocket → Blockchain_WebSocket_Gateway ← Ethereum events
• Microservices ← ConfigServer (externalized configuration)
• Microservices ←→ DiscoveryServer (service registration/discovery)
• Blockchain_Service → Ethereum (via Web3j RPC)
• Geth cluster ←→ mining nodes (Go scripts)
• All services → Prometheus (metrics endpoint)
• All services → ELK (centralized logs)
• Jenkins → Docker build → Kubernetes deploy
Architectural Patterns & Principles
• Microservices registered in a service registry (Eureka) behind a single entry point (API Gateway).
• Externalized config via ConfigServer, supports multiple environments.
• Event-driven updates via WebSocket for real-time dashboard.
• Smart contract layer on public Ethereum, accessed via Web3j.
• Domain layer separation in JHipster monolith (Controllers, Services, Repositories).
• Infrastructure as Code for reproducible deployments.
• Monitoring & logging baked into containers for observability.