Getting started
Install dependencies, configure the environment, and run the admin portal and sites locally.
Getting started
Prerequisites
- Bun matching the version in the root
package.json. - A PostgreSQL database, for example a free Neon project.
Install and configure
git clone <your-repository-url>
cd <your-repository>
bun install
cp env.example .env.localFill in at least DATABASE_URL, BETTER_AUTH_SECRET, BACKEND_ADMIN_EMAILS
(who may sign in to the admin portal), and BACKEND_SESSION_SECRET in the
root .env.local. Each app's local URL is already set in its committed
.env.development. env.example lists every variable; see
Configure authentication for the auth values.
Never commit real values.
Prepare the database
For local development, push the schema, create the default tenant and its site admin, then create one tenant per site:
bun run db:push
bun run db:seed
bun run db:seed:sitesUse reviewed migrations (bun run db:generate followed by
bun run db:migrate) for shared environments.
Run the apps
bun run dev| App | URL |
|---|---|
Admin portal (apps/backend) | http://localhost:8800 |
AlloyDB console (sites/net.alloydb.console) | http://localhost:8801 |
To run one app without the Turborepo TUI, use bun run dev:backend
or bun run dev:alloydb.console. Sign in to the admin portal
with an email from BACKEND_ADMIN_EMAILS; until email delivery is configured,
the sign-in code prints in the backend's terminal.