Skip to content

aman75way/LMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learning Management System (LMS) API

Overview

This is a full-stack LMS application similar to Udemy, built with Node.js, Prisma, TypeScript, Express, and React. It includes authentication, course management, enrollments, lectures, progress tracking, and purchases.

Tech Stack

Backend:

  • Node.js with Express.js (API development)
  • Prisma (ORM for PostgreSQL)
  • JWT Authentication (Access & Refresh tokens)
  • Rate Limiting (Prevents abuse on auth routes)
  • Swagger (API Documentation)
  • Docker & Docker Compose (Database containerization)

Frontend:

  • React + TypeScript (Component-based UI)
  • Redux Toolkit (State management)
  • Material UI & Framer Motion (UI & animations)
  • Axios (API requests)
  • Toastify (Notifications)

Features

  • User Authentication: Signup, Login, Logout, Refresh Token
  • Course Management: CRUD operations for courses
  • Lecture System: Add lectures to courses
  • Progress Tracking: Track completion of lectures
  • Enrollment System: Users can enroll in courses
  • Purchases: Secure course purchases with tracking
  • Rate Limiting: Protects API from excessive requests

Installation & Setup

Backend

  1. Clone the repository:
    git clone https://github.com/aman75way/LMS
    cd LMS
  2. Install dependencies:
    npm install
  3. Start PostgreSQL using Docker:
    docker-compose up -d
  4. Apply database migrations:
    npx prisma migrate dev --name init
  5. Start the backend server:
    npm run dev

Frontend

  1. Navigate to the frontend folder:
    cd frontend
  2. Install dependencies:
    npm install
  3. Start the React app:
    npm run dev

API Documentation

Swagger API documentation is available at:

http://localhost:5000/api-docs

Environment Variables

Variable Description
PORT Server port (default: 5000)
DATABASE_URL PostgreSQL connection URL
JWT_SECRET Secret key for JWT
FRONTEND_URL Frontend base URL (CORS)

Project Structure

lms-api/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ auth/         # Authentication module
β”‚   β”‚   β”œβ”€β”€ course/       # Course management
β”‚   β”‚   β”œβ”€β”€ enrollment/   # Enrollment system
β”‚   β”‚   β”œβ”€β”€ lecture/      # Lecture system
β”‚   β”‚   β”œβ”€β”€ progress/     # Progress tracking
β”‚   β”‚   β”œβ”€β”€ purchase/     # Course purchases
β”‚   β”‚   β”œβ”€β”€ common/       # Middleware & utilities
β”‚   β”œβ”€β”€ prisma/          # Prisma schema
β”‚   β”œβ”€β”€ docker-compose.yml
β”‚   β”œβ”€β”€ index.ts         # Server entry point
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ store/
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.tsx

GitHub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages