
# Quick Start

This guide takes you from an empty file to a running Sovrium app. Pick the approach that fits your workflow: a YAML file driven by the CLI, or a TypeScript project for full type safety.

## Choose your approach

Sovrium supports two configuration formats. YAML keeps things simple; TypeScript adds full type safety and autocompletion.

### Option A: YAML + CLI

The simplest path. Install the Sovrium CLI, write a YAML config, and start the server:

1. **Install the CLI** — Install the Sovrium binary to get the `sovrium` command. Homebrew, Docker, and Scoop are also available on the [Installation](/en/docs/installation) page.

   ```bash
   curl -fsSL https://sovrium.com/install | sh
   ```

2. **Create a config file** — Create an `app.yaml` with the simplest valid configuration: just a name.

   ```yaml
   name: my-app
   ```

3. **Add data tables** — Define your data models with typed fields, options, and validation.

   ```yaml
   name: my-app

   tables:
     - id: 1
       name: tasks
       fields:
         - id: 1
           name: title
           type: single-line-text
           required: true
         - id: 2
           name: status
           type: single-select
           options: [To Do, In Progress, Done]
   ```

4. **Start the server** — Run the dev server and visit `http://localhost:3000` to see your app.

   ```bash
   sovrium start app.yaml
   ```

:::callout
**Add more as you go.** Start small with just tables. Then progressively add theme, auth, pages, and analytics as your needs grow.
:::

### Option B: TypeScript

Prefer type safety? Author the config in TypeScript with full autocompletion, then run it with the same CLI:

1. **Add type definitions** — Install the zero-dependency `@sovrium/types` package as a dev dependency, just for IDE autocompletion.

   ```bash
   bun add -d @sovrium/types
   ```

2. **Create `app.ts`** — Wrap your config in `defineConfig()` as the default export, starting with just a name.

   ```typescript
   import { defineConfig } from '@sovrium/types'

   export default defineConfig({
     name: 'my-app',
   })
   ```

3. **Add data tables** — Extend the configuration with typed fields, options, and validation, with full autocompletion.

   ```typescript
   import { defineConfig } from '@sovrium/types'

   export default defineConfig({
     name: 'my-app',
     tables: [
       {
         id: 1,
         name: 'tasks',
         fields: [
           {
             id: 1,
             name: 'title',
             type: 'single-line-text',
             required: true,
           },
           {
             id: 2,
             name: 'status',
             type: 'single-select',
             options: ['To Do', 'In Progress', 'Done'],
           },
         ],
       },
     ],
   })
   ```

4. **Start the server** — Run the same CLI against your `app.ts` and visit `http://localhost:3000` to see your app.

   ```bash
   sovrium start app.ts
   ```

:::callout
**Why TypeScript?** TypeScript gives you autocompletion for every property and compile-time validation of field types. Ideal for developers who prefer code over config files.
:::

## What's next?

Now that your app is running, explore the schema reference to add more capabilities:

- [Core Concepts](/en/docs/concepts): The anatomy of a Sovrium app
- [Schema Overview](/en/docs/overview): All 18 root properties explained
- [Tables Overview](/en/docs/tables-overview): 49 field types, permissions, indexes
- [Theme](/en/docs/theme): Colors, fonts, spacing, and design tokens
- [Pages Overview](/en/docs/pages-overview): ~80 component types for server-rendered pages
