Skip to content

fakhranii/e-learning-platform-nestjs-api

Repository files navigation

E-learning-Platform-Api

Table of Contents

Project Description

The E-Learning API Project is a robust backend system for managing users, instructors, and courses. There is admin dashboard that can manages everything in the platform. The Platform offers the following key features:

Admin Dashboard:

  • The admin is able to view the full number of users and review all statistics of the platform.
  • Admins have the ability to manage users, instructors, reviews and courses and everything in the platform. He can delete anything he deemed unsuitable.

Authentication Management:

  • Users can register as students who consume the courses or instructors who create and manage courses.
  • It includes a password recovery feature, allowing users to receive a reset code via email and easily set a new password if they forget theirs.

Instructor:

  • Instructors can create and manage courses, providing important details such as course descriptions, prerequisites, what students will learn, and the course language.

  • Instructors can also upload course images using Cloudinary, with built-in image compression to ensure optimized performance.

Course Management:

  • Instructors can create and manage courses with rich details such as course descriptions, prerequisites, learning outcomes, and course language.

User Interaction:

  • Students can browse and enroll in courses, leave reviews, and rate courses using a star-based rating system along with written feedback.

Dealing with images:

  • The platform integrates Cloudinary for image uploading for users' profile picture & courses'cover - Also use compression package to anutilizes image compression, making the process faster and more efficient.

Robust Security System:

The platform includes a solid security system with multiple protections:

  • CSRF Token Protection: Prevents cross-site request forgery attacks.
  • Spam Request Prevention: Limits the number of requests per second to block spam attacks.
  • Input Data Sanitization: Ensures the application is safe from malicious scripts by cleaning user inputs.
  • Request Body Size Limitation: Prevents overloading the server memory by restricting large request payloads.

Seamless Integration:

  • The API is designed to work effortlessly with frontend applications, mobile apps, and desktop apps, ensuring compatibility and flexibility across platforms.
  • This combination of user-friendly features and strong security measures makes the API a scalable and reliable solution for e-learning platforms.

Used Technologies

  • Node.js
  • Nest.js
  • MySQL.
  • TypeORM
  • Docker
  • Docker-Compose
  • JWT
  • Bcrypt
  • Class-Transformer.
  • Class-Validator.
  • Cloudinary.
  • Compression.
  • Helmet.
  • Hpp.
  • Nodemailer.
  • Sanitize-Html.
  • slugify.

How to Install and Run the Project

Prerequisites

dependencies Installation via Docker-Compose

  • This command will install specific version of Nodejs and all packages with their versions which are exist in package.json and start the necessary containers for the project [ phpmyadmin-ui - mysql-db]. At the end the project gonna run .. all with one command

    Here You are the Command :

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build -d
  • Also you should create a .env file in the root directory of the project and add the following environment variables:
DB_HOST =
DB_PORT =
DB_NAME =
DB_USERNAME =
DB_PASSWORD =

jwtSecret =

CLOUDINARY_URL=
CLOUDINARY_CLOUD_NAME =
CLOUDINARY_API_KEY =
CLOUDINARY_API_SECRET=

#? NodeMailer - Email settings
# EMAIL_HOST=smtp.ethereal.email
# Email_PORT=587
EMAIL_USER=
EMAIL_PASSWORD=

COOKIE_SECRET_KEY=
  • Or you can see the file that includes all variables from here: example.env

API Documentation

  • The API documentation is available at the following URL: API Documentation
  • You can also find the API documentation in the project's root directory in the postman-collections file.

About

Educational platform api - project with Nest JS framework - Mysql ( typeOrm )

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors