MentorGrid.live is a backend API built with Node.js and Express, providing user authentication, course management, and enrollment functionality.
This project is designed for bootcamp-style applications where admins or publisher can publish courses and users can register, login, and enroll in thouse coures
Visit: https://mentorgrid.live
-
User Authentication
- Register and login with JWT-based authentication
- Secure password hashing with bcrypt
-
Role-based Access
- Admins can publish and manage courses
- Users can browse and enroll in courses
-
Course Management
- Create, update, and delete courses (Admin/Publisher only)
- View available courses
-
Bootcamp Management
- Create, update, and delete Bootcamps (Admin/Publisher only)
- View available courses
-
Enrollments
- Users can enroll in courses
- Track user enrollments
-
Database
- MongoDB used for data storage
- Mongoose ODM for schema modeling
- Runtime: Node.js
- Framework: Express.js
- Database: MongoDB
- ODM: Mongoose
- Authentication: JWT (JSON Web Tokens), bcrypt
- Email Service: AWS SES for sending emails
- Swagger: API documentation with Swagger UI
mentorgrid.live/
├── .env # Environment variables (encrypted)
├── .env.keys # Not provided this holds the encryption key sha256
├── _data/ # Initial data files
├── config/ # Environment variables
├── controllers/ # Controller function to handle the route request
├── doc/ # Contains all the doc for the API
├── handlers/ # helper function to do the same handler function task
├── middleware/ # Middleware function to handle the route request
├── models/ # Mongoose schemas
├── public/ # Static files (index.html)
├── routes/ # Express routes
├── swagger.js # Swagger configuration
├── seeds/ # Initial data seeding
├── tests/ # Unit tests
├── .gitignore # Files to ignore during commit
├── package-lock.json
├── package.json
├── LICENSE # License file
├── server.js # Entry point
└── README.md
-
Clone the repository
git clone https://github.com/yourusername/mentorgrid.io.git cd mentorgrid.live -
Install dependencies
bun install
OR
npm install
OR
pnpm install
-
Set up environment variables
Create a.envfile in the root directory:all values are encrypted using dotenvx and you have to use your own values in the place of that
-
Run the server
bun start
The server will run on
http://localhost:4033.
POST /api/v1/auth/register– Register a new userPOST /api/v1/auth/login– Login and receive a JWTGET /api/v1/auth/me– Get Login user by TokenPOST /api/v1/auth/forgetpassword– Forgotten PasswordPOST /api/v1/auth/resetpassword/:token– Reset PasswordPUT /api/v1/auth/updatedetails– Update User Details (name and email only)GET /api/v1/auth/logout– Logout the current login user
GET /api/v1/users– Get logged-in user detailsGET /api/v1/users/:useId– Get user details by IDPOST /api/v1/users– Create a UserPUT /api/v1/users/:useId– Update user details by IDDELETE /api/v1/users/:useId– Delete user by ID
GET /api/v1/bootcamps- Public Get all bootcampsGET /api/v1/bootcamps/:id- Public Get a single bootcamp by IDPOST /api/v1/bootcamps- Private Create a new bootcampPUT /api/v1/bootcamps/:id- Private Update an existing bootcamp by IDDELETE /api/v1/bootcamps/:id- Private Delete a bootcamp by IDPUT /api/v1/bootcamps/:id/photos- Private Upload Photos for the Bootcamp
POST /api/v1/reviews– Create a new review (owner of the review only)GET /api/v1/reviews– Get all reviewsPUT /api/v1/reviews/:id– Update a review (owner of the review only)GET /api/v1/reviews/:id– Get a single review by ID (owner of the review only)DELETE /api/v1/reviews/:id– Delete a review by ID (owner of the review only)
POST /api/v1/courses– Create a new course (Admin/Publisher only)GET /api/v1/courses– Get all coursesGET /api/v1/courses/:id– Get a Single course detailsGET /api/v1/bootcamps/:id/courses– Get all courses in a BootcampPUT /api/v1/courses/:id– Update a course (Admin/Publisher only)DELETE /api/v1/courses/:id– Delete a course (Admin/Publisher only)
npm run start– Start servernpm run dev– Start server with nodemon (for development)
- Deploy to Render MCP Server
- Deploy to Heroku
- Add payment gateway integration for course enrollment
- Add progress tracking for users
- Add reviews and ratings for courses
- Add email notifications
This project is licensed under the MIT License.