> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowwarden.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Add the Redis backend to a Spring Boot app in 5 minutes

This quickstart adds the FlowWarden Redis backend to an existing Spring Boot application that already uses [`flowwarden-stream-core`](/quickstart). After these three steps, your `LockService` and `CheckpointStore` beans are backed by Redis instead of MongoDB.

## 1. Add the dependency

<CodeGroup>
  ```xml Maven theme={null}
  <dependency>
      <groupId>io.flowwarden</groupId>
      <artifactId>flowwarden-redis</artifactId>
      <version>1.0.0-rc.1</version>
  </dependency>
  <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-redis</artifactId>
  </dependency>
  ```

  ```groovy Gradle theme={null}
  implementation 'io.flowwarden:flowwarden-redis:1.0.0-rc.1'
  implementation 'org.springframework.boot:spring-boot-starter-data-redis'
  ```
</CodeGroup>

<Note>
  `flowwarden-redis` requires `spring-boot-starter-data-redis` on the classpath. Spring Boot creates the `StringRedisTemplate` bean that `flowwarden-redis` needs, and resolves the underlying Lettuce or Jedis client.
</Note>

## 2. Configure Redis

Use the standard Spring Boot properties for the Redis connection:

```yaml application.yml theme={null}
spring:
  data:
    redis:
      host: localhost
      port: 6379
```

Optionally, namespace the Redis keys written by FlowWarden — useful when the Redis instance is shared with other apps or other tenants:

```yaml application.yml theme={null}
flowwarden:
  redis:
    key-prefix: "myapp:"   # default: "fw:"
```

That's the only FlowWarden-specific property. See [Configuration](/redis/configuration) for the full reference.

## 3. Use your stream as usual

Your `@ChangeStream` / `@Checkpoint` annotations don't change. The Redis-backed beans are picked up automatically when the application context starts:

```java MyStream.java theme={null}
@ChangeStream(documentType = Order.class)
@Checkpoint
public class OrderStream {

    @OnChange
    void handle(ChangeStreamContext<Order> ctx) {
        System.out.println(ctx.summary());
    }
}
```

## Verify

Start the application and check the bean wiring. Either look for the Spring Boot startup banner followed by no `BeanCreationException`, or print the active beans:

```java MyApp.java theme={null}
@SpringBootApplication
@EnableFlowWarden
public class MyApp {
    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(MyApp.class, args);
        System.out.println("LockService:     " + ctx.getBean(LockService.class).getClass().getSimpleName());
        System.out.println("CheckpointStore: " + ctx.getBean(CheckpointStore.class).getClass().getSimpleName());
    }
}
```

Expected output:

```
LockService:     RedisLockService
CheckpointStore: RedisCheckpointStore
```

If you see `MongoLockService` / `MongoCheckpointStore` instead, check that `spring-boot-starter-data-redis` is on the classpath and that a `StringRedisTemplate` bean exists (Spring Boot creates one whenever the starter resolves a working connection).

<Warning>
  `flowwarden-redis` provides the **backend implementations only**. You still need `flowwarden-stream-core` for the `@ChangeStream` / `@Checkpoint` annotation engine and a MongoDB Change Stream source to watch — Redis replaces only the coordination state, not the event source.
</Warning>

## See Also

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/redis/configuration">
    Properties, storage layout, reactive variants, hybrid setups.
  </Card>

  <Card title="@Checkpoint reference" icon="bookmark" href="/reference/checkpoint">
    The annotation that drives the `CheckpointStore` SPI Redis backs here.
  </Card>
</CardGroup>
