What This Repository Is
A complete, structured, beginner-friendly Node.js learning path.
30 sessions.
Each session has
Clear learning objectives
Step-by-step explanations
Working code examples
Practice exercises
Interview questions
Summary of key points
Enter fullscreen mode Exit fullscreen mode
No fluff. No assumptions. Just code.
The Complete Curriculum
Phase 1 – Node.js Fundamentals (Sessions 1-5)
Session Topic What You Will Build 01 Introduction to Node.js Your first Node.js program 02 Project Setup and npm package.json, node_modules 03 How Node.js Works Event loop, blocking vs non-blocking 04 Modules and Imports Your first custom module 05 File System Module Read, write, update, delete filesSample code from Session 05
const fs = require("fs");
// Create a file
fs.writeFileSync("student.txt", "Welcome To Node.js");
// Read the file
const data = fs.readFileSync("student.txt", "utf8");
console.log(data); // Welcome To Node.js
// Append to file
fs.appendFileSync("student.txt", "nNew line added");
// Delete file
fs.unlinkSync("student.txt");
Enter fullscreen mode Exit fullscreen mode
Phase 2 – Core Modules (Sessions 6-10)
Session Topic What You Will Build 06 Path Module Cross-platform file paths 07 OS Module System information 08 Events and EventEmitter Custom event handling 09 HTTP Module Create a server 10 Multi-Route Server Multiple routes, JSON responsesSample code from Session 10
const http = require("http");
const server = http.createServer((req, res) => {
if (req.url === "/") {
res.end("Home Page");
} else if (req.url === "/about") {
res.end("About Page");
} else if (req.url === "/products") {
res.setHeader("Content-Type", "application/json");
res.end(JSON.stringify([{ id: 1, name: "Laptop" }]));
} else {
res.statusCode = 404;
res.end("Page Not Found");
}
});
server.listen(3000);
Enter fullscreen mode Exit fullscreen mode
Phase 3 – Building REST APIs (Sessions 11-15)
Session Topic What You Will Build 11 CRUD with Dummy Data Complete REST API using array 12 Introduction to Express First Express server 13 Express Routing Route params, query params 14 Middleware Custom middleware, logging, auth 15 REST APIs with Express Professional API structureSample code from Session 15
const express = require("express");
const app = express();
let students = [
{ id: 1, name: "John", age: 20 },
{ id: 2, name: "Jane", age: 22 }
];
// GET all students
app.get("/students", (req, res) => {
res.json({ success: true, data: students });
});
// GET single student
app.get("/students/:id", (req, res) => {
const student = students.find(s => s.id === parseInt(req.params.id));
if (!student) {
return res.status(404).json({ success: false, message: "Not found" });
}
res.json({ success: true, data: student });
});
// POST create student
app.post("/students", (req, res) => {
const newStudent = { id: students.length + 1, ...req.body };
students.push(newStudent);
res.status(201).json({ success: true, data: newStudent });
});
app.listen(3000);
Enter fullscreen mode Exit fullscreen mode
Phase 4 – Databases (Sessions 16-20)
Session Topic What You Will Build 16 Environment Variables .env, dotenv, configuration 17 MongoDB Introduction MongoDB Atlas setup 18 MongoDB CRUD Native MongoDB driver 19 Mongoose Schemas, models, validation 20 Express + MongoDB API Complete database-backed APISample code from Session 20
const mongoose = require("mongoose");
const studentSchema = new mongoose.Schema({
name: { type: String, required: true },
email: { type: String, required: true, unique: true },
age: { type: Number, min: 18, max: 60 },
course: { type: String }
}, { timestamps: true });
const Student = mongoose.model("Student", studentSchema);
// API endpoint
app.post("/students", async (req, res) => {
try {
const student = await Student.create(req.body);
res.status(201).json({ success: true, data: student });
} catch (error) {
res.status(400).json({ success: false, message: error.message });
}
});
Enter fullscreen mode Exit fullscreen mode
Phase 5 – Professional Features (Sessions 21-25)
Session Topic What You Will Build 21 MVC Architecture Models, Views, Controllers separation 22 JWT Authentication Register, login, protected routes 23 bcrypt Password Hashing Secure password storage 24 Error Handling Centralized error handling 25 File Uploads Multer, profile picturesSample code from Session 22
const jwt = require("jsonwebtoken");
const bcrypt = require("bcryptjs");
// Register
app.post("/register", async (req, res) => {
const { name, email, password } = req.body;
const hashedPassword = await bcrypt.hash(password, 10);
const user = await User.create({
name,
email,
password: hashedPassword
});
const token = jwt.sign({ id: user._id }, process.env.JWT_SECRET);
res.json({ success: true, token });
});
// Protected route middleware
const protect = async (req, res, next) => {
const token = req.headers.authorization?.split(" ")[1];
if (!token) {
return res.status(401).json({ message: "Not authorized" });
}
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET);
req.user = await User.findById(decoded.id);
next();
} catch (error) {
res.status(401).json({ message: "Invalid token" });
}
};
// Protected route
app.get("/profile", protect, (req, res) => {
res.json({ user: req.user });
});
Enter fullscreen mode Exit fullscreen mode
Phase 6 – Production Readiness (Sessions 26-30)
Session Topic What You Will Build 26 Logging Morgan, Winston, log files 27 API Documentation Swagger, OpenAPI 28 Testing Jest, Supertest 29 Project Structure Professional folder organization 30 Mini Project Complete Task Management APIThe Final Project – Task Management API
Session 30 is a complete, production-ready API
Features
User registration and login (JWT)
Create, read, update, delete tasks
Filter tasks by status (pending/completed)
Pagination for task list
Profile picture upload (Multer)
Password reset via email
Task statistics dashboard
Complete error handling
Unit and integration tests
Environment configuration
Professional folder structure
Enter fullscreen mode Exit fullscreen mode
Project Structure
task-management-api/
│
├── src/
│ ├── config/ # Database configuration
│ ├── constants/ # Status codes, error messages
│ ├── controllers/ # Business logic
│ ├── middleware/ # Auth, validation, error handling
│ ├── models/ # User, Task schemas
│ ├── routes/ # API endpoints
│ ├── services/ # Email service
│ ├── utils/ # Helpers, response formatter
│ └── app.js # Express configuration
│
├── tests/ # Unit and integration tests
├── uploads/ # Profile pictures
├── logs/ # Application logs
├── .env # Environment variables
├── server.js # Entry point
└── package.json
Enter fullscreen mode Exit fullscreen mode
API Endpoints You Will Build
Authentication
POST /api/auth/register - Create account
POST /api/auth/login - Login
GET /api/auth/me - Get profile
PUT /api/auth/profile - Update profile
POST /api/auth/forgot-password - Reset password
Tasks
GET /api/tasks - List tasks (with filters)
POST /api/tasks - Create task
GET /api/tasks/stats - Task statistics
GET /api/tasks/:id - Get single task
PUT /api/tasks/:id - Update task
PATCH /api/tasks/:id/status - Update status
DELETE /api/tasks/:id - Delete task
Users
POST /api/users/upload-profile - Upload picture
DELETE /api/users/account - Delete account
Enter fullscreen mode Exit fullscreen mode
Repository Statistics
30 session folders
30 detailed README files
100+ code examples
50+ practice exercises
100+ interview questions
1 complete mini project
Enter fullscreen mode Exit fullscreen mode
Sample Practice Exercises
From Session 11 (CRUD Operations)
Exercise 1 - Create a Products API with name, price, category
Exercise 2 - Add validation to POST request
Exercise 3 - Add search feature GET /students?search=John
Exercise 4 - Prevent duplicate emails
Enter fullscreen mode Exit fullscreen mode
From Session 22 (Authentication)
Exercise 1 - Add password reset feature
Exercise 2 - Add logout with token blacklist
Exercise 3 - Add refresh token functionality
Exercise 4 - Add rate limiting to login route
Enter fullscreen mode Exit fullscreen mode
From Session 30 (Mini Project)
Exercise 1 - Add categories to tasks
Exercise 2 - Send email reminders before due date
Exercise 3 - Allow task sharing between users
Exercise 4 - Add comments on tasks
Exercise 5 - Deploy to production
Enter fullscreen mode Exit fullscreen mode
Sample Interview Questions Covered
Each session includes 5-10 interview questions with answers
From Session 03 (How Node.js Works)
- Is Node.js single threaded?
- What is the event loop?
- What is blocking vs non-blocking code?
From Session 22 (JWT Authentication)
- What is JWT and how does it work?
- What are the three parts of a JWT?
- Difference between authentication and authorization?
From Session 24 (Error Handling)
- What is the difference between operational and programming errors?
- How do you handle async errors in Express?
- What is unhandledRejection?
What Students Will Be Able to Do After Completing
Build REST APIs from scratch
Implement JWT authentication
Work with MongoDB and Mongoose
Handle file uploads
Write tests for APIs
Document APIs with Swagger
Structure professional projects
Debug and fix errors
Deploy applications
Answer Node.js interview questions
Enter fullscreen mode Exit fullscreen mode
Time Commitment
Background Time Needed Complete beginner (learning JavaScript along the way) 6-8 weeks Knows JavaScript basics 4-6 weeks Some backend experience 2-3 weeks One session per day 30 daysRequirements Before Starting
Basic JavaScript (variables, functions, arrays, objects)
Computer with Node.js installed
Code editor (VS Code recommended)
Internet connection
Enter fullscreen mode Exit fullscreen mode
No prior backend experience needed
How to Use This Repository
Step 1 – Star and clone
git clone https://github.com/mohin-sheikh/nodejs-learning-path
cd nodejs-learning-path
Enter fullscreen mode Exit fullscreen mode
Step 2 – Start with Session 01
cd 01-introduction-to-nodejs
Enter fullscreen mode Exit fullscreen mode
Step 3 – Read the README.md
Open in your code editor or browser
Step 4 – Code along
Type every example yourself
Step 5 – Do the exercises
Don’t skip them
Step 6 – Move to next session
Only after completing the exercises
Folder Structure Explained
nodejs-learning-path/
│
├── 01-introduction-to-nodejs/
│ └── README.md # Complete session content
│
├── 02-project-setup-and-npm/
│ └── README.md
│
... (sessions 03-29)
│
├── 30-mini-project/
│ └── README.md # Complete project code
│
└── README.md # Main overview (this document)
Enter fullscreen mode Exit fullscreen mode
Each README.md contains everything for that session
No need to search multiple files
Why This Works
Structured progression
Each session builds on the previous one
Hands-on learning
You write code from session 1
Real projects
Not isolated examples
Complete context
Why, what, and how for each concept
Practice reinforced
Exercises after every session
Success Path
Week 1-2 - Sessions 01-10 (Node.js Basics + Core Modules)
Week 3-4 - Sessions 11-15 (Express + REST APIs)
Week 5-6 - Sessions 16-20 (MongoDB + Database)
Week 7-8 - Sessions 21-25 (Authentication + Advanced)
Week 9-10 - Sessions 26-30 (Production + Mini Project)
Enter fullscreen mode Exit fullscreen mode
Links
GitHub Repository – https://github.com/mohin-sheikh/nodejs-learning-path
Star to save and support
Fork to track your progress
Issues for questions or problems
Share With Others
If this helps you, share it with
Friends learning backend development
Your coding bootcamp group
Twitter/X developer community
LinkedIn network
Discord/Telegram coding groups
Enter fullscreen mode Exit fullscreen mode
What Developers Are Saying
“Finally a structured course that doesn’t jump around. Each session clearly connects to the next.” – Backend Beginner
“The mini project at the end helped me understand how everything fits together. Worth going through all 30 sessions.” – Bootcamp Graduate
“Clear explanations, working code, no fluff. Exactly what I needed.” – Self-taught Developer
“The interview questions at the end of each session helped me prepare for my first Node.js interview.” – Junior Developer
FAQ
Is this really free?
Yes. Completely free. No email signup. No payment.
Do I need to watch videos?
No. Everything is written documentation. Learn at your own pace.
Can I skip sessions?
Not recommended. Each session builds on previous ones.
What if I get stuck?
Review the session again. Search error messages. Open an issue on GitHub.
Can I use this to prepare for interviews?
Yes. Each session has interview questions. Session 30 is a complete project to showcase.
Is MongoDB required?
Yes. Sessions 16-20 cover MongoDB. Free MongoDB Atlas account works.
How long will this take?
30 days at one session per day. Or spread out over 2-3 months.
Author: Mohin Sheikh
Follow me on GitHub for more insights and projects!
답글 남기기