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

> ## Agent Instructions
> The docs are served at https://docs.devias.io. Every path in these docs is relative to that root: /llms.txt is https://docs.devias.io/llms.txt.
> Devias is an open-source platform that works as an operating system for a business: a core (records, views, workflows, agents, permissions) with installable modules.
> Pages are typed by folder. concepts/ explains what things are, guides/ gives procedures, reference/ is exhaustive (SDK, CLI, HTTP API), operate/ covers hosting. Use /start/glossary for exact terms.
> Every id in a module (module, object, field, view, action, workflow, step, connection, variable, event, policy) is a uuid. Generate them with `devias id <count>`. Never invent dotted or readable ids.
> Run `devias plan` and read its output before `devias apply`. Apply only what the plan says.
> The OpenAPI document, including the routes of the modules in the reference setup, is at /reference/api/openapi.json.
> Devias is young and changes quickly. If a page and the source repository (github.com/devias-io/devias) disagree, the repository is right.

# Contributing

> The layout of the Devias monorepo (packages, apps and modules), the everyday pnpm commands, what to run after changing the database or the API (including regenerating OpenAPI and the SDK types), the smoke tests, and the licences.

This page describes the layout of the Devias repository and the commands used when working on Devias itself.

## The repository

Devias is a monorepo of small packages.

| Folder | What it holds |
| - | - |
| `packages/core` | The contracts everything shares: schemas, manifests, actions, helpers. |
| `packages/data-engine` | The server's engine: metadata, records, change feed, permissions. |
| `packages/server` | The API for writing a module's server code. |
| `packages/studio` | The studio: pages, views, record screens, workflows, agents. |
| `packages/ui` | Components, icons and design tokens. |
| `packages/sdk` | The typed client and the in-memory mock. |
| `packages/ai` | The agent runtime. |
| `packages/cli` | The `devias` command. |
| `packages/fixtures` | Small modules that tests are built on. |
| `apps/server` | The API server. |
| `apps/studio` | The studio app, configured in one file. |
| `modules/*` | The built-in modules: CRM, products, quotes, invoicing, expenses, inventory, Stripe, Resend and Context.dev. |

## Everyday commands

```bash theme={"dark"}
pnpm dev           # the server and the studio
pnpm typecheck     # check every package
pnpm test          # run every test
pnpm lint          # check formatting and style
```

While iterating, run one package's tests. Run the whole suite once at the end of a larger change.

## After changing the database

```bash theme={"dark"}
pnpm db:generate   # write a migration for a schema change
pnpm db:migrate    # apply migrations
```

## After changing the API

Regenerate the API description, then the SDK's types from it. The export writes `apps/server/openapi.json` (the core API) and `apps/server/openapi.with-modules.json` (the same document plus the routes of the modules in `devias.config.ts`). The documentation publishes the second one as `reference/api/openapi.json`.

```bash theme={"dark"}
pnpm --filter @devias/server-app openapi:export
pnpm sdk:generate
```

## Smoke tests

Two scripts check the whole thing end to end against a running server: `pnpm smoke:api` walks the API, and `pnpm smoke:ui` drives the studio in headless Chrome.

## Licence

Most of Devias is under the [AGPL-3.0](https://github.com/devias-io/devias/blob/main/LICENSE). The SDK, the UI package and the CLI are MIT.

## Related

* [What a module is](https://docs.devias.io/guides/modules/what-a-module-is.md): the most common way to extend Devias.
* [Architecture](https://docs.devias.io/concepts/architecture.md): studio, server and modules.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.