Skip to content
FluffBoost

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 install

Configure the bot

cp apps/discord/.env.example apps/discord/.env

Fill 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 -d

This 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:push

db: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:seed

Without 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:discord

Handy workspace scripts

Run these from the repo root — they fan out through Turborepo:

ScriptWhat it does
bun run dev:discordBot with hot reload
bun run dev:docsThis docs/marketing site
bun run dev:motionRemotion Studio for the brand animations
bun run testBot unit tests (excludes @fluffboost/motion)
bun run test:coverageBot unit tests with coverage (what CI runs)
bun run typecheckTypeScript checks
bun run lint:checkESLint (no fixes)
bun run db:pushPush schema changes to the dev database
bun run db:seedLoad the starter quote library (safe to re-run)
bun run db:reconcile --confirmLegacy or drifted database to the current schema (details)
bun run db:studioOpen 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 --build

The 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.

On this page