Skip to content

A Learning Platform, design and made by Self, by using the MERN Stack.

Notifications You must be signed in to change notification settings

Mrkarfa/SkillForge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ SkillForge LMS

Transform Your Learning Journey with Expert-Led Courses

Next.js TypeScript Clerk MongoDB Express

Live Demo β€’ Documentation β€’ Report Bug β€’ Request Feature


πŸ“‹ Table of Contents


🎯 About The Project

SkillForge is a modern, full-stack Learning Management System (LMS) designed to democratize education and make quality learning accessible to everyone. Built with cutting-edge technologies, it provides a seamless experience for both learners and educators.

Whether you're an individual looking to upskill, an educator wanting to share knowledge, or an organization training employeesβ€”SkillForge provides the tools you need.


πŸ”₯ The Problem We Solve

Traditional Learning Challenges

Problem Our Solution
Expensive Education Affordable courses with free enrollment options
Geographic Limitations Learn anywhere, anytime, on any device
Outdated Content Continuously updated courses by industry experts
Lack of Tracking Built-in progress tracking and certificates
Complex Administration Intuitive admin dashboard for course management
Security Concerns Enterprise-grade authentication with Clerk

Who Benefits?

  • πŸŽ“ Students - Access quality education without barriers
  • πŸ‘¨β€πŸ« Instructors - Create and monetize courses easily
  • 🏒 Organizations - Train teams with custom learning paths
  • 🏫 Educational Institutions - Extend reach beyond physical classrooms

✨ Key Benefits

πŸš€ Performance

Lightning-fast with Next.js 16, React 19, and Turbopack for instant page loads

πŸ”’ Security

Enterprise-grade Clerk authentication with protected routes and secure sessions

πŸ“± Responsive

Fully responsive design that works beautifully on desktop, tablet, and mobile

πŸ“Š Analytics

Track student progress, course completion rates, and engagement metrics

🎨 Modern UI

Beautiful dark theme with gradient accents and smooth animations

πŸ”§ Scalable

Microservices-ready architecture that scales with your needs


πŸ›‘οΈ Security & Architecture

Authentication Layer (Clerk)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     SECURITY ARCHITECTURE                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Frontend   │────▢│    Clerk     │────▢│   Backend    β”‚ β”‚
β”‚  β”‚   Next.js    β”‚     β”‚  Auth Layer  β”‚     β”‚  Express.js  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚         β”‚                    β”‚                    β”‚          β”‚
β”‚         β–Ό                    β–Ό                    β–Ό          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  Protected   β”‚     β”‚    JWT +     β”‚     β”‚   MongoDB    β”‚ β”‚
β”‚  β”‚    Routes    β”‚     β”‚   Sessions   β”‚     β”‚  (Encrypted) β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Security Features

Layer Protection
Frontend β€’ Clerk middleware for route protection
β€’ Environment variable isolation
β€’ XSS prevention with React
Authentication β€’ OAuth 2.0 & OpenID Connect
β€’ Multi-factor authentication (MFA)
β€’ Session management with automatic refresh
Backend β€’ CORS protection
β€’ Input validation & sanitization
β€’ MongoDB injection prevention
β€’ Clerk webhook verification
Data β€’ Encrypted connections (HTTPS/TLS)
β€’ Password hashing (bcrypt)
β€’ Secure environment variables

Backend API Security

// Clerk webhook verification for secure user sync
const { Webhook } = require("svix");

// All API routes protected with authentication middleware
app.use("/api/protected/*", verifyClerkToken);

// CORS configured for specific origins
app.use(
  cors({
    origin: process.env.FRONTEND_URL,
    credentials: true,
  })
);

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
Next.js 16 React framework with App Router & Turbopack
React 19 UI library with latest concurrent features
TypeScript Type safety and better DX
Clerk Authentication & user management
Axios HTTP client for API communication

Backend

Technology Purpose
Express.js Fast, minimal web framework
MongoDB NoSQL database for flexible schemas
Mongoose ODM for MongoDB with validation
Svix Webhook verification for Clerk
CORS Cross-origin resource sharing

DevOps & Tools

Technology Purpose
ESLint Code linting and standards
dotenv Environment variable management
npm Package management

🎯 Features

For Students

  • βœ… Browse and search courses by category/level
  • βœ… Enroll in free and paid courses
  • βœ… Track progress with visual indicators
  • βœ… Resume learning from where you left off
  • βœ… Access courses on any device
  • βœ… Earn completion certificates

For Instructors (Coming Soon)

  • πŸ“ Create and publish courses
  • πŸ“Ή Upload video content
  • πŸ“Š View analytics and earnings
  • πŸ’¬ Interact with students

For Administrators

  • πŸ‘₯ User management
  • πŸ“š Course CRUD operations
  • πŸ“ˆ Platform analytics
  • βš™οΈ System configuration

