Skip to content

md-abu-kayser/raw-nodejs-notepad

Repository files navigation

Raw Node.js Notepad

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

Table of Contents

  • 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+

Who this is for

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.


Features & Learning Outcomes

  • Core modules deep dives: http, fs, stream, events, child_process, os, path and 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

Quickstart

Prerequisites: Node.js and npm or pnpm.

  1. Clone the repository:
git clone https://github.com/md-abu-kayser/raw-nodejs-notepad.git
cd raw-nodejs-notepad
  1. Install dev dependencies (this project uses TypeScript for examples):
npm install
  1. Run a development example directly with TypeScript (no build step):
npm run dev
  1. Build for production and run the compiled output:
npm run build
npm start

Note: npm run dev executes ts-node src/app.ts; build runs tsc and start runs node dist/app.js.


Repository layout

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 by npm run dev
    • worker.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.


Guides & Notable Files

These files are intentionally small and well-commented to act as reference implementations for the concepts explained in the .md lessons.


Development workflow

  • Install: npm install
  • Development run (TypeScript live runner): npm run dev
  • Build: npm run build (produces dist/ via tsc)
  • 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:

  1. Place TypeScript source in src/ or an example directory
  2. Add comments explaining the learning objective
  3. If you add a new runnable script, update this README and the root package.json scripts

Contributing

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.


Security & Responsible Disclosure

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.


License

This project is licensed under the terms in the LICENSE file.


License

  • 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.

Contact and Maintainer

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.


About

A zero-dependency guide to Node.js internals, core modules, and practical server building with runnable examples.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors