Welcome to the Elearning platform! Enroll in courses, access content, and start your learning journey! š
Landing Page |
Login Page |
Course View |
Course Content |
Landing Page |
Login Page |
Course View |
Course Content |
To run this project locally, ensure you have the following software, tools, and configurations installed:
npm -v
in your terminal.These tools are š essential for setting up and running the frontend of the Elearning-React project locally.
To get this project up and running on your local machine, follow the instructions below:
Clone the Frontend Repository
Clone the repository to your local machine using Git:
git clone https://github.com/srikanthkanniyappan/Elearning-React.git
Navigate to the Project Directory
Move into the project directory:
cd Elearning-React
Install Dependencies
Use npm to install the required dependencies:
npm install
You need to configure the environment variables for the project to work correctly.
Create a .env
file
In the root of your project, create a .env
file and add the following:
VITE_API_URL=http://127.0.0.1:8000/api/
This URL will connect your frontend to the Django backend. š
Refer the Backend Repository for API Documentation
Since the backend is developed in Django, please refer to the Django Backend Repository for API documentation and additional setup instructions. š
Once these steps are completed, you'll be ready to run the frontend and connect to the backend. š
After completing the installation and environment configuration, follow these steps to run and use the application:
Run the following command to start the application in development mode:
npm run dev
http://localhost:5173/
šThe app saves your last watched video so you can pick up right where you left off!
The app is already deployed on Vercel. Check out the live demo:
Live Demo š
Below is the standard folder structure of the Elearning-React project:
Elearning-React/
āāā node_modules/ # Contains all npm dependencies
āāā public/ # Static files and assets
ā āāā icons/ # Icon files used in the project
ā āāā images/ # Image files used in the project
āāā src/ # Main source code of the project
ā āāā components/ # Reusable React components
ā āāā pages/ # Page components for routing
ā āāā routes/ # React Router configurations
ā āāā services/ # API service calls using Axios
ā āāā App.jsx # Main app component
ā āāā index.css # Global CSS styles
ā āāā main.jsx # React DOM rendering
āāā .gitignore # Git ignored files and folders
āāā .env # Environment variables
āāā eslint.config.js # ESLint configuration file
āāā index.html # HTML entry point for the app
āāā package.json # Project metadata and dependencies
āāā package-lock.json # Lock file for npm dependencies
āāā postcss.config.js # PostCSS configuration
āāā tailwind.config.js # TailwindCSS configuration
āāā vercel.json # Vercel deployment configuration
āāā vite.config.js # Vite configuration for the project
The API for this project is powered by a separate Django backend. For details on the API endpoints, models, and how to interact with them, please refer to the backend repository's API documentation.
Authentication:
POST /api/login/
ā User loginPOST /api/signup/
ā User registrationPOST /api/login/refresh/
ā Refresh access tokenCourse Management:
GET /api/courses/all-courses/
ā Fetch all available coursesGET /api/courses/course-list/
ā Fetch all enrolled coursesGET /api/courses/course-details/{courseId}/
ā Fetch a specific course details by courseId
POST /api/courses/enroll/
ā Enroll in a coursePOST /api/courses/enrollment/update/
ā Update enrollment statusPOST /api/courses/course/{courseId}/last-watched/update/
ā Update last watched video for a courseGET /api/courses/course/{courseId}/last-watched/
ā Get last watched video for a courseCourse Content & Video Management:
GET /api/courses/course-videos/{courseId}/
ā Fetch all videos for a courseGET /api/courses/videos/{videoId}/
ā Fetch details of a specific video by videoId
POST /api/courses/videos/upload/
ā Upload a video to the courseUser Profile:
GET /api/authentication/user/profile/
ā Get user profile informationPOST /api/authentication/user/status-update/
ā Update user statusGET /api/authentication/user/check-online/
ā Check if user is onlineBefore deploying the frontend, ensure the backend (Django) is deployed. Follow the instructions in the Django Backend Repository for backend deployment.
Once the backend is deployed, retrieve the API URL. This will be used to configure the frontend.
.env
FileIn the .env
file of the React frontend project, update the VITE_API_URL
with the production URL of the deployed backend:
VITE_API_URL=<Your_Backend_Production_URL>/api/
Follow the steps below to deploy the frontend on Vercel:
āļø Sign Up or Log In to Vercel:
Visit Vercel and set up your account.
āļø Add the vercel.json
File:
Create a vercel.json
file in the root directory with the following content:
{
"rewrites": [{ "source": "/(.*)", "destination": "/" }]
}
š Import the Repository:
Link your GitHub repository to Vercel.
ā¬ļø Deploy:
Vercel will automatically build and deploy your project. Once deployed, you will receive a production URL.
Ensure that the backend API is running and accessible via its production URL. Update the VITE_API_URL
in the .env
file accordingly.
For more information on deployment, refer to the Vercel Documentation.
If you appreciate this project and would like to support its continued development, you can donate via the button below:
Your support helps keep the project alive and improves future updates! Thank you for your generosity! š
This project is licensed under the MIT License.
Srikanth Kanniyappan šØāš»