Skip to content

About

Architected a scalable RESTful API using Node.js and Express.js, implementing a multi-role user system (Admin/User) with secure registration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

A scalable and secure RESTful backend service for an EdTech platform, built using Node.js, Express, and MongoDB. This API is responsible for authentication, course management, file handling, and system-level integrations, and is designed to be consumed by any frontend or client application.

Project Objectives

Provide a robust backend foundation for an online education platform

Implement secure authentication and authorization

Enable structured course and user management

Design the system to be easily extensible for future business features such as subscriptions, payments, and notifications

Core Features

Authentication & Authorization

User registration and login

JWT-based secure authentication

Password hashing using bcrypt

Cookie-based session handling

User Management

Role-based access control (Admin / User)

Secure profile handling

Course Management

Create, update, delete, and fetch courses

MongoDB schema-based data validation

File Upload & Storage

File handling using Multer

Cloud storage integration with Cloudinary

Email Integration

Email services using Nodemailer

Designed for verification, alerts, and system notifications

API Health & Monitoring

Health-check endpoint for service validation

Tech Stack

Backend Framework: Express.js (Node.js)

Database: MongoDB with Mongoose ODM

Authentication: JSON Web Tokens (JWT)

Security: bcryptjs, HTTP-only cookies

File Uploads: Multer + Cloudinary

Email Service: Nodemailer

Environment Management: dotenv

Development Tooling: Nodemon

Project Structure

edtech-project-backend/ │ ├── app.js # Express application configuration ├── server.js # Application entry point ├── package.json ├── .env # Environment variables │ ├── config/ # Database and third-party configs │ └── user.db.js │ ├── router/ # API route definitions │ ├── user.route.js │ └── course.router.js │ ├── controllers/ # Business logic ├── models/ # Mongoose schemas ├── middleware/ # Authentication & utilities └── utils/ # Helper functions

Environment Variables

Create a .env file in the root directory:

PORT=5000 MONGO_URL=mongodb://127.0.0.1:27017/edtech SECRET=your_jwt_secret

CLOUD_NAME=your_cloudinary_name CLOUD_API=your_cloudinary_api_key CLOUD_SECRET=your_cloudinary_api_secret

Getting Started

Install Dependencies npm install

Run the Server npm run start

Server will run at:

http://localhost:5000

API Health Check

GET /ping

Response:

pONg

Authentication Flow (Overview)

User registers → password hashed and stored securely

User logs in → JWT issued

JWT stored in HTTP-only cookie

Protected routes validate JWT via middleware

Architectural Highlights

Modular, layered backend design

Clear separation of routes, controllers, and models

Stateless authentication using JWT

Third-party services abstracted via configuration layers

Designed for horizontal scaling and future microservices adoption

Future Enhancements / To Be Developed

The following features are planned to evolve this backend into a full-scale production system:

Advanced Email System

Replace basic Nodemailer setup with:

Email templates (HTML-based)

Queue-based email delivery (e.g., background jobs)

Retry and failure handling

Transactional email support (welcome, invoices, reminders)

Payment & Subscription Module

Integration with payment gateways (e.g., Stripe / Razorpay)

Subscription plans (Monthly / Yearly)

Course-level and platform-level subscriptions

Secure webhook handling for payment status updates

Invoice and transaction history storage

Admin & Analytics APIs

Admin-only dashboard endpoints

User engagement analytics

Course performance metrics

Revenue tracking APIs

Security Enhancements

Refresh token implementation

Rate limiting and brute-force protection

Role-based permission matrix

Audit logs for sensitive operations

Testing & Quality

Unit tests for controllers and services

Integration tests for APIs

API documentation using OpenAPI / Swagger

System Improvements

Centralized error handling and logging

API versioning

Caching layer (Redis)

Background job processing (emails, reports)

Deployment-ready configuration (Docker, CI/CD)

Intended Use Case

This backend is designed to:

Serve as the core API for an EdTech product

Support web and mobile clients

Scale with business and user growth

Act as a strong backend portfolio project

👤 Author

Amit Backend Developer — Node.js | Express | MongoDB

FOR PERSONAL USE ONLY:

use CRON-JOB for preventing sleep of server

FRONTEND GITHUB REPO LINK

https://github.com/Amit14s/Edtech-LMS

API DOCMENTATION

https://github.com/Amit14s/EdTech-Platform-Backend-API/blob/main/API%20COLLECTION.JSON

LEARNING MANAGMENT SYSTEM LIVE LINK

https://edtech-lms-jet.vercel.app/

About

Architected a scalable RESTful API using Node.js and Express.js, implementing a multi-role user system (Admin/User) with secure registration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages