Skip to content

Repository files navigation

Node.js Logo

Node.js Master Handbook

A live "proof of work" tracking daily Node.js runtime drills, core-module fundamentals, and hands-on backend projects.

Questions Count   Projects Count

About This Repo

This is a multi-project Node.js learning repo focused on the runtime and its core modulesfs, stream, events, http, net, path, buffer, crypto, process, child_process, cluster, worker_threads — not generic JavaScript language trivia (that lives in a separate repo). Each main project is a real, production-grade backend system built step-by-step from isolated practice questions. Finish all questions → build each module → wire them into the final runnable app. Complete one main project, then move to the next.

Current progress:   🔨 Project 1 — NodeStream Live Ops Dashboard  |  Questions 1–20  |  5 modules

# Main Project Questions Status
1 NodeStream Live Ops Dashboard — multi-format log ingestion & dashboard pipeline ques 1–20 🔨 In Progress
2 (coming after Project 1 completes)

How to use:

  1. Expand a project row below.
  2. Solve every question in the left column.
  3. Build every function in the right column.
  4. Complete all modules → run the final project.
  5. Start the next main project.

🗺️ The Road to NodeStream

 ques 1–6          ques 7–10         ques 11–13        ques 14–18        ques 19–20
    │                  │                  │                  │                 │
    ▼                  ▼                  ▼                  ▼                 ▼
[pro-1]            [pro-2]            [pro-3]            [pro-4]         [pro-final]
Core Utils  →  Data Normalizer  →  RBAC Engine  →  Analytics Engine  →  NodeStream Dashboard


🚀 Project 1  —  NodeStream Live Ops Dashboard  ·  pro-final-nodestream

What you'll achieve: Build a complete log-ops backend from scratch using only Node core modules. Raw server logs in 3 formats (JSON-lines, CSV, syslog-like text) enter the system, get normalized to one unified schema, pass through a role-based security layer that masks sensitive fields per viewer role, flow into an analytics engine generating pivot tables and rate-limited alerts, and stream out as a live terminal dashboard — even for log files too large to fit in memory. You finish by running one command — node projects/pro-final-nodestream/index.js — that executes the entire pipeline end-to-end. A real, demonstrable backend portfolio piece.

Build path:   1.1 Core Utils  →  1.2 Data Normalizer  →  1.3 RBAC Engine  →  1.4 Analytics Engine  →  1.Final NodeStream Dashboard


📦 1.1  —  Core Utility Belt  ·  pro-1-core-utils   ┆   ques 1–6   ┆   🔽 click to open

What you will gain: You build the runtime utilities every real Node.js backend relies on — turning callback APIs into promises, streaming files line-by-line instead of loading them whole, subclassing EventEmitter, debouncing/throttling high-frequency input, and safely resolving filesystem paths. After this module you will understand how Node's own core APIs are typically wrapped in production code, and every module you build after this will import from here.


📝 Questions  — solve all 6 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
1 ques-1-promisify-api util.promisify on a callback API
2 ques-2-readline-stream Line-by-line file streaming with readline
3 ques-3-emitter-subclass Subclassing EventEmitter
4 ques-4-debounce-throttle-cli Debounce/throttle for CLI input events
5 ques-5-safe-path-utils Safe path.join/path.resolve guarding traversal
6 ques-6-dotenv-loader Dotenv-style config loader over fs
Function to Build Needs
promisifyApi(fn) ques-1
streamFileLines(filePath, onLine) ques-2
class AppEventEmitter extends EventEmitter ques-3
debounceCli(fn, waitMs) ques-4
throttleCli(fn, limitMs) ques-4
safeJoin(baseDir, ...segments) ques-5
safeResolve(baseDir, target) ques-5
loadEnvConfig(filePath) ques-6
📦 1.2  —  Data Normalizer  ·  pro-2-data-normalizer   ┆   ques 7–10   ┆   🔽 click to open

What you will gain: You learn to accept raw, inconsistent log data from 3 different formats and convert all of it into one clean unified schema. After this module you will understand the Adapter pattern applied to log ingestion, recursive config merging/diffing for drift detection, and bounded-concurrency filesystem reads — skills used in every log-shipping and observability pipeline (Datadog, Fluentd, Logstash).


