Elearning-React Tailwind Templates

Elearning React

A responsive e-learning application built with React and Tailwind CSS. Features include user authentication, course management, and video content delivery.

Elearning Logo

Elearning-React šŸŽ“

Welcome to the Elearning platform! Enroll in courses, access content, and start your learning journey! šŸ“š

šŸš€ Live Demo

GitHub License GitHub Repo stars GitHub commit activity Documentation Badge

šŸ“‘ Table of Contents

šŸŽÆ Features

  • šŸ”‘ Multi-User Login & Signup: Three types of logins and signups are available - Student, Teacher, and Admin. Each role has specific permissions and access.
  • šŸ”“ Flexible Login Options: Users can log in using either their username or email.
  • šŸ”’ JWT Token Authentication: Secure login and access with JWT token authentication.
  • šŸ“š Course Enrollment: Students can enroll in courses and access course content.
  • šŸŽ„ Course Content: Access materials like videos, articles, and other resources after enrollment.
  • āÆļø Last Watched Video: The platform saves the last watched video, allowing students to resume where they left off.
  • āš™ļø Admin and Teacher Features (Under Development): Admins and teachers will soon have features to manage students, courses, and other administrative tasks.
  • šŸ“± Responsive Design: The platform is responsive and optimized for both desktop and mobile devices.
  • šŸ–„ļø User-Friendly Interface: Simple and easy-to-use interface designed for an intuitive learning experience.

šŸ“ø Screenshots

šŸ’» Desktop

Desktop-1
Landing Page
Desktop-2
Login Page
Desktop-3
Course View
Desktop-4
Course Content

šŸ“± Mobile

Mobile-1
Landing Page
Mobile-2
Login Page
Mobile-3
Course View
Mobile-4
Course Content

šŸ”§ Tech Stack

šŸ“‹ Prerequisites

To run this project locally, ensure you have the following software, tools, and configurations installed:

1. 🟢 Node.js

  • šŸš€ Required for running the frontend development server and handling dependencies.
  • šŸ“„ Download from Node.js Official Website.

2. šŸ“¦ npm (Node Package Manager)

  • šŸ› ļø Used to manage project dependencies.
  • āœ… Check if npm is installed by running npm -v in your terminal.

3. 🌿 Git

  • 🌐 Version control system required to clone the repository.
  • šŸ“„ Download from Git Official Website.

4. šŸ–‹ļø Code Editor

  • šŸ’” Recommended: VS Code for JavaScript, React, and CSS support.

5. 🌐 Browser

  • šŸ” Google Chrome, Firefox, or any modern browser for running the web app.
  • šŸ“¤ Ensure your browser is up-to-date for the best performance.

6. 🧰 Additional Tools

  • šŸ› ļø Postman (for testing API endpoints, if necessary).

These tools are šŸ”‘ essential for setting up and running the frontend of the Elearning-React project locally.

šŸš€ Getting Started

To get this project up and running on your local machine, follow the instructions below:

šŸ“„ Installation

  1. Clone the Frontend Repository
    Clone the repository to your local machine using Git:

    git clone https://github.com/srikanthkanniyappan/Elearning-React.git
    
  2. Navigate to the Project Directory
    Move into the project directory:

    cd Elearning-React
    
  3. Install Dependencies
    Use npm to install the required dependencies:

    npm install
    

šŸ” Environment Configuration

You need to configure the environment variables for the project to work correctly.

  1. 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. 🌐

  2. 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. šŸš€

šŸ Usage

After completing the installation and environment configuration, follow these steps to run and use the application:

1. šŸŽ¬ Start the Development Server

Run the following command to start the application in development mode:

npm run dev
  • The app will be available at: http://localhost:5173/ 🌐

2. 🌟 Explore the Features

  1. šŸ“ Sign Up: Create an account as a Student, Teacher, or Admin.
  2. šŸ”‘ Login: Login using your username or email.
  3. šŸ“š Enroll in Courses: Browse available courses and enroll in the ones that interest you.
  4. šŸŽ„ View Content: Access videos and materials for your enrolled courses.

3. āÆļø Resume Learning

The app saves your last watched video so you can pick up right where you left off!

4. šŸ› ļø Admin & Teacher Tools (Under Development)

  • Admins and Teachers will soon have tools to manage users, courses, and content.

5. 🌐 Deployment

The app is already deployed on Vercel. Check out the live demo:
Live Demo šŸš€

šŸ“ Folder Structure

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

šŸ“š API Documentation

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.

šŸ”— Backend Repository:

Elearning-Django

šŸ“œ Key API Endpoints:

  • Authentication:

    • POST /api/login/ – User login
    • POST /api/signup/ – User registration
    • POST /api/login/refresh/ – Refresh access token
  • Course Management:

    • GET /api/courses/all-courses/ – Fetch all available courses
    • GET /api/courses/course-list/ – Fetch all enrolled courses
    • GET /api/courses/course-details/{courseId}/ – Fetch a specific course details by courseId
    • POST /api/courses/enroll/ – Enroll in a course
    • POST /api/courses/enrollment/update/ – Update enrollment status
    • POST /api/courses/course/{courseId}/last-watched/update/ – Update last watched video for a course
    • GET /api/courses/course/{courseId}/last-watched/ – Get last watched video for a course
  • Course Content & Video Management:

    • GET /api/courses/course-videos/{courseId}/ – Fetch all videos for a course
    • GET /api/courses/videos/{videoId}/ – Fetch details of a specific video by videoId
    • POST /api/courses/videos/upload/ – Upload a video to the course
  • User Profile:

    • GET /api/authentication/user/profile/ – Get user profile information
    • POST /api/authentication/user/status-update/ – Update user status
    • GET /api/authentication/user/check-online/ – Check if user is online

šŸŒ Deployment

1. šŸš€ Deploy Backend First

Before deploying the frontend, ensure the backend (Django) is deployed. Follow the instructions in the Django Backend Repository for backend deployment.

2. šŸ”— Get the Backend API URL

Once the backend is deployed, retrieve the API URL. This will be used to configure the frontend.

3. šŸ“ Update the .env File

In 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/

4. 🌐 Deploy the Frontend to Vercel

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.

5. šŸ”Œ Backend API Integration

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.

šŸ’– Donate

If you appreciate this project and would like to support its continued development, you can donate via the button below:

Buy Me A Coffee

Your support helps keep the project alive and improves future updates! Thank you for your generosity! šŸ™

šŸ“œ License

This project is licensed under the MIT License.

šŸ“ Author

Srikanth Kanniyappan šŸ‘Øā€šŸ’»

Top categories

Loading Svelte Themes