Self-hosted service
microservices-patterns/ftgo-application avatar
microservices-patterns/ftgo-application

ftgo-application: the Microservices Patterns sample you build yourself

Example code for the book Microservice patterns

3,785 stars1,441 forksJavaNOASSERTION

At a glance

What is it?
Chris Richardson's ftgo-application is the working code behind Microservice Patterns: seven Spring Boot services, sagas, event sourcing and a CQRS view, wired together with Eventuate and Kafka. It is a teaching artifact, not a product, and the README says so plainly.
Who is it for?
Adopt ftgo-application if you are reading Microservice Patterns and want to trace a saga, an event-sourced aggregate or a CQRS view through real code, or if you need a multi-service Docker Compose target to practice deployment against. Do not adopt it as a starting point for a production system: the README calls the code work in progress, the business logic minimal and the documentation sparse.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Activity is slowing. The repository last received commits 8 months ago.
What is it written in?
Mainly Java, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • microservices-patterns/ftgo-application3,785 ★ · +18
Star history
Repository2026-09-242026-11-15
microservices-patterns/ftgo-application3.8k3.8k

18 Stars in the last 52 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What ftgo-application is for, and who it is written for

This repository is the companion code for the book Microservice Patterns. Its purpose is to make the book's patterns inspectable: a saga you can read line by line, an aggregate whose state is rebuilt from events, a read model fed by messages rather than joins. The README is direct about the trade-off it makes. The code is still work in progress, the business logic is minimal, and the documentation is sparse or nonexistent, so the book is the manual. If you are looking for a runnable reference implementation of a food ordering business, this is the wrong repository. If you are looking for the smallest system that still demonstrates seven services, transactional messaging, sagas, event sourcing and API composition, the scope is deliberate and it is the point.

The audience is narrow but real. A backend engineer who has read the saga chapter and wants to see CreateOrderSaga's participants and compensating commands in Java will get more from an hour here than from another blog post. A platform engineer who wants a multi-service target to practice Docker Compose or Kubernetes deployment against also fits, because the repository ships both a docker-compose.yml and a deployment directory. Someone evaluating architecture for a real order system does not fit.

Seven services, one Gradle module each

The README states that a service consists of a single Gradle module and is a Spring Boot application. The service list is: ftgo-consumer-service, ftgo-restaurant-service, ftgo-order-service, ftgo-kitchen-service, ftgo-accounting-service, ftgo-order-history-service and ftgo-api-gateway. Each module typically splits into domain, messaging, web and main packages, which mirrors the book's separation of domain logic from adapters.

The messaging layer is where the architecture stops being a diagram. Services communicate over Apache Kafka through the Eventuate Tram framework for transactional messaging, Eventuate Tram Saga for sagas, and Eventuate Client for event sourcing. Transactional messaging means a database write and its outgoing message are committed together, so a service cannot commit an order and silently fail to publish the event. That is the mechanism the book spends a chapter on, and here it is a dependency rather than prose.

The order service owns three sagas: CreateOrderSaga, CancelOrderSaga and ReviseOrderSaga. The participants implement command handlers, among them AccountingServiceCommandHandler, ConsumerServiceCommandHandlers, KitchenServiceCommandHandler and OrderCommandHandlers. Reading a saga file next to its handlers is the fastest way to see choreography versus orchestration in practice, because the orchestration lives in one place and the participants only react to commands. The accounting service is the event sourcing example: the Account aggregate is rebuilt from events rather than loaded from a row. The order history service is a CQRS view, and the API gateway uses API composition to assemble the order history endpoint from the services behind it.

Installing ftgo-application and running a first order

The prerequisites are listed as Java 8+, Docker and Docker Compose, and internet access so Gradle and Docker can pull dependencies and images. There is no published binary and no package to install; you clone the repository and build it. The README marks the contract build as temporary, which is worth noting because it means the build sequence is not a stable interface.

Build the Spring Cloud Contracts first, then assemble the services:

bash
./gradlew buildContracts
./gradlew assemble

With the build done, start the stack. Note the leading colon in the task name, which the README calls out explicitly:

bash
./gradlew :composeUp

The README warns this can take a while, and that the application needs a lot of memory because of the number of services and infrastructure containers. It cites a 16GB MacBook Pro as a machine where it runs well. The compose file confirms the weight: zookeeper, kafka, mysql and a cdc-service, each with its own image and port, plus the seven application services. The cdc-service is configured with pipelines reading the ftgo_consumer_service and ftgo_order_service database schemas, which is how domain events leave MySQL and reach Kafka.

Once the services are up, the README points you at the Swagger UIs rather than a single front end. Create a consumer at http://localhost:8081/swagger-ui/index.html, create a restaurant at http://localhost:8084/swagger-ui/index.html, then create and view an order at http://localhost:8082/swagger-ui/index.html. The order history view is at http://localhost:8086/swagger-ui/index.html. The gateway is at http://localhost:8087, but the README says access through it is currently incomplete, so treat the per-service UIs as the supported path.

The memory bill and the missing rollback story

The most concrete limitation is stated in the README itself: the application consists of many services and requires a lot of memory. Seven Spring Boot applications, Kafka, ZooKeeper, MySQL and the CDC service on one laptop is a real constraint, and the 16GB figure is the author's own guidance, not a conservative estimate. On a smaller machine you will spend more time waiting for JVMs than reading saga code.

The second limitation is documentation. The README says the documentation is sparse or nonexistent and that you will need to look in the book. That is honest, but it has consequences: the README does not document rollback, it does not explain how to reset a half-migrated database after a failed saga, and it does not describe how to tear down or clean the compose stack. The repository does ship shell helpers such as mysql-cli.sh, open-swagger-uis.sh, scan-order-history-view.sh and _wait-for-services.sh, but their usage is not spelled out in the README. If you need a system you can operate without a book open beside you, this is the wrong tool.

