Skip to content

sonnysangha/lms-course-platform-saas-nextjs15-sanity-stripe-clerk-shadcn-typescript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

46 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Modern LMS Platform - Next.js 15 & Sanity CMS

A modern, feature-rich Learning Management System built with Next.js 15, Sanity CMS, Clerk, and Stripe. Features real-time content updates, course progress tracking, and secure payment processing.

Features

For Students

  • ๐Ÿ“š Access to comprehensive course content
  • ๐Ÿ“Š Real-time progress tracking
  • โœ… Lesson completion system
  • ๐ŸŽฏ Module-based learning paths
  • ๐ŸŽฅ Multiple video player integrations (YouTube, Vimeo, Loom)
  • ๐Ÿ’ณ Secure course purchases
  • ๐Ÿ“ฑ Mobile-friendly learning experience
  • ๐Ÿ”„ Course progress synchronization

For Course Creators

  • ๐Ÿ“ Rich content management with Sanity CMS
  • ๐Ÿ“Š Student progress monitoring
  • ๐Ÿ“ˆ Course analytics
  • ๐ŸŽจ Customizable course structure
  • ๐Ÿ“น Multiple video hosting options
  • ๐Ÿ’ฐ Direct payments via Stripe
  • ๐Ÿ”„ Real-time content updates
  • ๐Ÿ“ฑ Mobile-optimized content delivery

Technical Features

  • ๐Ÿš€ Server Components & Server Actions
  • ๐Ÿ‘ค Authentication with Clerk
  • ๐Ÿ’ณ Payment processing with Stripe
  • ๐Ÿ“ Content management with Sanity CMS
  • ๐ŸŽจ Modern UI with Tailwind CSS and shadcn/ui
  • ๐Ÿ“ฑ Responsive design
  • ๐Ÿ”„ Real-time content updates
  • ๐Ÿ”’ Protected routes and content
  • ๐ŸŒ™ Dark mode support

UI/UX Features

  • ๐ŸŽฏ Modern, clean interface
  • ๐ŸŽจ Consistent design system using shadcn/ui
  • โ™ฟ Accessible components
  • ๐ŸŽญ Smooth transitions and animations
  • ๐Ÿ“ฑ Responsive across all devices
  • ๐Ÿ”„ Loading states with skeleton loaders
  • ๐Ÿ’ซ Micro-interactions for better engagement
  • ๐ŸŒ™ Dark/Light mode toggle

Getting Started

Prerequisites

  • Node.js 18+
  • npm/yarn
  • Stripe Account
  • Clerk Account
  • Sanity Account

Environment Variables

Create a .env.local file with:

# Sanity
NEXT_PUBLIC_SANITY_PROJECT_ID=your-project-id
NEXT_PUBLIC_SANITY_DATASET=production
# Read Token
SANITY_API_TOKEN=your-sanity-read-token
# Full Access Admin Token
SANITY_API_ADMIN_TOKEN=your-sanity-admin-token

# For Sanity Studio to read
SANITY_STUDIO_PROJECT_ID=your-project-id
SANITY_STUDIO_DATASET=production

# Next.js
NEXT_PUBLIC_BASE_URL=http://localhost:3000

# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key
STRIPE_SECRET_KEY=your-stripe-secret-key
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret

# Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your-clerk-publishable-key
CLERK_SECRET_KEY=your-clerk-secret-key

Installation

# Clone the repository
git clone https://github.com/yourusername/lms-platform

# Install dependencies
npm install

# Start the development server
npm run dev

# In a separate terminal, start Sanity Studio
npm run sanity:dev

Setting up Sanity CMS

  1. Create a Sanity account
  2. Create a new project
  3. Install the Sanity CLI:
    npm install -g @sanity/cli
  4. Initialize Sanity in your project:
    sanity init
  5. Deploy Sanity Studio:
    sanity deploy

Setting up Clerk

  1. Create a Clerk application
  2. Configure authentication providers
  3. Set up redirect URLs
  4. Add environment variables

