The source code repository for hacker portal, SFU Surge's all-in-one hackathon application management system
-
First, ensure that you are using a stable and/or lts version of node >
v20(highly recommend using nvm and utilizing the.nvmrcfile in the repository) -
Have a running instance of MySQL, with a database and user credentials prepared ahead of time
-
Have
pnpminstalled:
npm install -g pnpm@latest
pnpm install- Copy
.env.exampleto.envand fill in credentials (shared values may be on the team Notion).
See .env.example for all variables. At minimum you need DBURL, NEXTAUTH_SECRET, and OAuth provider credentials for the sign-in methods you use.
If you are running the Discord announcements pipeline (via portal-discord-bot), also set:
# Bearer secret for POST/DELETE /api/webhooks/discord. Must match PORTAL_API_SECRET
# in the portal-discord-bot repo's .env. Treat as production secret.
DISCORD_INGEST_SECRET=<long random string>
# Optional. Set exactly to "false" to disable all Discord ingest (403 after auth).
# DISCORD_INGEST_ENABLED=false
# Optional. In-memory requests per minute per server instance (default 120).
# DISCORD_INGEST_RATE_LIMIT_PER_MINUTE=120
# Optional. Set to "true" to rehost Discord attachments into Cloudflare R2
# during webhook ingest. Requires all R2 vars below.
# DISCORD_ATTACHMENT_REHOST_ENABLED=true
# Required when DISCORD_ATTACHMENT_REHOST_ENABLED=true.
# R2_ENDPOINT=
# R2_ACCESS_KEY_ID=
# R2_SECRET_ACCESS_KEY=
# R2_BUCKET_NAME=
# R2_PUBLIC_DOMAIN=- You can use
docker-composeto create the local postgresql database
# just run to run the docker-compose.yaml db configs.
# then remember to toggle .env file to the local url
docker-compose upLocal DBURL (matches docker-compose.yaml):
postgres://root:12345@localhost:5432/portaldb
- If you have made additions/modifications to the drizzle schema, please first run
pnpm drizzle-kit generate - Then to persist your changes to your database, run
pnpm drizzle-kit push
pnpm run devor
npm run dev
pnpm run build
pnpm run startor
npm run build
npm run startSee notion page for login credentials are env variables
- Neon auto scaling is in effect, currently in development, scaling range is set to 0 to 0.5x. In prod the max range can be up to 2x resource.
- See design figma workspace