DeerHacks Hackathon 2026 Dashboard
This project is an open source archive of the DeerHacks Website & Dashboard and is licensed under the GPL v3.0 License. We also ask that you keep the footer attribution to the original creators if you decide to use this project for any derivative works.
- Run
npm installto install dependencies - Install all the required workspace
@recommendedextensions - Add the required
.env.localfile (see format below)
First, run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
The DeerHacks dashboard leverages the DeerHacks Backend and DeerHacks CMS to provide a full stack experience. To get started, follow the instructions in the respective repositories.
Ensure that the ports and environments are configured to work with each other.
The frontend redirects users to Discord for authentication. The OAuth2 URL configuration is critical.
The NEXT_PUBLIC_DISCORD_OAUTH2_URL must include these scopes:
| Scope | Purpose |
|---|---|
identify |
Read user's Discord ID, username, avatar |
email |
Read user's email address |
guilds.join |
Required for backend to add users to Discord server |
https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_CALLBACK_URL&response_type=code&scope=identify+email+guilds.join
Important Notes:
- The
redirect_urimust be URL-encoded (e.g.,http%3A%2F%2Flocalhost%3A3000%2Flogin%2Fcallback) - The
redirect_urimust be registered in Discord Developer Portal → OAuth2 → Redirects - Use
+or%20to separate scopes (both work)
If users can log in but don't get added to the Discord server, check that guilds.join is in the OAuth URL. The backend will log:
AddToDiscord failed (status 403). Response body: {"message": "Missing required OAuth2 scope", "code": 50026}
Fix: Add guilds.join to the OAuth URL. Existing users must log out and back in to get a new token with the updated scopes.
Create a .env.local file:
# Backend API URL
NEXT_PUBLIC_DEERHACKS_BASE_URL=http://localhost:8080
# Discord OAuth2 URL (MUST include guilds.join scope!)
# Development:
NEXT_PUBLIC_DISCORD_OAUTH2_URL=https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Flogin%2Fcallback&response_type=code&scope=identify+email+guilds.join
# Production example:
# NEXT_PUBLIC_DISCORD_OAUTH2_URL=https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=https%3A%2F%2Fdeerhacks.ca%2Flogin%2Fcallback&response_type=code&scope=identify+email+guilds.join
# Feature toggles
NEXT_PUBLIC_TOGGLE_DASHBOARD=true
NEXT_PUBLIC_TOGGLE_SIGNUP_HACKER=true
NEXT_PUBLIC_TOGGLE_HACKER_PACK=true- Go to Discord Developer Portal
- Select your application
- Copy the Application ID (this is your Client ID)
- Go to Discord Developer Portal → Your App → OAuth2 → Redirects
- Add your redirect URLs:
http://localhost:3000/login/callback(development)https://yourdomain.com/login/callback(production)
Run the commands to catch any linting / type errors:
npm run lint
npm run check-typesThese commands are run before pushing with husky and in our CI/CD pipeline with GitHub Actions.
