Skip to content

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
Step-by-step guide: how to use Piggy MetricsInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: Java · Docker

    Clone the repository

    git clone https://github.com/sqshq/piggymetrics
  2. 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. 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

ProjectStarsTypeLevelUpdatedBest for
piggymetrics (this)14kFrameworkadvanced2.5 years agoJava developers who want a concrete example of a microservice system
SpringAll28.9kLearning resourcebeginner2.4 years agoDevelopers who read Chinese and want to learn Spring Boot step by step
traefik65.4kAppintermediate4 days agoTeams running many microservices in Docker, Swarm, or Kubernetes
go-zero33.4kLibraryintermediate5 days agoGo developers building REST APIs or microservices
kratos26kLibraryintermediate4 days agoGo developers building a set of backend services that talk over HTTP or gRPC
nest77kFrameworkintermediate4 days agoTeams 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.