A Next.js application with GitHub OAuth authentication, built with Better Auth and Prisma.
The site is under construction, so OAuth of GitHub might not work because it is set temperaroly for the local URL for development.
- 🔐 GitHub OAuth authentication (GitHub-only)
- 📊 PostgreSQL database with Prisma ORM
- 🎨 Modern UI with Tailwind CSS and Shadcn UI
- ⚡ Built with Next.js 15 and React 19
- 🔄 State management with React Query and Zustand
- Node.js 18+ or Bun
- PostgreSQL database
- GitHub OAuth App credentials
- Create a
.envfile in the root directory:
DATABASE_URL="postgresql://user:password@host:port/database"
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"- Create a GitHub OAuth App:
- Go to GitHub Settings → Developer settings → OAuth Apps
- Create a new OAuth App
- Set Authorization callback URL to:
http://localhost:3000/api/auth/callback/github - Copy Client ID and Client Secret to your
.envfile
- Install dependencies:
bun install- Generate Prisma client and run migrations:
npx prisma generate
npx prisma migrate dev- Seed the database with test data (optional):
bun run db:seed- Run the development server:
bun devOpen http://localhost:3000 with your browser to see the result.
bun run db:clear- Clear all data from databasebun run db:seed- Clear all data (users are created automatically via GitHub OAuth on first login)bun run db:reset- Clear database (runs db:clear and db:seed)
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Authentication: Better Auth with GitHub OAuth
- Database: PostgreSQL with Prisma ORM
- Styling: Tailwind CSS
- UI Components: Shadcn UI
- State Management: React Query + Zustand
- Runtime: Bun
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.