# Getting started

## Requirements

- Rust stable with the `wasm32-wasip2` target (`rustup target add wasm32-wasip2`) for building addons.
- PostgreSQL 14 or newer.
- Node.js with **pnpm** for the frontend.

## Run it

```sh
make build            # frontend, server and docs
export DATABASE_URL=postgres://postgres@127.0.0.1:5432/pelty
export PELTY_ENCRYPTION_KEY=$(openssl rand -base64 32)
./target/release/pelty-server migrate
PELTY_ADMIN_PASSWORD='a long strong password' ./target/release/pelty-server admin create admin@example.com
./target/release/pelty-server serve
```

Every setting is an environment variable. The full list, with defaults, is in [Configuration](configuration.md). Server sub-commands are in [CLI](cli.md).

## The docs themselves

`make docs` runs `cargo run -p pelty-docs -- target/docs` and writes HTML, Markdown and JSON. The server publishes that folder at `/docs`:

- `PELTY_DOCS_DIR` sets the folder (default `target/docs`).
- `PELTY_DOCS_PUBLIC=true` opens the docs to everyone. By default only signed-in staff can read them.

Staff open them from **Developer docs** in the admin sidebar.

## What you can extend

- **WASM addons** (`engine: "wasm"`): gateways, provisioning modules, registrars, captcha, SSO and general integrations. They run sandboxed and can only use the capabilities an admin approved. Start with [Write a plugin in Rust](plugin-rust.md).
- **Webhook plugins**: an external HTTPS service receives signed domain events. See [Events and hooks](events-guide.md).
- **Themes**: design tokens, a logo, a stylesheet or a complete frontend bundle. See [Themes](themes.md).

