Run it locally
Get the FluffBoost bot running on your machine with Bun and Docker Compose.
Prerequisites
- Bun (the project runs TypeScript directly — no build step)
- PostgreSQL 18 and Redis 8 (or just use the bundled Docker Compose). CI also runs the bot end-to-end suite against PostgreSQL 18.
- A Discord application with a bot token
Setup
Clone and install
Install once at the workspace root — Bun resolves every app in the monorepo.
git clone https://github.com/MrDemonWolf/fluffboost.git
cd fluffboost
bun installConfigure the bot
cp apps/discord/.env.example apps/discord/.envFill in the required values: DISCORD_APPLICATION_BOT_TOKEN, OWNER_ID and
MAIN_CHANNEL_ID. The template's DATABASE_URL and REDIS_URL already match
the Compose services. See Configuration for every
variable.
Start local infrastructure
docker compose up -dThis starts only PostgreSQL 18 and Redis 8, bound to 127.0.0.1 with the
defaults the bot expects (docker compose up -d postgres redis is
equivalent). The infrastructure does not need the .env file.
Sync the database schema
bun run db:pushdb:push is quick but records no migration history. If you also plan to run
the bot container (below) against this database, use bun run db:migrate
instead: the container's startup migration step refuses a database that has
the tables but no history. Already used db:push and now the container (or
db:migrate) stops with baseline required or type "DiscordActivityType" already exists? Keep your data and follow
Baseline an existing database
(its schema diff is empty when you pushed the current schema), or
Reconcile a legacy database
if the diff shows drift. On a throwaway dev database you can instead drop it,
recreate it, and run bun run db:migrate.
Load the starter quotes
bun run db:seedWithout quotes the bot has nothing to post. The seed skips quotes that already exist, so it is safe to re-run.
Run in watch mode
bun run dev:discordHandy workspace scripts
Run these from the repo root — they fan out through Turborepo:
| Script | What it does |
|---|---|
bun run dev:discord | Bot with hot reload |
bun run dev:docs | This docs/marketing site |
bun run dev:motion | Remotion Studio for the brand animations |
bun run test | Bot unit tests (excludes @fluffboost/motion) |
bun run test:coverage | Bot unit tests with coverage (what CI runs) |
bun run typecheck | TypeScript checks |
bun run lint:check | ESLint (no fixes) |
bun run db:push | Push schema changes to the dev database |
bun run db:seed | Load the starter quote library (safe to re-run) |
bun run db:reconcile --confirm | Legacy or drifted database to the current schema (details) |
bun run db:studio | Open Drizzle Studio |
Plain bun run dev starts the bot, the docs site and Remotion Studio together.
Run the bot in a container
To run the bot itself through Compose instead of bun run dev:discord:
docker compose --profile bot up --buildThe bot service builds apps/discord/Dockerfile, reads
apps/discord/.env if it exists, and points DATABASE_URL/REDIS_URL at the
Compose services. Its health API is published on 127.0.0.1:3000 only. The
optional env_file syntax needs Docker Compose 2.24 or newer.
The bot uses Discord's ShardingManager: apps/discord/src/app.ts is the
supervisor process that spawns shard processes running
apps/discord/src/bot.ts.