A third constraint is scope. The business logic is minimal by design, so the code cannot tell you how these patterns behave under realistic domain complexity, and it cannot tell you anything about throughput or failure rates at production scale. Treat any performance intuition you form here as untested.

How ftgo-application differs from a framework like Spring Cloud

The nearest thing to an alternative is not another sample application but a framework such as Spring Cloud, which provides service discovery, configuration and gateway building blocks as reusable libraries. The difference in approach is fundamental. Spring Cloud gives you components you assemble into your own architecture, and it stays silent about how your services should divide responsibility or how a distributed transaction should be coordinated. ftgo-application is the opposite: it is a fixed architecture with a fixed business domain, and its value is that every decision has already been made so you can study the consequences.

That makes them complementary rather than competing. You would not adopt ftgo-application to get a gateway; you would read its API gateway module to understand API composition, then decide whether to build that composition with Spring Cloud Gateway or something else. What ftgo-application adds that no framework does is the coordination layer: Eventuate Tram for transactional messaging, Eventuate Tram Saga for the order sagas, and Eventuate Client for the event-sourced Account aggregate. If you want those patterns without the book's sample domain, the Eventuate projects are the pieces to look at directly; ftgo-application is the worked example that shows them wired into seven services.

Licence status and the cost of keeping up

The repository carries a LICENSE.md file, but the licence identifier is reported as NOASSERTION, meaning GitHub could not classify it automatically. That is not the same as having no licence, and it is not the same as a permissive one. Before you copy code out of this repository into anything you intend to distribute, read LICENSE.md yourself and, if the terms matter commercially, get proper advice. Nothing here should be read as legal guidance.

On maintenance, the last push was on 2026-03-13, roughly six months before this writing. That is recent enough that issues are likely to get a response, but the README's own framing should temper expectations: it invites questions as GitHub issues rather than promising a release cadence, and the repository has no published releases. The upgrade cost is dominated by the dependency chain rather than the application code. The compose file pins infrastructure images through environment variables such as EVENTUATE_COMMON_VERSION, EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION and EVENTUATE_CDC_VERSION, and the service modules depend on Eventuate Tram, Eventuate Tram Saga and Eventuate Client. Moving any of those forward means re-running the end-to-end tests, and the repository ships run-end-to-end-tests.sh and run-graphql-api-gateway-tests.sh for exactly that. Budget for the build and test cycle, not for editing Java.

What to check before you commit to it

Start with the build. If ./gradlew buildContracts and ./gradlew assemble do not complete cleanly, everything downstream is noise, and the README's own note that the contract build is temporary suggests this is the step most likely to need attention. Next, confirm the host has the memory the README asks for; a 16GB machine is the stated baseline, and the compose stack is not something you can trim by dropping one container without breaking the messaging path, since the CDC service reads the MySQL schemas that the order and consumer services write to.

Then pick one thread and follow it end to end rather than browsing. The order service is the densest: create an order through the Swagger UI at port 8082, watch the saga run, and read CreateOrderSaga alongside OrderCommandHandlers, KitchenServiceCommandHandler and AccountingServiceCommandHandler. That single path touches transactional messaging, saga orchestration, and the event-sourced Account aggregate, which is more than any other route through the repository. If that path does not illuminate the book for you, the repository is not the right study aid, and you should read the relevant chapter again before spending more time on the code.

Editorial conclusion

Adopt ftgo-application if you are reading Microservice Patterns and want to trace a saga, an event-sourced aggregate or a CQRS view through real code, or if you need a multi-service Docker Compose target to practice deployment against. Do not adopt it as a starting point for a production system: the README calls the code work in progress, the business logic minimal and the documentation sparse. Before you invest time, verify three things yourself: that ./gradlew buildContracts then ./gradlew assemble completes on your machine, that a 16GB host is enough for the full compose stack, and which of the seven services you actually need, since the API gateway endpoint the README mentions is flagged as currently unfinished.

Frequently asked questions

What is the ftgo application?

It is the example application that accompanies the book Microservice Patterns. The README describes it as a microservice architecture made of seven services, including consumer, restaurant, order, kitchen, accounting, order history and an API gateway, with minimal business logic intended to illustrate technical patterns.

Can ftgo-application serve as a guide to microservices patterns with examples in Java?

That is its stated purpose. The services are Spring Boot applications, each in a single Gradle module, and the code maps to book chapters: sagas in the order service, event sourcing in the accounting service's Account aggregate, and a CQRS view in the order history service. The README notes the documentation is sparse and that you will need the book.

How do I install and run ftgo-application?

You need Java 8+, Docker and Docker Compose, and internet access. The README gives the sequence ./gradlew buildContracts, then ./gradlew assemble, then ./gradlew :composeUp, noting the leading colon in the last task. The README warns startup can take a while and that the application needs a lot of memory.

What are the prerequisites for running ftgo-application?

The README lists Java 8+, Docker and Docker Compose, and internet access so Gradle and Docker can download dependencies and container images. It also states the application runs well on a 16GB MacBook Pro because of the number of services and infrastructure containers.

Is ftgo-application maintained?

The repository is not archived, and the last push was on 2026-03-13. The README still describes the code as work in progress and directs questions to GitHub issues rather than describing a release process, and the repository has no published releases.

Official sources

  1. Issues
  2. microservices-patterns/ftgo-application on GitHub
  3. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/microservices-patterns-ftgo-application.svg)](https://hysenlabs.com/projects/microservices-patterns-ftgo-application)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/microservices-patterns-ftgo-application.svg)](https://hysenlabs.com/projects/microservices-patterns-ftgo-application)

Was this useful?