This is a Next.js project bootstrapped with create-next-app.
This application requires the following environment variables to be configured:
DATABASE_URL: PostgreSQL connection string for the application database
GITHUB_ID: GitHub OAuth application IDGITHUB_SECRET: GitHub OAuth application secretAUTH_SECRET: NextAuth secret key for session encryption (use a secure random string)
REACT_APP_GITHUB_TOKEN: GitHub personal access token for GitHub API calls (optional, used for public API access)
- Create a
.env.localfile in the project root - Add all required environment variables:
DATABASE_URL="postgresql://user:password@host:port/database" GITHUB_ID="your_github_oauth_app_id" GITHUB_SECRET="your_github_oauth_app_secret" AUTH_SECRET="generate_a_random_secure_string" REACT_APP_GITHUB_TOKEN="your_github_token_optional"
To set up GitHub OAuth for this application:
- Go to GitHub Settings > Developer settings > OAuth Apps
- Create a new OAuth App with the following:
- Application name: Your app name
- Homepage URL:
http://localhost:3000(for local dev) - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Copy the Client ID and Client Secret and add them to your
.env.localfile asGITHUB_IDandGITHUB_SECRET
For production deployment, set environment variables through your hosting platform's environment configuration:
- Set
GITHUB_ID,GITHUB_SECRET, andAUTH_SECRETin your production environment variables - Update the GitHub OAuth app's callback URL to your production domain:
https://yourdomain.com/api/auth/callback/github - Use a strong, randomly-generated string for
AUTH_SECRETin production
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.
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.