SlugHub Portal is a Next.js app for UCSC community leaders to manage and publish their organization’s profile, events, and contact info in the SlugHub directory.
- Install dependencies:
npm install-
For local dev, create or update
.env.local(see Environment Variables below). -
Run the dev server:
npm run devOpen http://localhost:3000.
- Node.js (LTS recommended)
- npm (bundled with Node.js)
- A Google OAuth client for NextAuth (see Auth Setup)
- Supabase for database of clubs, events, club memebers, etc.
- Prisma for database integration and querying
npm run devStart the dev servernpm run buildBuild for productionnpm run startStart the production servernpx prisma generateSync changes made in schema.prisma to the databasenpm run lintRun ESLint
Create or update .env.local with the following. The app will not work without google auth set up.
Required env:
GOOGLE_CLIENT_IDGoogle OAuth client idGOOGLE_CLIENT_SECRETGoogle OAuth client secretNEXTAUTH_URLBase URL for NextAuth (ex:http://localhost:3000)NEXTAUTH_SECRETSecret for NextAuth (required in production, recommended in dev)CRON_SECRETSecret for vercel cron job that runs automatic email reminder every day at 9am
Email notification env (optional):
RESEND_API_KEYUse Resend APIEMAIL_FROMFrom address for emails
app/Next.js App Router pages and API routeslib/shared utilities (auth, permissions, mail)prisma/includes models for databasepublic/static assetsscripts/helper scripts for debugging
app/page.tsxHome / landingapp/directoryUCSC Community Portalapp/leader/dashboardLeader dashboardapp/admin/reviewCommunity approvalsapp/admin/accessAccess requests
- This repo uses Next.js App Router.