# Install and verify

## Before you start

- `node`: `>=18.0.0`.

Use a project with a `package.json`. Check the runtime and package manager:

```bash
node --version
npm --version
```

## Install the documented version

```bash
npm install @qentrah/cms@3.0.0-beta.31
```

## Confirm the installation

```bash
npm ls @qentrah/cms
```

The output should show `@qentrah/cms@3.0.0-beta.31`. Commit the lockfile so another developer installs the same dependency tree.

## Peer dependencies

Install compatible peers in the consuming application. These ranges come from the published manifest.

| Package | Required range |
| --- | --- |
| `zod` | `^3.0.0 || ^4.0.0` |
| `hono` | `^4.0.0` |
| `drizzle-orm` | `^0.44.0` |
| `@cloudflare/workers-types` | `^4.0.0 || ^5.0.0` |

## Create an application

```bash
npx create-qentrah@beta my-qentrah
cd my-qentrah
npm run dev
```

## Install the runtime directly

```bash
npm install @qentrah/cms@beta hono drizzle-orm zod
```

```ts
import { createQentrahApp, registerCollections } from '@qentrah/cms'
import type { QentrahConfig } from '@qentrah/cms'

const config: QentrahConfig = {
  name: 'My CMS',
}

registerCollections([
  {
    name: 'article',
    displayName: 'Article',
    slug: 'articles',
    kind: 'collection',
    schema: {
      type: 'object',
      properties: {
        title: { type: 'string', title: 'Title', required: true },
        body: { type: 'lexical', title: 'Body' },
      },
      required: ['title'],
    },
    managed: true,
    isActive: true,
  },
])

export default createQentrahApp(config)
```

## Expected result

The factory exports a Hono application. Hosting, database bindings, migrations, storage, and authentication still need to be configured by the consuming application. Creating the object alone does not provision a database.