# FTGO Application: The Microservices Reference App from the Microservice Patterns Book

> ftgo-application is the example codebase for the book Microservice Patterns by Chris Richardson. It implements a food delivery application in seven Spring Boot services connected through Apache Kafka, demonstrating sagas, event sourcing, CQRS, API composition, and the Eventuate frameworks across the chapters.

**microservices-patterns/ftgo-application** — Example code for the book Microservice patterns

- Repository: https://github.com/microservices-patterns/ftgo-application
- Stars: 3,769 · Forks: 1,424
- Language: Java
- License: NOASSERTION
- Published: 2026-09-23 · Updated: 2026-09-23 · Language: en
- Canonical page: https://hysenlabs.com/projects/microservices-patterns-ftgo-application

## What FTGO Is and Who It Is For

FTGO stands for Food To Go. The application models a simplified food delivery service with consumers, restaurants, orders, a kitchen, accounting, and order history. The README states that the code illustrates the technical aspects of microservice architecture and that the business logic is intentionally minimal.

The primary audience is readers of Microservice Patterns, a book by Chris Richardson published on microservices.io. The code maps chapter by chapter to specific patterns in the book. Engineers who have not read the book will find the code challenging to navigate because the documentation is sparse and assumes familiarity with the book's terminology, according to the README.

The codebase demonstrates a cluster of patterns that frequently appear together in production microservice systems: transactional messaging, sagas for cross-service consistency, domain-driven aggregates, event sourcing, and CQRS views. Seeing these patterns wired together in a single application is the primary value the repository provides.

## Service Architecture and the Seven Components

The application has seven services, each implemented as a single Gradle module and a Spring Boot application:

- ftgo-consumer-service: manages Consumer records
- ftgo-restaurant-service: manages Restaurant records
- ftgo-order-service: handles Order creation, cancellation, and revision using sagas
- ftgo-kitchen-service: handles Ticket management for kitchen operations
- ftgo-accounting-service: handles payment accounting using event sourcing
- ftgo-order-history-service: a CQRS read model for order history
- ftgo-api-gateway: the external API entry point

Each service follows a consistent internal structure with packages for domain logic, messaging adapters, Spring MVC controllers, and a main application class. The README notes that each service exposes a Swagger UI at its /swagger-ui.html endpoint.

Two infrastructure frameworks from the Eventuate ecosystem underpin the services. The Eventuate Tram framework implements transactional outbox messaging over Apache Kafka. The Eventuate Tram Saga framework implements choreography and orchestration sagas. The Eventuate Client framework implements event sourcing for the Accounting service.

## Building and Running the Application

The README lists three prerequisites: Java 8 or later, Docker and Docker Compose, and internet access for Gradle and Docker to download dependencies and images. The README warns that the application consists of many services and requires a lot of memory, running well on a 16 GB MacBook Pro.

Building follows two steps. First, build the Spring Cloud Contracts:

```bash
./gradlew buildContracts
```

Then build all services:

```bash
./gradlew assemble
```

Starting the application uses a Gradle Compose plugin:

```bash
./gradlew :composeUp
```

The colon before composeUp is noted as important in the README. Starting all containers can take several minutes. The docker-compose.yml starts Zookeeper, Kafka, MySQL, a CDC service that bridges the transactional outbox to Kafka, and the individual application services.

Once running, each service's Swagger UI is accessible at a local port. The README lists the consumer service at localhost:8081, the order service at localhost:8082, the restaurant service at localhost:8084, the order history service at localhost:8086, and the API gateway at localhost:8087.

## How Sagas Maintain Cross-Service Consistency

Chapter 4 of the book covers sagas for managing transactions that span multiple services. The ftgo-order-service implements three sagas: CreateOrderSaga, CancelOrderSaga, and ReviseOrderSaga. Each saga coordinates operations across the consumer, kitchen, and accounting services by sending command messages and waiting for replies.

The saga pattern avoids distributed transactions (2PC) by using a sequence of local transactions, each compensatable if a later step fails. CreateOrderSaga, for example, must authorize payment through the Accounting service and check consumer credit through the Consumer service before confirming the order. If either step fails, compensating transactions reverse the completed steps.

