This guide covers local installation, required environment variables, and third-party configuration.
Install and prepare the following before starting:
- Bun 1.1 or later
- MySQL 8+ (or a MySQL-compatible provider)
- Redis 6+
- A Discord application (OAuth client)
- A FiveM server for integration testing
git clone https://github.com/rojinc/softora-queue.git
cd softora-queue
bun install
cp .env.example .envAfter copying .env, fill in values from the sections below.
bunx prisma generate
bunx prisma db pushThis creates or updates schema objects from prisma/schema.prisma.
bun run devOpen http://localhost:3000.
DATABASE_URL(required): MySQL connection string.REDIS_URL(required): Redis connection string.
AUTH_SECRET(required): session encryption/signing secret.AUTH_URL(required): public URL of this app.
DISCORD_CLIENT_ID(required)DISCORD_CLIENT_SECRET(required)
DISCORD_BOT_TOKENDISCORD_GUILD_IDDISCORD_ADMIN_ROLE_IDDISCORD_MODERATOR_ROLE_ID(optional, if used in your workflow)
These are needed only if you want automatic role-based admin/moderator syncing.
STEAM_API_KEY
PORT(default3000)HOSTNAME(defaultlocalhost)ALLOWED_ORIGIN(recommended in production; used for CORS/WebSocket origin handling)
- Create an application in Discord Developer Portal.
- Configure OAuth redirect URI:
- local:
http://localhost:3000/api/auth/callback/discord - production:
https://your-domain/api/auth/callback/discord
- local:
- Create a bot and copy the token if role sync is needed.
- Enable Server Members Intent for role lookups.
- Invite the bot to your Discord server.
For first-time bootstrap, either:
- set
isAdmin=truedirectly on your user record in the database, or - configure
DISCORD_ADMIN_ROLE_IDand log in with a Discord account that has that role.
After local setup is complete:
- Configure the FiveM resource: docs/fivem-resource.md
- Review API behavior: docs/api-reference.md
- Prepare production deployment: docs/deployment.md