This project is a backend application for an E-Learning platform, built using Node.js, Express.js, JWT, and RESTful API principles. The application leverages MongoDB for the database, Multer for file handling, and Nodemailer for email functionalities. It features a fully functional authentication system using cookies and JWT.
https://documenter.getpostman.com/view/31297722/2sA3XJnRJd
to access resources add (/api/v1/resourcesName ) example : https://e-learning-backend-application.onrender.com/api/v1/courses
https://e-learning-backend-application.onrender.com
clone the project to your machine with the following command
- git clone https://github.com/Mohamed-Ramadan1/E-Learning-Backend-Application
- navigate to the project
- run npm install
the application has missing file (.env) file that contains important information without this data the project will not work
- in root folder create (.env) file (use the exact name =.env)
- add this variable to the file and add your own data NODE_ENV=development NODE_ENV=production PORT=3000
DATABASE= (your database) DATABASE_PASSWORD = (your database password)
SECRET=(secret for JWT authentication encryption) JWT_EXPIRES_IN=90d JWT_EXPIRES_IN_LOGOUT=0s JWT_COOKIE_EXPIRES_IN=90
cloudinary configuration CLOUD_NAME=() CLOUD_API_KEY=592256278369915 CLOUD_API_SECRET=gTAYBtaSemj3NhhNPo8xfIa4m7g
EMAIL_PASSWORD= ( your outlook email password )
View Courses:
- Non-Authenticated Users: Can view available courses.
- Authenticated Users: Can purchase courses, enroll in courses, or apply for financial aid to access courses for free.
- Admin Users: Can add new courses, update existing courses, delete courses, and retrieve details of all courses or a single course.
User Authentication:
- Sign Up: Users can create an account.
- Sign In: Users can log into their account.
- Password Management: Users can reset their password or request a password reset email.
- Authenticated User Management:
- Account Management: Authenticated users can update their account information (name, email, password, photo) or delete their account.
- Account Deactivation: Users can deactivate their accounts (deactivated accounts cannot access the system).
- Course Enrollment: Users can view all courses they are enrolled in.
- Email Verification: Users can verify their account via email sent to their email address.
Admin Management:
- Special User Accounts: Admins can create special user accounts (admin/instructor).
- User Management: Admins can retrieve user accounts, delete user accounts, view all users on the system, deactivate/reactivate user accounts, and re-verify accounts if needed.
- Email Verification: Admins can verify user account emails.
- User Enrollments:
- Enroll in Courses: Users can enroll in available courses.
Admin Management:
- Manage Enrollments: Admins can view all enrollments in the application.
- Delete Enrollments: Admins can delete any enrollment.
- Verify Enrollments: Admins can verify enrollments to ensure they are valid.
- User Reviews:
- Create Reviews: Users can create reviews for courses they are enrolled in.
- Update Reviews: Users can update their existing reviews.
- Delete Reviews: Users can delete their reviews.
- View Reviews: Users can view their own reviews and see all reviews for a specific course.
- User Tasks:
- Create Tasks: Users can create new tasks.
- Update Tasks: Users can update their existing tasks.
- Delete Tasks: Users can delete their tasks.
- View Tasks: Users can view all their tasks or get details of a specific task.
- Task Statistics: Users can view statistics about their tasks.
Admin Management:
- Manage Blogs: Admins can view all blogs, unpublish blogs, republish blogs, and delete blogs.
- User Blog Management:
- Create Blogs: Users can create new blogs.
- Update Blogs: Users can update their existing blogs.
- Delete Blogs: Users can delete their blogs.
- View Blogs: Users can view all blogs and their own blogs.
- Blog Privacy: Users can set their blogs to be private or public.
Application to Become Instructor:
- Non-Authenticated Users: Can apply to become instructors.
- Authenticated Users: Can apply to become instructors.
- Admin Management:
- View Applications: Admins can view all applications and individual applications.
- Manage Applications: Admins can update, delete, approve, or reject applications to become instructors.
User Payments:
- Create Payment Records: Users can create payment records when they enroll in courses.
Admin Management:
- Manage Payment Records: Admins can create, retrieve, update, and delete all payment records.
User Financial Aid Requests:
- Apply for Financial Aid: Users can apply for financial aid for courses they are not enrolled in.
- View Request Status: Users can view the status of their financial aid requests.
- Delete Requests: Users can delete their financial aid requests.
Admin Management:
- View Requests: Admins can view all financial aid requests.
- Manage Requests: Admins can update, delete, approve, or reject financial aid requests.
User Notes:
- Create Notes: Users can take notes while watching enrolled courses.
- Update Notes: Users can update their existing notes.
- Delete Notes: Users can delete their notes.
User Wishlist:
-
Add Courses: Users can add courses to the wishlist.
-
Delete Courses: Users can delete their courses from the wishlist.