Tickettr is a production-ready Discord ticket bot (Discord.js + Sapphire) with a Next.js dashboard and Prisma/PostgreSQL storage.
- Node.js 20+
- npm 10+
- Docker + Docker Compose (recommended)
- A Discord application (bot + OAuth2)
- Copy
.env.exampleto.env - Fill in all secrets:
TOKEN: Discord bot tokenDISCORD_CLIENT_ID/DISCORD_CLIENT_SECRET: OAuth2 app credentialsDATABASE_URL: Postgres connection stringNEXTAUTH_SECRET: random 32+ char secret
- Create an app in Discord Developer Portal.
- Add bot intents: Server Members and Message Content.
- OAuth2 redirect URL:
http://localhost:3000/api/auth/callback/discord(and production URL equivalent). - Bot scopes:
bot applications.commands - Suggested bot permissions: Manage Channels, View Channels, Send Messages, Read Message History, Embed Links.
docker compose up --buildnpm install
npm run db:generate
npm run db:migrate
npm run dev # web
npm run bot:dev # bot in second terminal/setup— configure support role, panel channel, log channel, category/update-settings— update role/channel/category
npm ci
npm run db:generate
npm run db:deploy
npm run build
npm run bot:build
npm run start # web
npm run bot:startFor containerized deployment, use docker compose up -d with a managed Postgres instance and external reverse proxy (Nginx/Traefik/Caddy) terminating TLS.