Quickstart Guide

Get DiscoLink running in under 5 minutes.

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • A Discord server with forum channels
  • A Discord bot token (create one here)

1. Clone the Repository

git clone https://github.com/KevinTrinh1227/discolink.git
cd discolink
pnpm install

2. Configure Environment

Copy the example environment file and fill in your values:

cp .env.example .env

Required variables:

DISCORD_TOKEN=your_bot_token
DISCORD_CLIENT_ID=your_client_id
DATABASE_URL=file:./data/discolink.db

3. Set Up the Database

pnpm db:push

4. Start the Services

Run the API and bot together:

pnpm dev

Or run them separately:

# Terminal 1 - API
pnpm --filter @discolink/api dev

# Terminal 2 - Bot
pnpm --filter @discolink/bot dev

5. Invite the Bot

Generate an invite link with required permissions:

https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=274877908992&scope=bot

Required permissions:

  • Read Messages/View Channels
  • Read Message History
  • Use Slash Commands

6. Initial Sync

Use the /sync command in your Discord server to start the initial sync. The bot will index all existing forum threads.

7. Generate Static Site

Use the CLI to export your content as a static site:

pnpm --filter @discolink/cli build

# Export all threads
discolink export --server YOUR_SERVER_ID --output ./dist --template faq

Next Steps