πŸš€ Getting Started

Prerequisites

  • Node.js 18.0 or higher
  • npm 9.0 or higher
  • MongoDB (local or Atlas)
  • Clerk Account (for authentication)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/skillforge-lms.git
    cd skillforge-lms
  2. Install frontend dependencies

    cd frontend
    npm install
  3. Install backend dependencies

    cd ../backend
    npm install
  4. Configure environment variables

    Frontend (frontend/.env.local):

    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
    CLERK_SECRET_KEY=your_clerk_secret_key
    NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
    NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
    NEXT_PUBLIC_API_URL=http://localhost:5000/api

    Backend (backend/.env):

    PORT=5000
    MONGODB_URI=mongodb://localhost:27017/skillforge
    CLERK_WEBHOOK_SECRET=your_webhook_secret
  5. Start development servers

    # Terminal 1 - Frontend
    cd frontend
    npm run dev
    
    # Terminal 2 - Backend
    cd backend
    npm start
  6. Open your browser

    http://localhost:3000
    

πŸ“ Project Structure

skillforge-lms/
β”œβ”€β”€ πŸ“‚ frontend/                 # Next.js Application
β”‚   β”œβ”€β”€ πŸ“‚ app/                  # App Router pages
β”‚   β”‚   β”œβ”€β”€ πŸ“„ page.tsx          # Homepage
β”‚   β”‚   β”œβ”€β”€ πŸ“„ layout.tsx        # Root layout + ClerkProvider
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ about/            # About page
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ contact/          # Contact page
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ courses/          # Course listing & details
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ my-courses/       # Student dashboard
β”‚   β”‚   β”œβ”€β”€ πŸ“‚ sign-in/          # Clerk sign-in
β”‚   β”‚   └── πŸ“‚ sign-up/          # Clerk sign-up
β”‚   β”œβ”€β”€ πŸ“‚ components/           # Reusable components
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Navbar.tsx        # Navigation with auth state
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Hero.tsx          # Homepage hero section
β”‚   β”‚   β”œβ”€β”€ πŸ“„ CourseCard.tsx    # Course card component
β”‚   β”‚   └── πŸ“„ Footer.tsx        # Site footer
β”‚   β”œβ”€β”€ πŸ“„ proxy.ts              # Clerk middleware
β”‚   └── πŸ“„ package.json
β”‚
β”œβ”€β”€ πŸ“‚ backend/                  # Express.js API
β”‚   β”œβ”€β”€ πŸ“‚ config/
β”‚   β”‚   └── πŸ“„ db.js             # MongoDB connection
β”‚   β”œβ”€β”€ πŸ“‚ models/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ Course.js         # Course schema
β”‚   β”‚   β”œβ”€β”€ πŸ“„ User.js           # User schema
β”‚   β”‚   └── πŸ“„ Progress.js       # Progress tracking
β”‚   β”œβ”€β”€ πŸ“‚ routes/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ courseRoutes.js   # Course endpoints
β”‚   β”‚   β”œβ”€β”€ πŸ“„ userRoutes.js     # User endpoints
β”‚   β”‚   └── πŸ“„ progressRoutes.js # Progress endpoints
β”‚   β”œβ”€β”€ πŸ“„ server.js             # Express entry point
β”‚   └── πŸ“„ package.json
β”‚
└── πŸ“„ README.md

πŸ“‘ API Reference

Courses

Method Endpoint Description Auth
GET /api/courses Get all courses Public
GET /api/courses/:id Get single course Public
POST /api/courses Create course Admin
PUT /api/courses/:id Update course Admin
DELETE /api/courses/:id Delete course Admin

Users

Method Endpoint Description Auth
POST /api/users/webhook Clerk webhook Webhook
GET /api/users/:clerkId Get user profile Private
POST /api/users/:id/enroll/:courseId Enroll in course Private

Progress

Method Endpoint Description Auth
GET /api/progress/:userId/:courseId Get course progress Private
POST /api/progress/complete Mark chapter complete Private
GET /api/progress/:userId Get all progress Private

🌐 Deployment

Deploy to Vercel (Frontend)

Deploy with Vercel

Deploy to Render (Backend)

  1. Create a new Web Service on Render
  2. Connect your GitHub repository
  3. Set environment variables
  4. Deploy!

Environment Variables for Production

Variable Where Description
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY Frontend Clerk public key
CLERK_SECRET_KEY Both Clerk secret key
MONGODB_URI Backend MongoDB connection string
NEXT_PUBLIC_API_URL Frontend Backend API URL

🀝 Contributing

Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.


πŸ™ Acknowledgments


⭐ Star this repo if you find it helpful!

Made with ❀️ by the Mrkarfa

⬆ Back to Top

About

A Learning Platform, design and made by Self, by using the MERN Stack.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published