---
title: Development
---

# Development

This guide explains how to run Bracket without Docker. They cover database setup, configuration and
how to run the frontend and backend. If you quickly want to get up and running, please read
[quickstart](/docs/running-bracket/quickstart.mdx).

## Database

First create a `bracket` cluster:

```bash
sudo pg_createcluster -u postgres -p 5532 13 bracket
pg_ctlcluster 13 bracket start
```

Subsequently, create a new `bracket_dev` database. First connect via `sudo -Hu postgres psql -p
5532`, and then run:

```sql
CREATE USER bracket_dev WITH PASSWORD 'bracket_dev';
CREATE DATABASE bracket_dev OWNER bracket_dev;
```

You can do the same but replace the user and database name with:

- `bracket_ci`: for running tests
- `bracket_prod`: for a production database

The database URL can be specified per environment in the `.env` files (see
[config](/docs/running-bracket/configuration.mdx)).

## Running the frontend and backend

To run Bracket (frontend and backend) locally without Docker, one needs `pnpm` and `uv`.

The following starts the frontend and backend for local development in the root
directory of Bracket:

```shell
./run.sh
```

If either the frontend or backend doesn't shut down correctly, you can run (on Linux)
`killall gunicorn node`.

But **be careful** that this will also kill other gunicorn and node processes.

In case you want to run the frontend and backend yourself, see the following
two sections.

### Frontend

```bash
cd frontend
pnpm run dev
```

### Backend

```bash
cd backend
uv run ./run.sh
```

### Alternative: running Bracket via process-compose

Alternatively, you can use [process-compose](https://github.com/F1bonacc1/process-compose) to run
the app locally. It works similarly to docker-compose, except it works with non-containerized
applications.

Just install it according to the [docs](https://f1bonacc1.github.io/process-compose/installation/)
and then run:

```shell
cp process-compose-example.yml process-compose.yml
process-compose up -d
```

Press CTRL + C (or F10) to exit.

You can adjust the config by editing `process-compose.yml`.
