mirror of
https://github.com/UiO-Gaming/name-100-uio-gamers.git
synced 2026-11-05 13:56:53 +01:00
6912d163f342b4b7efe99ab3f4403496946edaaf
avoid having to make this manual change in the production environment
Name 100 UiO Gamers
Inspired by the "name 100 women challenge", this project is the same concept but limited to members of UiO Gaming, regardless of gender.
Setup
- Create an application in the Discord Developer Portal.
- Under OAuth2, add
<NEXTAUTH_URL>/api/auth/callback/discordas a redirect URL. - Under Bot, create a bot, enable the Server Members Intent, and invite it to the UiO Gaming server. The bot only needs to be a member of the server; no extra permissions are required.
- Copy
env.exampleto.envand fill in the values:
| Variable | Description |
|---|---|
DISCORD_CLIENT_ID |
OAuth2 client ID of the Discord application |
DISCORD_CLIENT_SECRET |
OAuth2 client secret of the Discord application |
DISCORD_BOT_TOKEN |
Token of the bot user |
DISCORD_GUILD_ID |
ID of the UiO Gaming Discord server |
DISCORD_REQUIRED_ROLE_ID |
ID of the paying member role, required to log in and counted as valid |
NEXTAUTH_SECRET |
Random secret used to sign sessions, e.g. openssl rand -base64 32 |
NEXTAUTH_URL |
Public URL of the site, e.g. http://localhost:3000 |
Development
npm install
npm run dev
starts a development server on http://localhost:3000. See the Next.js documentation for more details.
Run npm run lint to lint the project.
Deployment
The app is deployed with Docker Compose, which reads the environment variables from .env:
docker compose up -d --build
Pushing to main deploys automatically through the GitHub Actions workflow in .github/workflows/deploy.yml.
Languages
TypeScript
88.9%
Dockerfile
5.3%
CSS
4.8%
JavaScript
1%