The command handlers for each participating service are defined in separate classes. AccountingServiceCommandHandler in ftgo-accounting-service, ConsumerServiceCommandHandlers in ftgo-consumer-service, and KitchenServiceCommandHandler in ftgo-kitchen-service all respond to the saga's commands through the Eventuate Tram messaging infrastructure.

## Event Sourcing, CQRS, and the Order History View

Chapter 6 of the book covers event sourcing. The Account aggregate in ftgo-accounting-service is implemented using the Eventuate Client framework's event sourcing support rather than a standard JPA entity. State changes are recorded as a sequence of events appended to the event store, and the current state is derived by replaying those events.

Chapter 7 covers CQRS. ftgo-order-history-service is the CQRS example: it listens to events from multiple other services via Kafka and maintains a denormalized read model of order history. This separates query responsibility from the command-side services, which is the core CQRS trade-off.

The API gateway in ftgo-api-gateway demonstrates API composition, another pattern from Chapter 7. Rather than having a single service that owns all data, the gateway combines responses from multiple services to fulfill a single external query. A GraphQL variant of the API gateway is also provided in ftgo-api-gateway-graphql, with its own Docker Compose file.

## Limitations for Production Use

The README is explicit about what this codebase is not. It is not a production-ready application. The business logic is minimal by design. The documentation is sparse and refers readers to the book rather than standing alone.

Three additional constraints deserve attention. First, the docker-compose.yml sets Kafka's KAFKA_HEAP_OPTS to only 192 MB and Zookeeper's to 64 MB; these are appropriate for a laptop demo but not for real workloads. Second, the MySQL root password in docker-compose.yml is rootpassword, which is an insecure placeholder not intended for deployment. Third, the README notes the code is still work in progress and does not claim to be feature-complete.

The Eventuate frameworks used here (Eventuate Tram and Eventuate Client) are maintained by Chris Richardson separately from this repository. If the book's examples become outdated relative to the Eventuate framework versions, the build may require dependency updates not reflected in the repository.

## Maintenance Status and License

The last push to microservices-patterns/ftgo-application was on 2026-03-13, which is more than six months before 2026-09-28. The repository is not archived. No GitHub releases are listed.

The repository lists NOASSERTION as its license. This means the license terms are not identified in a way that GitHub's detection can resolve. The LICENSE.md file in the repository would need to be read directly to determine the actual terms. The README notes that questions can be filed as GitHub issues, which the author commits to helping with.

For engineers exploring microservice patterns in languages other than Java, the book's main site at microservices.io links to additional examples and documentation that are maintained outside this repository.

## Conclusion

ftgo-application is the right resource for engineers who are reading or have read Microservice Patterns by Chris Richardson and want to trace each pattern in working code. It is a poor choice for use as a production starting point: the README states explicitly that the business logic is minimal and that the documentation is sparse and relies on the book. Running the full application locally requires Docker, Docker Compose, and at least 16 GB of RAM. The last push was on 2026-03-13, which is more than six months before 2026-09-28, so the codebase has not been updated recently. Verify that your Java and Docker versions are compatible before spending time getting the environment running.

## FAQ

### What is the FTGO application?

FTGO (Food To Go) is the example application for the book Microservice Patterns by Chris Richardson. It models a food delivery service across seven Spring Boot microservices and demonstrates patterns including sagas, event sourcing, CQRS, and API composition using Apache Kafka and the Eventuate frameworks.

### Do I need to read the book to use the FTGO codebase?

The README states explicitly that the documentation is sparse and that readers will need to look in the book. The code maps chapter by chapter to patterns in Microservice Patterns by Chris Richardson; without that context the architecture decisions are not fully explained in the repository.

### What are the system requirements for running ftgo-application locally?

The README lists Java 8 or later, Docker and Docker Compose, and internet access. It notes that the application runs well on a 16 GB MacBook Pro, implying that machines with less RAM may struggle to run all the services simultaneously.

## Sources

- [Issues](https://github.com/microservices-patterns/ftgo-application/issues)
- [microservices-patterns/ftgo-application on GitHub](https://github.com/microservices-patterns/ftgo-application)
- [README](https://github.com/microservices-patterns/ftgo-application/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/microservices-patterns-ftgo-application
