Full-stack Next.js platform with CMS and auth - built for managing and selling online math courses.
- Full Authentication with BetterAuth - secure login, registration, and email verification powered by Resend.
 - Admin CMS Dashboard - manage courses, lessons, and media directly through an integrated Payload CMS interface.
 - Stripe Payments - sell courses with one-time payments using Stripe Checkout.
 - Drizzle ORM Integration - type-safe, lightweight, and modern database management.
 - Tailwind CSS + Shadcn/UI - clean, responsive, and consistent design system for the entire platform.
 
- Node.js (v18 or higher)
 - npm package manager
 - Docker Desktop (for PostgreSQL database)
 - Git
 
git clone https://github.com/maciekt07/nextjs-math-course
cd nextjs-math-coursenpm installCreate a .env file in the root directory. Use .env.example as a template.
Both PostgreSQL (for main app data) and MongoDB (for Payload CMS) run via Docker Compose
docker-compose up -dTo verify the database is running:
docker-compose psnpm run stripe:webhooknpm run devThe application should now be running at http://localhost:3000
Once the app is running, you can access the CMS at:
- 
Create your admin account on first visit
 - 
Use the panel to manage courses, lessons, and media
 
docker-compose exec db psql -U postgres -d math_coursenpm run db:studioThis opens a visual database browser at https://local.drizzle.studio
docker-compose down
