> For the complete documentation index, see [llms.txt](https://testcontainers.gitbook.io/workshop/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://testcontainers.gitbook.io/workshop/step-2-exploring-the-app.md).

# Step 2: Exploring the app

The app is a simple microservice based on Spring Boot for rating conference talks. It provides an API to track the ratings of the talks in real time.

## Storage

### SQL database with the talks

When a rating is submitted, we must verify that the talk for the given ID is present in our database.

Our database of choice is PostgreSQL, accessed with Spring JDBC.

Check `com.example.demo.repository.TalksRepository`.

### Redis

We store the ratings in Redis database with Spring Data Redis.

Check `com.example.demo.repository.RatingsRepository`.

### Kafka

We use ES/CQRS to materialize the events into the state. Kafka acts as a broker and we use Spring Kafka.

Check `com.example.demo.streams.RatingsListener`.

## API

The API is a Spring Web REST controller (`com.example.demo.api.RatingsController`) and exposes two endpoints:

* `POST /ratings { "talkId": ?, "value": 1-5 }` to add a rating for a talk
* `GET /ratings?talkId=?` to get the histogram of ratings of the given talk


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://testcontainers.gitbook.io/workshop/step-2-exploring-the-app.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
