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

# Designer User setup

> Set up the Designer User service, which stores Designer notifications and user preferences.

The Designer User service is the backend of the [Designer notification center](https://docs.flowx.ai/6.x/docs/flowx-designer/notification-center.md). It stores the notifications that other FlowX.AI services send to Designer users, pushes new ones to the Designer through the Events Gateway, and keeps per-user preferences such as the last workspace a user opened. The Designer calls it through the admin host at `/designer-user`.

## Dependencies

| Component | Used for |
| - | - |
| MongoDB | Dedicated `designer-user` database for notifications and preferences |
| Redis | Cache |
| Kafka | Inbound notifications and preference updates, outbound notifications to the Events Gateway, audit events |
| SpiceDB | Authorization checks, through the Authorization System |
| Keycloak (or a compatible OAuth2 provider) | Token validation and the `flowx-designer-user-sa` service account |

***

## Configuration

### Authorization configuration

The service validates incoming tokens with the JWT public key mechanism and calls other FlowX services with its own service account (the `mainIdentity` client registration) in the service-accounts realm.

| Environment Variable | Description | Default Value |
| - | - | - |
| `SECURITY_TYPE` | Token validation mechanism | `jwt-public-key` |
| `SECURITY_OAUTH2_BASESERVERURL` | Base URL of the Keycloak server | - |
| `SECURITY_OAUTH2_SAREALM` | Service-accounts realm ID | `00000002-0002-4002-8002-000000000002` |
| `SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_MAINIDENTITY_CLIENTID` | Service account client ID | `flowx-designer-user-sa` |
| `SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_MAINIDENTITY_CLIENTSECRET` | Service account client secret | - |
| `SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_ANONYMOUSIDENTITY_CLIENTID` | Anonymous service account client ID | `flowx-anonymous-sa` |
| `SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_ANONYMOUSIDENTITY_CLIENTSECRET` | Anonymous service account client secret | - |

With the FlowX Helm chart, the service account secret is read from the `KEYCLOAK_DESIGNER_USER_CLIENT_SECRET` key of the `keycloak-flowx-realm-clients` secret. See [Service account realm secrets](https://docs.flowx.ai/6.x/setup-guides/authorization-setup-guide.md#service-account-realm-secrets) for how authorization-system reads it.

### MongoDB configuration

| Environment Variable | Description | Default Value |
| - | - | - |
| `SPRING_DATA_MONGODB_URI` | Connection URI for the `designer-user` database | `mongodb://admin:password@localhost:27017/designer-user?retryWrites=true` |

Replace the default with your own host and credentials. The FlowX Helm chart connects as the `designer-user` user.

### Redis configuration

| Environment Variable | Description | Default Value |
| - | - | - |
| `SPRING_REDIS_HOST` | Redis host | `redis-master` |
| `SPRING_REDIS_PORT` | Redis port | `6379` |
| `SPRING_REDIS_PASSWORD` | Redis password | - |
| `REDIS_TTL` | Cache TTL in milliseconds | `5000000` |

For Sentinel, Cluster, and TLS setups, see [Redis configuration](https://docs.flowx.ai/6.x/setup-guides/redis-configuration.md).

### Kafka configuration

| Environment Variable | Description | Default Value |
| - | - | - |
| `KAFKA_BOOTSTRAP_SERVERS` | Kafka broker addresses | `localhost:9092` |
| `KAFKA_SECURITY_PROTOCOL` | Security protocol for Kafka connections | `PLAINTEXT` |
| `KAFKA_MESSAGE_MAX_BYTES` | Maximum size of a produced message, in bytes | `52428800` (50 MB) |
| `KAFKA_AUTHEXCEPTIONRETRYINTERVAL` | Wait before retrying after an authorization error, in seconds | `10` |
| `KAFKA_CONSUMER_GROUPID_DESIGNERUSER_NOTIFICATIONS` | Consumer group for inbound notifications | `designeruser-notifications` |
| `KAFKA_CONSUMER_GROUPID_DESIGNERUSER_USERPREFERENCES` | Consumer group for preference updates | `designeruser-user-preferences` |
| `KAFKA_CONSUMER_THREADS_DESIGNERUSER_NOTIFICATIONS` | Consumer threads for inbound notifications | `3` |
| `KAFKA_CONSUMER_THREADS_DESIGNERUSER_USERPREFERENCES` | Consumer threads for preference updates | `3` |

Both consumer group IDs start with the shared `KAFKA_CONSUMER_GROUP_NAMING_PREFIX`, empty by default. See [Kafka configuration](https://docs.flowx.ai/6.x/setup-guides/setup-guides-overview.md#kafka-configuration) in the overview. For SASL, OAuth, and TLS, see [Kafka authentication](https://docs.flowx.ai/6.x/setup-guides/kafka-authentication-config.md).

### Kafka topics

| Environment Variable | Description | Default Value |
| - | - | - |
| `KAFKA_TOPIC_DESIGNERUSER_IN_NOTIFICATIONS` | Notifications for Designer users, sent by other FlowX services | `ai.flowx.designer-user.notifications.v1` |
| `KAFKA_TOPIC_DESIGNERUSER_IN_USERPREFERENCES` | User preference updates | `ai.flowx.designer-user.user-preferences.v1` |
| `KAFKA_TOPIC_EVENTSGATEWAY_OUT_NOTIFICATION` | Notifications pushed to the Designer through the Events Gateway | `ai.flowx.eventsgateway.user.notifications.v1` |
| `KAFKA_TOPIC_AUDIT_OUT` | Audit events | `ai.flowx.core.trigger.save.audit.v1` |

Create the two inbound topics before you deploy the service if your Kafka cluster doesn't create topics automatically.

### Service connections

| Environment Variable | Description | Default Value |
| - | - | - |
| `FLOWX_LIB_CASCLIENT_SERVICES_AUTHORIZATIONSYSTEM_BASEURL` | Authorization System URL | `http://authorization-system:80` |
| `FLOWX_LIB_CASCLIENT_SPICEDB_HOST` | SpiceDB host. Falls back to the shared `FLOWX_SPICEDB_HOST` value | `spicedb` |
| `FLOWX_LIB_CASCLIENT_SPICEDB_PORT` | SpiceDB gRPC port. Falls back to the shared `FLOWX_SPICEDB_PORT` value | `50051` |
| `FLOWX_LIB_CASCLIENT_SPICEDB_TOKEN` | SpiceDB preshared key. Falls back to the shared `FLOWX_SPICEDB_TOKEN` value | - |
| `FLOWX_LIB_SECURITY_SERVICES_ORGANIZATIONMANAGER_BASEURL` | Organization Manager URL | `http://organization-manager:80` |
| `FLOWX_SERVICE_APPMANAGER_BASEURL` | Application Manager URL | `http://application-manager:80` |

***

## Deployment

The FlowX Helm chart deploys the service as `designer-user` in the core group. It wires MongoDB, Redis, SpiceDB, Kafka, and both service accounts, and exposes the service on the admin host at `/designer-user`. The chart default requests 1 GiB of memory and 100m CPU, with a 1 GiB memory limit.

| Port | Used for |
| - | - |
| `8080` (service port `80`) | REST API used by the Designer |
| `8081` (`designer-user-mngt`) | Health probes and metrics, under `/manage/actuator` |

For chart-wide settings such as image registry, secrets, and network policies, see [Configure the FlowX Helm chart](https://docs.flowx.ai/6.x/setup-guides/configure-flowx-ai-helm-chart.md).

***

## Verify your setup

> [!TIP]
>
> The pod reports healthy: `GET /manage/actuator/health` on port `8081` returns `{"status":"UP"}`.

> [!TIP]
>
> The service logs show both Kafka consumers subscribed to `ai.flowx.designer-user.notifications.v1` and `ai.flowx.designer-user.user-preferences.v1`.

> [!TIP]
>
> In the Designer, the notification center opens without errors. After you export a project version, the export notification appears there.

***

## Troubleshooting

> [accordion] Notification center is empty or shows an error
>
> **Symptoms:** The Designer notification center doesn't load, or never shows new notifications.
>
> **Solutions:**
>
> 1. Check that the `designer-user` pod is running and healthy
> 2. Check that the admin host routes `/designer-user` to the service
> 3. Check that the inbound notifications topic exists and the service's consumer group is reading it
> 4. Check that the Events Gateway is running, since new notifications reach the Designer through it

> [accordion] Service fails to start
>
> **Symptoms:** The pod restarts during startup.
>
> **Solutions:**
>
> 1. Check the MongoDB URI and credentials for the `designer-user` database
> 2. Check that Redis is reachable with the configured host, port, and password
> 3. Check that `SECURITY_OAUTH2_BASESERVERURL` points to your Keycloak server and the `flowx-designer-user-sa` client secret is set

> [accordion] 401 or 403 errors from other services
>
> **Symptoms:** Calls to Application Manager, Organization Manager, or the Authorization System fail with 401 or 403.
>
> **Solutions:**
>
> 1. Check that the `flowx-designer-user-sa` client exists in the service-accounts realm
> 2. Check that the client secret matches the one in Keycloak
> 3. Check that the SpiceDB host and token match the values the other FlowX services use

***

## Related resources

> [card] [Notification center](https://docs.flowx.ai/6.x/docs/flowx-designer/notification-center.md)
>
> What Designer users see in the notification center

> [card] [Events Gateway setup](https://docs.flowx.ai/6.x/setup-guides/events-gateway-setup.md)
>
> Delivers notifications to the Designer in real time

> [card] [Authorization setup](https://docs.flowx.ai/6.x/setup-guides/authorization-setup-guide.md)
>
> Service-accounts realm and SpiceDB

> [card] [Kafka authentication](https://docs.flowx.ai/6.x/setup-guides/kafka-authentication-config.md)
>
> Configure Kafka security and authentication


## Related topics

- [Microservices setup guides](https://docs.flowx.ai/6.x/setup-guides/setup-guides-overview.md)
- [FlowX Designer setup](https://docs.flowx.ai/6.x/setup-guides/designer-setup-guide.md)
- [Integration Designer setup](https://docs.flowx.ai/6.x/setup-guides/integration-designer-setup.md)
- [Configuring an IAM solution (Keycloak)](https://docs.flowx.ai/6.x/setup-guides/access-management/configuring-an-iam-solution.md)
- [Runtime authorization](https://docs.flowx.ai/6.x/setup-guides/access-management/runtime-authorization.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.