An advanced, zero‑dependency guide to Node.js internals and practical server building using only core Node.js primitives. This repository is both a learning course and a collection of runnable reference implementations that demonstrate how real systems are built without external frameworks.
Key goals:
- Teach how Node.js works under the hood
- Provide runnable examples that scale from tiny scripts to production concepts
- Emphasize security, performance, and reliable architecture
- Project: What this repo is and who it's for
- Features: Highlights and what you'll learn
- Quickstart: Install, build, and run examples
- Repository layout: High-level overview of folders and key files
- Guides & Topics: Major learning areas included in the course
- Development: Local development workflow and scripts
- Contributing: How to contribute, improve content, and submit issues
- License & Authorn+
This project is aimed at intermediate JavaScript developers who want to:
- Move beyond framework abstractions and understand Node.js internals
- Build fast, minimal servers and tooling using only Node's core modules
- Learn practical patterns for security, testing, performance, and deployment
If you enjoy understanding what happens beneath the layers of convenience, this repo is for you.
- Core modules deep dives:
http,fs,stream,events,child_process,os,pathand more - Asynchronous patterns: callbacks, Promises, async/await, and backpressure handling
- Building servers: raw HTTP servers, routing, middleware concepts implemented from scratch
- Performance & scaling: clustering, worker threads, memory profiling, caching strategies
- Security essentials: input validation, headers, rate limiting without external middleware
- DevOps topics: Docker, CI/CD basics, process managers (PM2) and deployment notes
Prerequisites: Node.js and npm or pnpm.
- Clone the repository:
git clone https://github.com/md-abu-kayser/raw-nodejs-notepad.git
cd raw-nodejs-notepad- Install dev dependencies (this project uses TypeScript for examples):
npm install- Run a development example directly with TypeScript (no build step):
npm run dev- Build for production and run the compiled output:
npm run build
npm startNote: npm run dev executes ts-node src/app.ts; build runs tsc and start runs node dist/app.js.
Top-level layout highlights:
- 01-introduction/ — Fundamentals and orientation
- 02-core-modules/ — Per-module deep dives (
http.md,fs.md, etc.) - 03-async-patterns/ — Callbacks, Promises, async/await explanations
- 04-building-server/ — Middleware concept, routing, raw HTTP server examples
- 05-streams-and-buffers/ — Streams, piping, transform streams
- 06-child-process-and-workers/ —
child_process, clustering, worker threads - 07-scaling-and-performance/ — Caching, profiling, load balancing
- 08-security/ — Validation, headers, rate limiting patterns
- 09-deployment-and-devops/ — Docker, CI/CD, process managers
- 10-industry-practices/ — Logging, testing strategies, project structure
- 11-large-scale-architecture/ — Messaging, microservices, design patterns
- src/ — TypeScript runnable examples and small utilities
app.ts— simple runner used bynpm run devworker.ts,logger.ts— supportive runtime utilities
- utils/ and middleware/ — reusable helpers and example middleware implementations
See the full contents of directories for focused guides and runnable snippets.
- Example runner: src/app.ts
- Logger & utils: src/logger.ts, utils/validation.ts
- Middleware samples: src/middleware/rate-limiter.ts
These files are intentionally small and well-commented to act as reference implementations for the concepts explained in the .md lessons.
- Install:
npm install - Development run (TypeScript live runner):
npm run dev - Build:
npm run build(producesdist/viatsc) - Run built output:
npm start - Tests: There are no formal tests in this repository — lessons include manual exercises. Consider adding unit tests for any extended examples.
If you add new runnable examples, follow this pattern:
- Place TypeScript source in
src/or an example directory - Add comments explaining the learning objective
- If you add a new runnable script, update this README and the root
package.jsonscripts
Contributions are welcome — this repository is an educational resource and benefits from diverse examples and improvements.
- Found an error in the lessons? Open an issue describing the problem and the suggested fix.
- Want to contribute a new lesson or example? Fork the repo, add content under an appropriate folder, and open a pull request.
- Keep content focused and well-documented. Include runnable examples where appropriate.
When submitting PRs, prefer small, targeted changes. Add a short description explaining the learning outcome for any new example.
This repository contains educational examples. Do not use the exact code from examples in production without reviewing and adapting for security, error handling, and performance. If you find a security issue in the repository itself, please open an issue or contact the maintainer via the repository issue tracker.
This project is licensed under the terms in the LICENSE file.
- This project is licensed under the terms of the MIT License.
- You may replace or update the license as needed for client or proprietary projects.
- Name: Md Abu Kayser
- Project: raw-nodejs-notepad
- Maintainer: md-abu-kayser
- Email: abu.kayser.official@gmail.com
- GitHub: github.com/abu.kayser-official
If you’d like this README tailored for a specific purpose - such as hiring managers, open-source contributors, or client deliverables - feel free to request a custom tone or format.
Thank you for exploring Raw Node.js Notepad.