micro-apps
micro-apps copied to clipboard
Microservices in Post-Kubernetes Era. A polyglot monorepo
Micro Apps
Modern microservices for Post-Kubernetes Era. An open source framework for building and deploying distributed applications.
This template monorepo style project allows you to write your application as a modular monolith and deploy it as a set of microservices.
Monorepo(services, pipelines and libs) project to showcase workspace setup with multiple apps and shared libraries
This template project has the best of both worlds: the development velocity of a monolith, with the scalability, security, and fault-tolerance of microservices.
Features
-
Modular-monolith distributed applications
-
Polyglot - Support multiple languages (java, kotlin, groovy)
-
Support multiple app frameworks (apache-beam, cli, micronaut, quarkus)
-
Support multiple serialization methods (JSON, Avro, ProtoBuf)
-
A type-safe cascading configuration with konf
-
Build native binaries using GraalVM
-
Cloud Native (Service Mesh, health checks, observability)
-
Platform independent Observability instrumentation via OpenTelemetry
-
Deployment automation with kustomize and Event-driven Autoscaling with KEDA
-
End-to-End Google Cloud DevOps flow pop-kustomize
-
JReleaser The quick and effortless way to release your project!
Quality
Sub Modules
Services | Libs | Pipelines |
---|---|---|
GraphQL-r2dbc | Core | WordCount |
Redis OM | KBeam | Classifier |
Streams | Spring | Ingestion |
Account | GraphQL | |
Test | ||
Model |
Setup
Prerequisites
sdk rm java
sdk i java 17.0.8-zulu
java --version
sdk rm gradle
sdk i gradle
gradle --version
sdk i springboot
sdk i quarkus
# optional
sdk i java 21-graal
# Do you want java 21-graal to be set as default? (Y/n): n
Oracle GraalVM Container Images
IntelliJ Plugins
Contribution
Pre-commit checks
# spotlessCheck - Checks that sourcecode satisfies formatting steps.
gradle spotlessCheck
# spotlessApply - Applies code formatting steps to sourcecode in-place.
gradle spotlessApply
Run tests, lint, coverage for all subprojects
gradle check
Code Quality
# Generates code coverage HTML and XML reports for all enabled test tasks in one project.
gradle koverMergedReport
Software Composition Analysis (SCA) tool that attempts to detect publicly disclosed vulnerabilities contained within a project’s dependencies.
gradle dependencyCheckAggregate
Maintenance
# Update versions in libs.versions.toml file
gradle versionCatalogUpdate --interactive
Run
Docker
start app dependencies: postgres, redis
# start local sonarqube
docker compose up postgres # docker compose up -V postgres
# stop local postgres before restart again
docker compose down # docker compose down -v
start optional CI/CD infra dependencies: sonarqube, nexus
# start local sonarqube
docker compose up sonarqube # docker compose up -V sonarqube
# stop local sonarqube before restart again
docker compose down
# (optional) this remove volumes - needed when you upgrade image versions
docker compose down -v
# start local nexus
docker compose up nexus
Dashboard access
- SonarQube → Browser http://localhost:9000 →
user: admin, password: admin
- Grafana → Browser http://localhost:3000/plugins/redis-app/ →
user: admin, password: admin
- Redis Insight → Browser http://localhost:8001/
- Jaeger → Browser http://localhost:16686
- Kibana → Browser http://localhost:5601
- Prometheus → Browser http://localhost:9090
See gradle commands for this project.
Apps
Apache Beam Pipelines
Explore Wordcount Pipeline
Explore Streaming Ingestion Pipeline
Explore Classifier Pipeline
Quarkus
Explore REST, OpenAPI, OpenID Connect, API
Explore GraphQL API
Kotlin-gRPC
Explore Account-gRPC API
Explore Kotlin-gRPC API
Explore Kotlin-gRPC API
Spring
Explore Spring-RSocket Chat APP
Explore Spring CRUD + Redis Search API
Svelte
Explore SvelteKit WebApp
Libs
Reusable libraries
Explore Apache Beam Kotlin Extensions
Explore Shared gRPC Components
Shared code within this repo
Explore Shared Core Code
Explore Shared Model Objects
Explore Shared Pipelines Code
Explore Shared Spring Services Code
Explore Shared Spring GraphQL Services Code
Explore Shared ProtoBuf Contracts
Explore Shared Test Fixtures
Inspiration
- Creating a Multi Module Project
- Microservices in a Post-Kubernetes Era link
- Why is a workspace (or monorepo) needed?
- Gradle Setup arara
- GoogleCloudPlatform's microservices-demo
- Google Service Weaver: A Framework for Writing Distributed Applications