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

# App config reference

> config.ts schema, setting types, and configuration files

## config.ts

Located at `src/server/config.ts`.

```typescript theme={null}
import type { AppConfig } from '@synthetiq/app-framework/server';

export const APP_CONFIG = {
  app: {
    displayName: 'My App',
    description: 'What the app does',
    category: 'Analytics',
  },
  settings: [],
} as const satisfies AppConfig;
```

## App metadata

| Field         | Description                                            |
| ------------- | ------------------------------------------------------ |
| `displayName` | Human-readable app name, title-cased                   |
| `description` | Short description                                      |
| `category`    | App category for organization in the Synthetiq console |

## Setting types

| Type       | Description                      |
| ---------- | -------------------------------- |
| `text`     | Free-form text input             |
| `password` | Masked text input                |
| `url`      | URL input with validation        |
| `select`   | Dropdown with predefined options |
| `boolean`  | Toggle switch                    |

## Setting definition

```typescript theme={null}
{
  key: 'myKey',
  description: 'What this setting controls',
  type: 'select',
  required: false,
  defaultValue: 'default',
  options: JSON.stringify([
    { value: 'a', label: 'Option A' },
    { value: 'b', label: 'Option B' },
  ]),
}
```

## Accessing settings

Server-side only, via `ctx.appSettings`:

```typescript theme={null}
const value = ctx.appSettings.myKey || 'default';
```

To expose settings to the frontend, create a tRPC procedure that returns the needed values.
