Edify is a full-stack online learning platform where users can register as Students or Instructors. Instructors can create and manage online courses, while students can browse and enroll in courses. This repository contains the backend implementation of Edify, built with Node.js and Express.js.
- User authentication (Login/Signup) with JWT (JSON Web Token)
- Role-based access control (Student & Instructor)
- Instructors can:
- Create and manage courses
- Add course content (YouTube video links & rich text explanations)
- Edit and delete their courses
- Students can:
- Browse and filter courses by category
- Enroll in courses
- Track session progress
- Node.js - Backend JavaScript runtime environment
- Express.js - Web framework for Node.js
- MongoDB (or MySQL) - Database for storing user and course data
- JWT (JSON Web Token) - For secure user authentication
- Bcrypt - For password hashing
- Mongoose (for MongoDB) - Object data modeling (ODM)
- CORS - For handling cross-origin requests
- dotenv - For managing environment variables
-
Clone the repository:
git clone https://github.com/your-username/Edify-backend.git cd Edify-backend -
Install the dependencies:
npm install
-
Create a
.envfile in the root directory and add the necessary environment variables:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret
-
Run the server:
npm start
Or, for development (with hot-reloading):
npm run dev
The backend server will now be running at
http://localhost:5000.
- POST /api/auth/signup - Register a new user (Student/Instructor)
- POST /api/auth/login - User login
- GET /api/courses - Get all courses
- POST /api/courses - Create a new course (Instructor only)
- GET /api/courses/:id - Get a specific course details
- PUT /api/courses/:id - Update a course (Instructor only)
- DELETE /api/courses/:id - Delete a course (Instructor only)
- Fork this repository.
- Create a new branch (
git checkout -b feature-name). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-name). - Open a pull request.