First Time Setup
This guide walks you through getting Drako Tickets running for the first time.
Prerequisites
Node.js 18 or later
A Supabase project (free tier is fine)
A hosting provider (Vercel recommended) or a self-hosted server
Create your environment file
The project includes a .env.local.example file with every available variable and a description of each. Create a copy and call it .env
Rename the .env.example to .env
Open .env in a text editor. The sections below explain where to find each value.
Supabase credentials
These are required for the app to connect to your database and auth service.
NEXT_PUBLIC_SUPABASE_URL
Supabase dashboard β Select the Project β Copy the Project URL under "x's Project"
NEXT_PUBLIC_SUPABASE_ANON_KEY
Project Settings β API Keys β Legacy anon β Copy anon public
SUPABASE_SERVICE_ROLE_KEY
Project Settings β API Keys β Legacy anon β Copy service_role
DATABASE_URL
Project Overview β Connect (Top of Page) β Connection String β Change method to 'Transaction pooler' β Copy database link
You can view your project by navigating to https://supabase.com/dashboard/org
Your DATABASE_URL will look like
App URL
These three variables tell the app what URL it is running on. They are used to build absolute URLs for outbound emails, OAuth redirect callbacks, and the IMAP poller.
Production (example):
Local development:
Configure Supabase Auth
Before running the app, set the allowed URLs in your Supabase project so that OAuth and email callbacks work correctly.
Go to your Supabase dashboard β Authentication β URL Configuration.
Set Site URL to your app's URL, e.g.
https://your-app.vercel.app.Under Redirect URLs, add:
https://your-app.vercel.app/auth/callbackhttp://localhost:3000/auth/callback(for local development)

Next steps
Email Integration β set up SMTP outbound mail and IMAP inbound email-to-ticket
Discord Integration β connect the Discord bot to your server
Login Providers β enable Google, Discord, or Microsoft OAuth sign-in
Last updated