This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Geist, a new font family for Vercel.
Copy .env.example
to .env
and set MONGODB_URI
before running the server. The auth API routes rely on this variable at runtime. During build the code is safe to build without the env set.
cp .env.example .env
# edit .env and set MONGODB_URI
Unit and integration tests are powered by Vitest and Testing Library. Run:
npm test
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
This repository includes a GitHub Actions workflow (.github/workflows/deploy-vercel.yml
) that can deploy to Vercel when you push to main
.
Required GitHub repository secrets to enable automatic deploys:
VERCEL_TOKEN
- your Vercel personal tokenVERCEL_PROJECT_ID
- the Vercel project idVERCEL_ORG_ID
- the Vercel organization id
Required runtime environment variables (set in Vercel or your environment):
MONGODB_URI
- MongoDB connection stringJWT_SECRET
- secret used to sign JWT session tokensSESSION_SAMESITE
(optional) - cookie SameSite behavior:lax
(default),strict
, ornone
To deploy manually, build locally and upload the .next
output and public
folder, or connect this repository to Vercel and set the secrets above.
You can also deploy this app to Netlify using the official Next.js plugin. A sample netlify.toml
and GitHub Actions workflow (.github/workflows/deploy-netlify.yml
) are included.
Required Netlify-related secrets when using the provided GitHub Action:
NETLIFY_AUTH_TOKEN
- your Netlify personal access tokenNETLIFY_SITE_ID
- the target Netlify site id
Netlify requires the @netlify/plugin-nextjs
plugin which is referenced in netlify.toml
.