Skip to content

Full-stack Next.js platform with CMS, auth and Stripe - built for managing and selling online math courses.

License

maciekt07/nextjs-math-course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Next.js Math Course Platform

Full-stack Next.js platform with CMS and auth - built for managing and selling online math courses.

GitHub code size in bytes GitHub created at GitHub last commit GitHub License

Features

  • Full authentication system with BetterAuth, including email verification using Resend
  • Admin CMS panel for managing courses and lessons via Payload CMS
  • Stripe integration for selling courses
  • Drizzle ORM integration for database management
  • Tailwind + Shadcn UI components

Requirements

  • Node.js (v18 or higher)
  • npm package manager
  • Docker Desktop (for PostgreSQL database)
  • Git

Installation Steps

1. Clone the Repository

git clone https://github.com/maciekt07/nextjs-math-course
cd nextjs-math-course

2. Install Dependencies

npm install

3. Set Up Environment Variables

Create a .env file in the root directory. Use .env.example as a template.

4. Start Databases

Both PostgreSQL (for main app data) and MongoDB (for Payload CMS) run via Docker Compose

docker-compose up -d

To verify the database is running:

docker-compose ps

5. Run the Stripe webhook listener

npm run stripe:webhook

6. Start the Development Server

npm run dev

The application should now be running at http://localhost:3000

7. Access Payload CMS Admin Panel

Once the app is running, you can access the CMS at:

http://localhost:3000/admin

  • Create your admin account on first visit

  • Use the panel to manage courses, lessons, and users

Database Management

Access PostgreSQL CLI

docker-compose exec db psql -U postgres -d math_course

View Database with Drizzle Studio

npm run db:studio

This opens a visual database browser at https://local.drizzle.studio

Stop the Database

docker-compose down

Credits

Made with ❤ by maciekt07, licensed under MIT

Releases

No releases published

Packages

No packages published