
Piggy Metrics
A sample personal-finance app built as a tutorial for microservices with Spring Boot, Spring Cloud and Docker.
- Stars
- 14k
- Forks
- 6.4k
- Licence
- MIT
- Language
- Java
- Last update
- 2.5 years ago
- Type
- Framework
No commits in over a year — check for forks or alternatives before adopting.
What it is
Piggy Metrics is a simple financial advisor app split into several small services, each handling one job such as accounts, statistics, and notifications. It is meant to demonstrate the microservice architecture pattern using Spring Boot, Spring Cloud and Docker. The README describes it primarily as a tutorial that you can fork and adapt.
- Read how the account, statistics, and notification services are separated and call each other over REST
- Study how Spring Cloud Config serves shared settings from a native profile
- Explore how OAuth2 tokens protect service endpoints with scopes such as server and ui
- Fork the project and replace the finance logic with your own domain
Great for
- Java developers who want a concrete example of a microservice system
- Students learning how Spring Cloud config, auth, and API gateways fit together
- Developers who want a starting codebase to fork and adapt
- Teams comparing how services are split and how they talk over REST
Not ideal for
- People looking for a finished, ready-to-use finance app, since the README calls it a tutorial demo
- Developers new to Java and Spring, because the code assumes that background
- Anyone who needs production-hardened setup, since the README does not cover production deployment
How to get it
- 1
Clone and build from source
You'll need: Java · Docker
Clone the repository
git clone https://github.com/sqshq/piggymetrics - 2
Run it
- Clone the repository and open the project folder
- Review the README sections on services and infrastructure to understand the layout
- Build and run the services using the instructions in the full README, which were truncated in this analysis
- Call an endpoint such as GET /accounts/demo to see demo data once the services are up
- 3
Get the most out of it
- Read the Config service section to see how native profile loads shared YAML files
- Use the documented /refresh endpoint with @RefreshScope to change email text without a restart
- Study the Auth service section to learn the password and client credentials OAuth2 grants
- Follow the API Gateway section to see prefix-based Zuul routing for each service
Downloads
Strengths
- Clear, documented example of splitting an app into independently deployable services
- Covers several common distributed-system pieces (config, auth, gateway) in one project
- Released under the MIT license, which allows forking and reuse
Trade-offs
- Described as a tutorial, so it is not presented as a production-ready product
- The README references older tooling such as Zuul and Travis CI, which may be out of date
- Last push date is 2024-05-17 and the only listed release is spring.version.2.0.3 with no binaries
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| piggymetrics (this) | 14k | Framework | advanced | 2.5 years ago | Java developers who want a concrete example of a microservice system |
| SpringAll | 28.9k | Learning resource | beginner | 2.4 years ago | Developers who read Chinese and want to learn Spring Boot step by step |
| traefik | 65.4k | App | intermediate | 4 days ago | Teams running many microservices in Docker, Swarm, or Kubernetes |
| go-zero | 33.4k | Library | intermediate | 5 days ago | Go developers building REST APIs or microservices |
| kratos | 26k | Library | intermediate | 5 days ago | Go developers building a set of backend services that talk over HTTP or gRPC |
| nest | 77k | Framework | intermediate | 4 days ago | Teams building larger back-end APIs in TypeScript who want enforced structure |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.