This project is a Course Management Application that allows users to browse and enroll through various courses. The application provides a smooth and interactive user experience, leveraging modern technologies such as React and Next UI for the frontend, and Node.js and PostgreSQL for the backend and database.
- To access the live project, Go here
- User Authentication: Users can register and log in to the application.
- Course Browsing: Users can browse available courses without logging in.
- Search Functionality: Users can search from a list of courses and the results get updated in real time.
- Course Enrollment: Users need to enroll in a course to access its video content and lessons.
- Frontend: React, Next UI
- Backend: Node.js, Express
- Database: PostgreSQL
- Image and Video CDN: Cloudinary
-
Clone the repository:
git clone https://github.com/your-username/course-management-app.git cd course-management-app
-
Install backend dependencies:
cd backend npm install
-
Install frontend dependencies:
cd ../frontend npm install
-
Set up the PostgreSQL database:
- Create a database named
course_management
. - Run the SQL scripts located in the
backend/db
folder to set up the tables.
- Create a database named
-
Configure environment variables:
- Create a
.env
file in thebackend
directory and add the following:
PORT=5000 DATABASE_URL=your_database_url JWT_SECRET=your_jwt_secret
- Create a
-
Start the backend server:
cd backend npm start
-
Start the frontend development server:
cd ../frontend npm start
- Register/Login: Users can register a new account or log in using existing credentials.
- Browse Courses: Users can browse available courses without needing to log in or enroll.
- Search Courses: Users can search from the list of courses to get a specific course.
- Enroll in Courses: Users can enroll in courses to access the detailed lessons and video content.
-
Authentication
POST /api/auth/register
: Register a new userPOST /api/auth/login
: Login with user credentials
-
Courses
GET /api/courses
: Get all coursesGET /api/courses/:id
: Get course details by IDGET /api/courses/search?term=keyword
: Search courses by keyword
-
Enrollments
GET /api/enrollments/status/:userId/:courseId
: Check enrollment statusPOST /api/enrollments
: Enroll in a course
Column | Type | Description |
---|---|---|
id | SERIAL | Primary Key |
username | VARCHAR | Unique Username |
password | VARCHAR | Hashed Password |
VARCHAR | User Email Address |
Column | Type | Description |
---|---|---|
id | SERIAL | Primary Key |
title | VARCHAR | Course Title |
summary | TEXT | Course Summary |
cover | TEXT | Cover Image URL |
tags | TEXT[] | Course Tags |
Column | Type | Description |
---|---|---|
id | SERIAL | Primary Key |
course_id | INT | Foreign Key (Courses) |
title | VARCHAR | Lesson Title |
video_id | VARCHAR | Video ID |
text_content | TEXT | Lesson Content |
Column | Type | Description |
---|---|---|
id | SERIAL | Primary Key |
user_id | INT | Foreign Key (Users) |
course_id | INT | Foreign Key (Courses) |
This project is licensed under the MIT License. See the LICENSE file for details.