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 devOpen 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 the .env.example file to .env.local and fill in the required environment variables:
cp .env.example .env.localNEXTAUTH_URL: The base URL of your application (e.g.,http://localhost:3000for development)NEXTAUTH_SECRET: A random string used to hash tokens and sign cookiesDATABASE_URL: The connection string for your database
This project uses Resend for sending email notifications. To enable email functionality:
- Sign up for a Resend account
- Create an API key
- Add the API key to your
.env.localfile asRESEND_API_KEY - Set
EMAIL_FROMto your verified sender email address - Set
NEXT_PUBLIC_APP_URLto your application's URL (used in email links)
Email notifications are sent for:
- User registration (welcome email)
- New comments on posts
- Weekly forum digest (via cron job)
Users can manage their notification preferences in their profile settings.
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.
- Push your code to a Git repository (GitHub, GitLab, or Bitbucket)
- Import your repository on Vercel
- Vercel will detect that you're using Next.js and set up the build configuration for you
- Add your environment variables in the Vercel dashboard:
DATABASE_URL: Your production database connection stringNEXTAUTH_SECRET: A strong random string for authenticationRESEND_API_KEY: Your Resend API key (if using email functionality)EMAIL_FROM: Your verified sender email- Any other environment variables from your
.env.localfile
This project uses Prisma with PostgreSQL. For Vercel deployment:
- Create a PostgreSQL database (Vercel Postgres, Neon, Supabase, etc.)
- Add your database connection string as
DATABASE_URLin Vercel environment variables - Prisma migrations will run automatically during the build process
This repository is already initialized with Git. To push to your own repository:
# Change the remote URL to your repository
git remote set-url origin https://github.com/yourusername/your-repo-name.git
# Add all files
git add .
# Commit your changes
git commit -m "Initial commit"
# Push to your repository
git push -u origin mainRemember to update the NEXTAUTH_URL in your Vercel environment variables to match your deployed URL.
Check out our Next.js deployment documentation for more details.