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

# Testing a deployment

> Verify that your Prisme.ai platform is ready for use

Once you have deployed your own version of the core platform, use this checklist to confirm that all essential components are running smoothly.

## Platform Readiness API

The `GET /v2/readiness` endpoint provides an automated way to verify that all services and their dependencies (databases, Redis, brokers, etc.) are properly configured and reachable. It is the recommended first step after deploying or updating the platform.

### Access

This endpoint is restricted to:

* **Super admins** (authenticated users with the `superAdmin` role)
* **Internal API key** (via the `INTERNAL_API_KEY` header, used for service-to-service calls)

### Usage

```bash theme={null}
# As a super admin (with a JWT or access token)
curl -H "Authorization: Bearer YOUR_JWT" https://api.your-domain.com/v2/readiness

# With the internal API key
curl -H "x-prismeai-api-key: <INTERNAL_API_KEY>" https://api.your-domain.com/v2/readiness

# Filter specific services
curl https://api.your-domain.com/v2/readiness?services=api-gateway,runtime
```

The `services` query parameter accepts a comma-separated list to check only specific services. Valid values: `api-gateway`, `runtime`, `events`, `workspaces`.

### Response

The endpoint returns a JSON response with an overall `status` (`ready` or `error`) and per-service details:

```json theme={null}
{
  "status": "ready",
  "services": {
    "api-gateway": {
      "status": "ready",
      "modulesReady": [
        { "module": "database", "driver": "mongodb" },
        { "module": "sessionsRedis", "driver": "redis" },
        { "module": "rateLimitsRedis", "driver": "redis" },
        { "module": "broker", "driver": "redis" },
        { "module": "jwks", "driver": "http" }
      ]
    },
    "runtime": {
      "status": "ready",
      "url": "http://runtime:3003",
      "response": { "status": "ready", "modulesReady": [...] }
    },
    "events": {
      "status": "ready",
      "url": "http://events:3004",
      "response": { "status": "ready", "modulesReady": [...] }
    },
    "workspaces": {
      "status": "ready",
      "url": "http://workspaces:3002",
      "response": { "status": "ready", "modulesReady": [...] }
    }
  }
}
```

When errors are detected, the HTTP status code is **400** and each failing service includes an `errors` array with details:

```json theme={null}
{
  "status": "error",
  "services": {
    "api-gateway": {
      "status": "error",
      "errors": [
        {
          "error": "DatabaseError",
          "module": "database",
          "driver": "mongodb",
          "message": "Database tables are not initialized. Please check logs for more information"
        }
      ]
    }
  }
}
```

### What is tested

| Service          | Modules tested                                                                                                                                          |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **api-gateway**  | Can reach runtime, events and workspaces services. Redis cache, databases, broker, JWKS URI reachability                                                |
| **runtime**      | Redis cache, broker, permissions database, collections database, DSUL storage, searchengine reachable, custom code service reachable, gateway reachable |
| **events**       | Redis cache, broker, permissions database, Elasticsearch (write & delete), gateway reachable                                                            |
| **workspaces**   | Broker, permissions database, DSUL storage, gateway reachable                                                                                           |
| **searchengine** | Elasticsearch, Redis. Verifies it can create and delete an index                                                                                        |
| **crawler**      | Elasticsearch, Redis, `NO_PROXY=localhost` check, gateway reachable. Verifies it can create and delete an index                                         |

<Note>
  Results are cached for 30 seconds to avoid overloading services with repeated checks. You can configure the cache TTL with the `READINESS_CACHE_TTL_MS` environment variable.
</Note>

## Account Management

### Create an Account

1. Navigate to the Prisme.ai registration page.
2. Complete the required fields (name, email, password, etc.).
3. Confirm that the new account is created successfully.

### Login

1. Go to the Prisme.ai login page.
2. Sign in with the credentials of the newly created account.
3. Verify you can access the main platform dashboard.

### Logout

1. Ensure you can successfully log out of your account.

## Pages

1. Open the studio builder & create a workspace
2. From the left menu, create a new page
   * The technical slug will appear inside the page URL
3. Add a simple text block to the page
4. Save
5. Verify that the text block is displayed correctly.
6. Click the share button & open the page URL
7. Verify that the same text block appears

## Automations

1. Open the created workspace
2. From the left menu, create a new automation
3. Open the green output block
4. Type "Hello world" & save
5. Execute the automation from the top right corner
6. Verify you get the expected output
7. Now open the blue trigger block
8. Enable API trigger and save
9. Copy the trigger URL which appeared inside the blue trigger block
10. Open this URL inside a new tab & verify the output
11. Return to the automation builder tab & click on "See code"
12. Your automation manifest should appear in yaml format : try updating the output from here !

## Apps

### Publish an application

1. Open the created workspace
2. From the left menu open the 3 dots action list
3. Publish as an app

### Install an Application

1. Come back to the studio builder in order to create a new workspace
2. From the left menu, add a new app
3. Install the previously published app
4. Create a new automation
5. Add an instruction & select the "Hello world" app automation you created before
6. Type `output` in its output parameter
7. Open the green output block and type `{{output}}`
8. Run the automation
9. Verify you receive "Hello world"

## Workspace Management

### Workspace Share

1. Try sharing the workspace you have created with another user.

## Page share

1. Create a new workspace.
2. Try sharing the page you have created with another user.
3. Verify that the other user can access the page but not the entire workspace.

## Workspace settings

1. Go to the workspace settings.
2. Modify the name, description, and add a logo to your workspace.

## Activity feed

1. Open the activity feed
2. Verify that all the operations you have performed are logged with associated data.
3. Try filter suggestions

## Workspace versioning

1. Go to the workspace settings and add a version.
2. Open the activity feed : a versioning event should have appeared, including a rollback action
3. Create a new empty automation
4. On the activity feed, rollback to the created version
5. Verify the created automation has disappeared

Please make sure to follow the steps of each task and note the results obtained as well as any issues encountered during the tests. This information will be useful for improving and addressing any potential problems on the Prisme.ai platform.

Good luck with your tests!