📝 Questions  — solve all 4 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
7 ques-7-log-format-adapter Adapter pattern over 3 log formats
8 ques-8-deep-merge-config Recursive config-object merge
9 ques-9-config-deep-diff Deep diff for config drift detection
10 ques-10-fs-read-pool Concurrent fs reads bounded by a task pool
Function to Build Needs
parseJsonLines(raw) ques-7
parseCsvLog(raw) ques-7
parseSyslogLine(line) ques-7
normalizeLogRecord(raw, format) ques-7
deepMergeConfig(base, override) ques-8
deepDiffConfig(oldCfg, newCfg) ques-9
readFilesWithLimit(filePaths, limit) ques-10
📦 1.3  —  RBAC Engine  ·  pro-3-rbac-engine   ┆   ques 11–13   ┆   🔽 click to open

What you will gain: You build a security layer that controls exactly what log data each viewer role is allowed to see. After this module you will understand how an LRU Cache backs a real session store, how a Trie powers HTTP route matching (used by Express-style routers internally), and how field-level data masking works for regulated log data (PII, tokens, secrets) before it ever reaches a dashboard.


📝 Questions  — solve all 3 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
11 ques-11-lru-session-cache LRU eviction policy for a session store
12 ques-12-route-trie Trie-based HTTP route matching
13 ques-13-field-mask-middleware Field-masking middleware factory
Function to Build Needs
class LRUSessionCache ques-11
class RouteTrie ques-12
createFieldMask(role, rules) ques-13
maskRecord(record, role) ques-13
📦 1.4  —  Analytics Engine  ·  pro-4-analytics-engine   ┆   ques 14–18   ┆   🔽 click to open

What you will gain: You turn normalized log records into real operational intelligence — pivot tables, running totals, moving averages, and priority-sorted reports. You also build a pub/sub bus on top of EventEmitter (the pattern behind most Node log/metrics pipelines) and a token-bucket rate limiter (used in every API gateway like AWS, Cloudflare and Nginx). After this module you will be able to power a live ops dashboard with reactive, rate-safe data.


📝 Questions  — solve all 5 first 🔨 Functions to Build  ·  open project guide →
# File What to Learn
14 ques-14-pubsub-emitter Pub/Sub built on EventEmitter
15 ques-15-token-bucket-limiter Token bucket rate-limiter middleware
16 ques-16-pivot-log-table 2D pivot table from parsed log records
17 ques-17-running-avg Running totals & moving averages
18 ques-18-multi-key-log-sort Priority multi-key sort
Function to Build Needs
class LogBus extends EventEmitter ques-14
class TokenBucketLimiter ques-15
rateLimitMiddleware(bucket) ques-15
pivotLogTable(records, rowKey, colKey, valueKey) ques-16
runningTotal(records, key) ques-17
movingAverage(records, key, windowSize) ques-17
multiKeySort(records, sortConfig) ques-18
⭐ 1.Final  —  NodeStream Live Ops Dashboard  ·  pro-final-nodestream   ┆   ques 19–20 + all above   ┆   🔽 click to open

What you will gain: You wire all 4 modules into one running application. Run node index.js and watch raw multi-format logs flow through normalization → RBAC masking → analytics, producing a live report in the terminal — including a large log file streamed via an async generator without ever loading it fully into memory. After this you will have a complete, demonstrable Node.js backend pipeline — a real portfolio piece that shows you can design and build production-grade Node systems end-to-end.


📝 Questions  — final 2 concepts + all previous 🔨 Pipeline Steps to Build  ·  open project guide →
# File What to Learn
19 ques-19-async-log-stream Async generator streaming a large log file
20 ques-20-safe-json-buffers Safe JSON (circular refs, Buffers)

Also requires: all ques 1–18 (modules 1.1–1.4 complete)

Pipeline Step Needs
step1_normalize(rawBatch, format) 1.2 complete
step2_applyRBAC(records, role) 1.3 complete
step3_generateReport(records) 1.4 complete
step4_auditTrail(before, after) ques-9, ques-20
streamLogFile*(filePath) ques-19
createPipeline(role) 1.1 utils + all above

Run: node projects/pro-final-nodestream/index.js


📋 Quick Reference

About

Progressive Node.js learning repo focused on core runtime modules — fs, streams, events, http — building toward a capstone project (NodeStream Live Ops Dashboard).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages