EmberlyEmberly Docs

Development

Run the Emberly monorepo locally.

Emberly is a Turborepo monorepo using Bun workspaces.

Prerequisites

ToolVersion
Bun1.3+
Node.js24+
PostgreSQL14+
Redis7+

If you have Docker, this is the quickest way to get PostgreSQL and Redis:

docker run -d --name emberly-postgres -p 5432:5432 \
  -e POSTGRES_USER=emberly -e POSTGRES_PASSWORD=emberly -e POSTGRES_DB=emberly \
  postgres:17-alpine
docker run -d --name emberly-redis -p 6379:6379 redis:7-alpine

Setup

git clone https://github.com/EmberlyOSS/Emberly.git
cd Emberly
bun install
cp .env.example .env

The defaults in .env.example match the containers above. Set AUTH_SECRET to any value; in development a built-in one is used if it's empty.

bun run db:deploy   # apply migrations
bun run dev

Open http://localhost:3000. An empty database sends you to the Setup Wizard.

The background worker runs inside the app unless EMBERLY_RUN_EVENT_WORKER=false.


Layout

apps/
  dashboard/      Emberly web app, API and worker (Next.js)
    app/          Routes and API handlers
    components/
    lib/          Business logic and service clients
    scripts/      Worker and maintenance scripts
  docs/           docs.embrly.ca (Fumadocs)
  bot/            Discord bot
packages/
  db/             Prisma schema, migrations and generated client
  config/         Shared TypeScript and lint config

The root .env is shared. Dashboard scripts load it automatically.


Commands

Run these from the repository root.

CommandWhat it does
bun run devStarts the dashboard
bun run dev:allStarts every app through Turbo
bun run buildBuilds the dashboard
bun run startRuns the built dashboard
bun run workerRuns the background worker on its own
bun run typecheckType-checks every package
bun run lintLints every package
bun run testRuns tests
bun run formatFormats with Prettier

To work on a single app, run its scripts with --cwd, e.g. bun run --cwd apps/docs dev.


Database

The schema lives in packages/db/prisma/schema.prisma.

CommandWhat it does
bun run db:migrateCreates a migration from schema changes and applies it
bun run db:deployApplies existing migrations
bun run db:generateRegenerates the Prisma client
bun run db:studioOpens Prisma Studio
bun run db:seedCreates the Cloud plan catalog (Cloud mode only)

Use db:deploy against staging and production databases, never db:migrate.


Docker Images

The root Dockerfile builds the dashboard and is built from the repository root:

docker build -t emberly .
docker build -t emberly-worker --target worker .

The other apps each have a Dockerfile in their own folder and are built with that folder as the context, e.g. docker build apps/docs.


Flicker

Flicker, the desktop uploader, is a separate repository: EmberlyOSS/Flicker. See the Flicker development guide.

On this page