Learnopia is a comprehensive e-learning platform built with Node.js and Express.js for the server-side functionality. The application utilizes MongoDB for data storage, Cloudinary for image media storage, and AWS S3 for course video storage. In addition, a course recommendation model has been implemented using machine learning algorithms with FastAPI.
- Features
- Technologies Used
- Setup Instructions
- Node.js APIs
- Course Recommendation Model
- Usage
- Contributing
- License
- User authentication and authorization
- Course creation and management
- Image and video uploads
- Course recommendations based on user input
- Node.js - JavaScript runtime for the server-side
- Express.js - Web framework for building APIs
- MongoDB - NoSQL database for data storage
- Cloudinary - Image and media storage
- AWS S3 - Cloud storage for videos
- FastAPI - Web framework for building APIs in Python
- scikit-learn - Machine learning library for Python
- Pandas - Data manipulation and analysis library for Python
-
Clone the repository:
git clone <repository-url> cd E-school-Server
-
Install dependencies:
npm install
-
Configure environment variables: Create a
.envfile in the root directory and add the required environment variables (e.g., database URI, Cloudinary credentials). -
Run the server:
npm start
-
Clone the repository:
git clone <repository-url> cd ML-Model-Server
-
Install Python dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.envfile in the root directory and add the required environment variables. -
Run the FastAPI server:
uvicorn main:app --reload
- POST
/register: Register a new user. - POST
/login: Authenticate user and issue token. - GET
/logout: Log the user out. - GET
/current-user: Get current user info (requires sign-in). - POST
/forgot-password: Initiate password reset. - POST
/reset-password/:id: Reset user password. - GET
/user/get-courses: Fetch user’s enrolled courses (requires sign-in). - GET
/user/mycart: Retrieve user’s cart (requires sign-in).
- GET
/courses: List all courses. - GET
/courseView/:slug: View course details. - POST
/course/upload-image: Upload course image (requires sign-in). - POST
/course/create-course: Create a new course (requires sign-in, instructor). - GET
/course/:slug: Fetch course details. - POST
/course/video-upload/:id: Upload course video (requires sign-in). - POST
/course/lesson/:slug/:id: Add lesson to course (requires sign-in). - PUT
/course/publish/:courseId: Publish a course. - GET
/check-enrollment/:courseId: Check course enrollment status (requires sign-in).
- POST
/make-instructor: Promote user to instructor (requires sign-in). - POST
/instructor-image: Upload instructor profile image (requires sign-in). - GET
/instructor-courses: Get instructor’s courses (requires sign-in). - GET
/instructor-payments: View instructor payment records (requires sign-in).
- GET
/products: List all products. - POST
/products/upload-image: Upload product image (requires sign-in). - POST
/products/createproduct: Create new product (requires sign-in, instructor). - POST
/products/addtocart: Add product to cart (requires sign-in).
-
Technology: Built using FastAPI and scikit-learn.
-
Functionality:
- Data Loading: Loads course data from a CSV file.
- Preprocessing: Cleans the dataset by removing unnecessary columns and filling NaNs.
- Text Vectorization: Uses TF-IDF to convert course subjects into a numerical format for analysis.
- Similarity Calculation: Computes similarity scores between courses using a sigmoid kernel.
-
Key Function:
recommend_course(course): Takes a course title as input and returns the top 10 similar courses based on content similarity.
- Access the e-learning platform at the designated URL after starting the Node.js server.
- Use the
/recommendendpoint on the FastAPI server to get course recommendations by sending a course title as input.
Contributions are welcome! Please feel free to submit a pull request or open an issue to discuss changes.