Steps to run the site locally for development or curiosity
Follow these steps to create a fork of this repository and clone it to your local machine.
If you have just run git clone ... , the next step would be to move into the cloned repo:
cd hacktoberfestThis repo requires node, pnpm, and the Netlify CLI to get started.
The best way to install node is to download the installer from their site. This repo requires node version 24 or newer (see .nvmrc), which is the current LTS version.
If you already have a different version of node installed, but don't want to update globally, you can install a package called nvm, which will allow you to easily switch node versions. Once you have nvm installed (or if you already have it installed), you can run nvm use in the main directory and it will install the proper version of node.
pnpm is a package manager that is used to install the rest of our dependencies.
Read more about pnpm on their docs site.
The best way to install pnpm for this project is by using Corepack, a new feature bundled with Node.
Install pnpm via corepack with the following commands:
corepack enable
corepack prepareUse the following command to create a local .env.local file. Then open the new file (.env.local) and fill in the values -- every variable is documented inline in the example file.
cp .env.local.example .env.localYou will need two things of your own:
- A secret. Generate one with
openssl rand -base64 32and put it inBETTER_AUTH_SECRET. - A GitHub OAuth app for local development, created under Developer settings -> OAuth Apps. Set its Authorization callback URL to
http://localhost:8888/api/auth/callback/github-- note port 8888, which is whatnetlify devserves on, not Next's 3000. Copy the client ID and secret intoGITHUB_CLIENT_IDandGITHUB_CLIENT_SECRET.
Use your own OAuth app rather than sharing one: a GitHub OAuth app allows exactly one callback URL.
Leave VC_GITHUB_ORG unset if you are not a Virtual Coffee org member -- the admin-role lookup is then skipped entirely and everything else works normally.
Once you have node, pnpm, and the Netlify CLI installed, you're ready to install the local dependencies! Run the following command:
pnpm installThen link your checkout to the Netlify project, which is what lets the CLI start a local database for you:
netlify login
netlify linkAt this point you're ready to roll! Run the following command to get rolling!
pnpm devRead more about what pnpm dev does in the following section.
The following commands are available for your use. Most of the time you'll only ever need pnpm dev.
pnpm devThis is the only command you need to do normal local development.
It runs netlify dev, which starts Next and the local Postgres database, then serves both at http://localhost:8888. Any changes you make should re-build the site and re-load your browser.
Use ctrl-c to quit the server when you're done.
Use
pnpm dev, notnextdirectly. The local database only starts alongside the Netlify dev server, sopnpm dev:nextwill boot the site and then fail on the first query. If you see an error saying no database connection is available, this is why.
Before your first run, apply the migrations:
netlify database migrations applyThe schema lives in db/schema/. auth.ts is generated by the Better Auth CLI and must not be hand-edited; app.ts holds the application tables.
Netlify owns migration state and applies netlify/database/migrations on deploy, so drizzle-kit is only ever used to author SQL -- never run drizzle-kit migrate or push against this project.
# 1. edit db/schema/app.ts, then generate the SQL
pnpm db:generate
# 2. create the migration Netlify will apply
netlify database migrations new -d "what changed"
# 3. copy the SQL from db/.drizzle into that migration file, then apply it
netlify database migrations applyIf you change the Better Auth config in lib/auth.ts in a way that affects its tables, run pnpm auth:generate first to regenerate db/schema/auth.ts.
- NextJS
- TypeScript
- Better Auth for authentication
- Netlify DB with Drizzle
- Tailwind UI
- Hosted on Netlify