Getting Started
Prerequisites
- Node.js ≥ 20.9.0
- PostgreSQL 16 or newer (or Docker)
- Discord Bot Token — create at the Discord Developer Portal
- npm (or any compatible package manager)
Installation
1. Clone the repository
git clone https://github.com/jonax1337/Synqed.git
cd Synqed2. Install dependencies
# backend
npm install
# frontend
cd dashboard && npm install && cd ..3. Configure environment variables
Copy the example and edit:
cp .env.example .envRequired variables
# Discord
DISCORD_TOKEN=your_bot_token
DISCORD_GUILD_ID=your_server_id
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/schedule_bot
# Admin
ADMIN_USERNAME=admin
ADMIN_PASSWORD_HASH=bcrypt_hash_here
JWT_SECRET=at_least_32_random_charsGenerate an admin password hash
npm run build
node dist/generateHash.jsThe script prompts for a password and prints a bcrypt hash you can paste into ADMIN_PASSWORD_HASH.
See Configuration for the full list of environment variables and runtime settings.
4. Set up the database
With Docker (recommended)
docker-compose up -d dbWithout Docker — ensure PostgreSQL is running and the database exists:
CREATE DATABASE schedule_bot;Then apply migrations:
npm run db:migrate5. Start the bot
Backend (bot + API)
npm run devThe bot connects to Discord and the API listens on :3001.
Dashboard
cd dashboard
npm run devThe dashboard is reachable at http://localhost:3000.
Discord bot setup
Bot permissions
The bot needs the following permissions in your Discord server:
- View Channels
- Send Messages
- Embed Links
- Add Reactions
- Use Slash Commands
- Read Message History
- Manage Messages — required to pin the weekly overview message
Invite the bot
Use the OAuth2 URL Generator in the Developer Portal with the permissions above plus the bot and applications.commands scopes.
First-time configuration
- The bot starts and registers every slash command automatically
- Open the admin dashboard at
http://localhost:3000/admin/login - Configure Settings:
- Schedule channel and ping role
- Daily post time and reminders
- Weekly planning reminder (days + time)
- Team name and branding
Register players
/register user:@Player role:MAINOr open the admin dashboard and use User Management for bulk operations.
Quick start with Docker
For an all-in-one setup:
# configure .env (see above)
docker-compose up -dThis starts:
- PostgreSQL on
:5432 - Bot + API on
:3001 - Dashboard on
:3000
Next steps
- Architecture — Internal structure
- Configuration — Every setting explained
- Scheduling System — How the daily and weekly flows work
- Slash Commands — Every Discord command
- API Reference — REST endpoints
