Skip to content

LearnHub is a comprehensive online learning platform designed to enhance user engagement and motivation. Built using a modern tech stack that includes TypeScript, Node.js, Express, React, and PostgreSQL, LearnHub offers a seamless and interactive learning experience.

Notifications You must be signed in to change notification settings

chrispsang/LearnHub

Repository files navigation

LearnHub

LearnHub is a comprehensive online learning platform designed to enhance user engagement and motivation. Users have acccess to courses, take quizzes, track their progress, participate in discussion forums, and leave reviews and ratings. The platform is built using TypeScript, Node.js, Express, React, and PostgreSQL.

Table of Contents

Features

  • User Authentication: Secure authentication system for user registration, login, and logout to protect user data and ensure privacy.
  • Courses and Quizzes: Users have access to a variety of courses, each with interactive quizzes that can be attempted multiple times to improve learning outcomes.
  • Progress Tracking: Display quiz progress, including scores and completion status, to help users monitor their learning journey.
  • Leaderboards: Boost motivation with leaderboards that display top performers, encouraging a competitive yet fun learning environment.
  • Discussion Forums: Engage with other learners through topic-based discussion forums to ask questions, share knowledge, and collaborate.
  • Reviews and Ratings: Provide valuable feedback by leaving reviews and ratings for courses, helping other users make informed decisions.

Tech Stack

React

TypeScript

Node.js

Express

Sequelize

PostgreSQL

Installation

Prerequisites

Setup

  1. Clone the repository:

    git clone https://github.com/chrispsang/LearnHub.git
    cd LearnHub
  2. Install backend dependencies:

    npm install
  3. Install frontend dependencies:

    cd online-learning-platform-frontend
    npm install
    cd ..

Database Setup

  1. Start the PostgreSQL service:

    • Linux:
      sudo service postgresql start
    • macOS with Homebrew:
      brew services start postgresql
    • Windows:
      net start postgresql
  2. Access the PostgreSQL command line:

    • Linux:
      sudo -u postgres psql
    • macOS with Homebrew:
      psql postgres
    • Windows:
      psql -U postgres
  3. Create a superuser in PostgreSQL:

    CREATE USER myuser WITH SUPERUSER PASSWORD 'mypassword';
  4. Create the database:

    psql -U myuser -d postgres -c "CREATE DATABASE online_learning_platform OWNER myuser;"
  5. Grant all privileges to the user:

    psql -U myuser -d postgres -c "GRANT ALL PRIVILEGES ON DATABASE online_learning_platform TO myuser;"
  6. Verify the creation:

    psql -U myuser -l

Running Migrations and Seeders

  1. Run the Sequelize migrations to set up the database schema:

    npx sequelize-cli db:migrate
  2. Seed the database with initial data:

    npx sequelize-cli db:seed:all

Starting the Development Servers

  1. Start the backend server (runs on http://localhost:5001):

    npm start
  2. Start the frontend development server (runs on http://localhost:3000):

    cd online-learning-platform-frontend
    npm start

About

LearnHub is a comprehensive online learning platform designed to enhance user engagement and motivation. Built using a modern tech stack that includes TypeScript, Node.js, Express, React, and PostgreSQL, LearnHub offers a seamless and interactive learning experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published