[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Schema](https://evolu.dev/docs/api-reference/common/local-first/Schema) › EvoluSchema

```ts
type EvoluSchema = ReadonlyRecord<string, TableSchema>;
```

Defined in: [packages/common/src/local-first/Schema.ts:81](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Schema.ts#L81)

Defines the schema of an Evolu database.

Column types are Standard Schema v1 compatible — use Evolu Type, Zod,
Valibot, ArkType, or any library that implements Standard Schema.

Table schema defines columns that are required for table rows. For optional
columns, use a schema whose output type includes `null`.

### Example

```ts
// With Evolu Type
const TodoId = id("Todo");
type TodoId = typeof TodoId.Type;

const Schema = {
  todo: {
    id: TodoId,
    title: NonEmptyString100,
    isCompleted: nullOr(SqliteBoolean),
  },
};

// With Zod (or any Standard Schema library)
const Schema = {
  todo: {
    id: TodoId, // Evolu id() for branded IDs
    title: z.string().min(1).max(100),
    isCompleted: z.union([z.literal(0), z.literal(1)]).nullable(),
  },
};
```