Setting up Stripe

  1. Create a Stripe account
  2. Set up webhook endpoints
  3. Configure payment settings
  4. Set up webhook forwarding for local development:
    stripe listen --forward-to localhost:3000/api/stripe-checkout/webhook

Architecture

Content Schema

  • Courses

    • Title
    • Description
    • Price
    • Image
    • Modules
    • Instructor
    • Category
  • Modules

    • Title
    • Lessons
    • Order
  • Lessons

    • Title
    • Description
    • Video URL
    • Content (Rich Text)
    • Completion Status
  • Students

    • Profile Information
    • Enrolled Courses
    • Progress Data
  • Instructors

    • Name
    • Bio
    • Photo
    • Courses

Key Components

  • Course Management System

    • Content creation and organization
    • Module and lesson structuring
    • Rich text editing
    • Media integration
  • Progress Tracking

    • Lesson completion
    • Course progress calculation
    • Module progress visualization
  • Payment Processing

    • Secure checkout
    • Course enrollment
    • Stripe integration
  • User Authentication

    • Clerk authentication
    • Protected routes
    • User roles

Usage

Creating a Course

  1. Access Sanity Studio
  2. Create course structure with modules and lessons
  3. Add content and media
  4. Publish course

Student Experience

  1. Browse available courses
  2. Purchase and enroll in courses
  3. Access course content
  4. Track progress through modules
  5. Mark lessons as complete
  6. View completion certificates

Development

Key Files and Directories

/app                    # Next.js app directory
  /(dashboard)          # Dashboard routes
  /(user)              # User routes
  /api                 # API routes
/components            # React components
/sanity                # Sanity configuration
  /lib                 # Sanity utility functions
  /schemas             # Content schemas
/lib                   # Utility functions

Core Technologies

  • Next.js 15
  • TypeScript
  • Sanity CMS
  • Stripe Payments
  • Clerk Auth
  • Tailwind CSS
  • Shadcn UI
  • Lucide Icons

Features in Detail

Course Management

  • Flexible course structure with modules and lessons
  • Rich text editor for lesson content
  • Support for multiple video providers
  • Course pricing and enrollment management

Student Dashboard

  • Progress tracking across all enrolled courses
  • Lesson completion status
  • Continue where you left off
  • Course navigation with sidebar

Video Integration

  • URL Video Player
  • Loom Embed Support
  • Responsive video playback

Payment System

  • Secure Stripe checkout
  • Course access management
  • Webhook integration
  • Payment status tracking

Authentication

  • User registration and login
  • Protected course content
  • Role-based access control
  • Secure session management

UI Components

  • Modern, responsive design
  • Loading states and animations
  • Progress indicators
  • Toast notifications
  • Modal dialogs

Join the World's Best Developer Course & Community Zero to Full Stack Hero! ๐Ÿš€

Want to Master Modern Web Development?

This project was built as part of the Zero to Full Stack Hero course. Join thousands of developers and learn how to build projects like this and much more!

What You'll Learn:

  • ๐Ÿ“š Comprehensive Full Stack Development Training
  • ๐ŸŽฏ 50+ Real-World Projects
  • ๐Ÿค Access to the PAPAFAM Developer Community
  • ๐ŸŽ“ Weekly Live Coaching Calls
  • ๐Ÿค– AI & Modern Tech Stack Mastery
  • ๐Ÿ’ผ Career Guidance & Interview Prep

Course Features:

  • โญ Lifetime Access to All Content
  • ๐ŸŽฏ Project-Based Learning
  • ๐Ÿ’ฌ Private Discord Community
  • ๐Ÿ”„ Regular Content Updates
  • ๐Ÿ‘ฅ Peer Learning & Networking
  • ๐Ÿ“ˆ Personal Growth Tracking

Join Zero to Full Stack Hero Today!

Support

For support, join our Discord community or email support@example.com

License

This project is licensed under the MIT License - see the LICENSE.md file for details


Built with โค๏ธ using Next.js, Sanity, Clerk, and Stripe

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

โšก