Skip to content

Commit 0b634b1

Browse files
committed
feat: add Node.js Ecosystem learning module
Add a complete new learning module covering the Node.js ecosystem with 10 sections and 8 interactive SVG visualizations. Sections: - Introduction — overview, stats, company examples, learning journey - Event Loop — 5-phase architecture, microtasks, libuv thread pool - Async Programming — callbacks, promises, async/await evolution - Buffers & Streams — Buffer API, 4 stream types, backpressure - Scaling — Cluster vs Worker Threads, PM2, comparison table - Memory Management — V8 heap, Minor/Major GC, memory leak patterns - Module System — CommonJS vs ESM syntax, tree-shaking, live bindings - Package Managers — npm vs Yarn vs pnpm architecture and trade-offs - Frameworks — Express, Fastify, NestJS, Koa, Hono comparison - Runtime Wars — Node.js vs Deno vs Bun benchmarks and decision guide Visualizations: - EventLoopViz — animated 5-phase loop with microtask queue - StreamsBuffersViz — streaming pipeline with backpressure demo - ClusterVsWorkerViz — tabbed cluster vs worker threads comparison - V8MemoryViz — interactive V8 heap with GC trigger controls - PackageManagerViz — npm/yarn/pnpm install simulation - ModuleSystemViz — CJS vs ESM step-through loading - RuntimeComparisonViz — Node vs Deno vs Bun architecture comparison - FrameworksViz — Express/Fastify/NestJS/Koa/Hono performance bars Integration: - Add 'nodejs' color scheme (green/emerald/lime) to theme.ts - Add lazy-loaded /nodejs route in App.tsx - Add Node.js to Header navigation (Frameworks group) - Add 10 sidebar entries + getSectionFromPath + green color in Sidebar.tsx - Add Node.js module card to Home page - Update stats to 12+ modules, 78+ visualizations - Update README with Node.js Ecosystem module info
1 parent 741abb9 commit 0b634b1

27 files changed

Lines changed: 7660 additions & 10 deletions

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**🌐 Live Website**: [https://codexecutives.com](https://codexecutives.com)
66

7-
**✨ Now featuring 8 complete learning modules with 80+ interactive visualizations covering Git, JavaScript Engine, RxJS, Data Structures, Next.js, Big-O Notation, Python Programming, AI Fundamentals, and a LeetCode-style playground with advanced debugging and gamification.**
7+
**✨ Now featuring 12 complete learning modules with 78+ interactive visualizations covering Git, JavaScript Engine, RxJS, Data Structures, Next.js, Big-O Notation, Python Programming, AI Fundamentals, Node.js Ecosystem, and a LeetCode-style playground with advanced debugging and gamification.**
88

99
> **📌 Repository Maintainers**: See [REPOSITORY-ABOUT-QUICK-REFERENCE.md](./docs/REPOSITORY-ABOUT-QUICK-REFERENCE.md) for GitHub repository About section configuration (description, website, and topics).
1010
@@ -20,6 +20,7 @@
2020
- **Big-O Notation**: Complete algorithmic complexity analysis with 10+ interactive tools and metaphors
2121
- **Python Programming**: Complete Python tutorial covering philosophy, execution model, memory management, and concurrency
2222
- **AI Fundamentals**: Machine learning concepts from scratch — neural networks, gradient descent, embeddings, and RAG pipelines
23+
- **Node.js Ecosystem**: Deep dive into Event Loop, V8 memory, Streams, Clustering, module systems, package managers, frameworks, and runtime wars (Node vs Deno vs Bun)
2324
- **LeetCode-Style Playground**: Interactive coding environment with debugging, visualizations, and gamification
2425

2526
### 🎮 **Interactive Visualizations**

docs/Node.js Ecosystem Research Report.md

Lines changed: 468 additions & 0 deletions
Large diffs are not rendered by default.

src/App.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const PythonPage = lazy(() => import('./features/python'));
2828
const SystemDesignPage = lazy(() => import('./features/systemdesign'));
2929
const TypeScriptPage = lazy(() => import('./features/typescript'));
3030
const AIFundamentalsPage = lazy(() => import('./features/ai'));
31+
const NodeJSPage = lazy(() => import('./features/nodejs'));
3132

3233
const App: React.FC = () => {
3334
// Initialize analytics on app mount
@@ -163,6 +164,14 @@ const App: React.FC = () => {
163164
</SuspenseRoute>
164165
}
165166
/>
167+
<Route
168+
path="/nodejs"
169+
element={
170+
<SuspenseRoute>
171+
<NodeJSPage />
172+
</SuspenseRoute>
173+
}
174+
/>
166175
</Routes>
167176
</main>
168177
</div>

src/components/Header.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
BookOpen,
1616
Boxes,
1717
Brain,
18+
Server,
1819
} from 'lucide-react';
1920
import { useUI } from '../shared/contexts';
2021

@@ -80,6 +81,12 @@ const Header: React.FC = () => {
8081
icon: <Globe className="w-4 h-4" />,
8182
description: 'Next.js full-stack framework',
8283
},
84+
{
85+
label: 'Node.js',
86+
path: '/nodejs',
87+
icon: <Server className="w-4 h-4" />,
88+
description: 'Node.js ecosystem & runtime',
89+
},
8390
],
8491
},
8592
{
@@ -180,6 +187,7 @@ const Header: React.FC = () => {
180187
if (path === '/datastructures' || path === '/systemdesign') return 'text-blue-600 bg-blue-50';
181188
if (path === '/bigo') return 'text-purple-600 bg-purple-50';
182189
if (path === '/ai') return 'text-rose-600 bg-rose-50';
190+
if (path === '/nodejs') return 'text-green-600 bg-green-50';
183191
return 'text-gray-700 hover:bg-gray-50';
184192
};
185193

src/components/Sidebar.tsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ const getThemeColorClass = (
5959
buttonHover: 'hover:text-rose-600',
6060
border: 'border-rose-100',
6161
},
62+
green: {
63+
active: 'bg-green-100 text-green-800 border-green-500',
64+
hover: 'hover:bg-green-50 hover:text-green-700',
65+
buttonActive: 'text-green-600 hover:text-green-700',
66+
buttonHover: 'hover:text-green-600',
67+
border: 'border-green-100',
68+
},
6269
};
6370

6471
const colors = colorMap[theme.primary] || colorMap.blue;
@@ -319,6 +326,18 @@ const sidebarSections: Record<string, Array<SidebarItem>> = {
319326
{ label: 'Word Embeddings', path: '/ai?section=Word%20Embeddings' },
320327
{ label: 'RAG Pipeline', path: '/ai?section=RAG%20Pipeline' },
321328
],
329+
'/nodejs': [
330+
{ label: 'Introduction', path: '/nodejs?section=Introduction' },
331+
{ label: 'Event Loop', path: '/nodejs?section=Event%20Loop' },
332+
{ label: 'Async Programming', path: '/nodejs?section=Async%20Programming' },
333+
{ label: 'Buffers & Streams', path: '/nodejs?section=Buffers%20%26%20Streams' },
334+
{ label: 'Scaling', path: '/nodejs?section=Scaling' },
335+
{ label: 'Memory Management', path: '/nodejs?section=Memory%20Management' },
336+
{ label: 'Module System', path: '/nodejs?section=Module%20System' },
337+
{ label: 'Package Managers', path: '/nodejs?section=Package%20Managers' },
338+
{ label: 'Frameworks', path: '/nodejs?section=Frameworks' },
339+
{ label: 'Runtime Wars', path: '/nodejs?section=Runtime%20Wars' },
340+
],
322341
'/': [],
323342
'/about': [],
324343
};
@@ -344,7 +363,9 @@ const Sidebar: React.FC = () => {
344363
| 'python'
345364
| 'systemdesign'
346365
| 'typescript'
347-
| 'ai' => {
366+
| 'ai'
367+
| 'nodejs' => {
368+
if (path.includes('/nodejs')) return 'nodejs';
348369
if (path.includes('/ai')) return 'ai';
349370
if (path.includes('javascript')) return 'javascript';
350371
if (path.includes('python')) return 'python';

src/features/nodejs/NodeJSPage.tsx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import React, { Suspense } from 'react';
2+
import { useLocation } from 'react-router-dom';
3+
4+
// Lazy load section components for better performance
5+
import Introduction from './components/sections/Introduction';
6+
const EventLoop = React.lazy(() => import('./components/sections/EventLoop'));
7+
const AsyncProgramming = React.lazy(() => import('./components/sections/AsyncProgramming'));
8+
const BuffersStreams = React.lazy(() => import('./components/sections/BuffersStreams'));
9+
const Scaling = React.lazy(() => import('./components/sections/Scaling'));
10+
const MemoryManagement = React.lazy(() => import('./components/sections/MemoryManagement'));
11+
const ModuleSystem = React.lazy(() => import('./components/sections/ModuleSystem'));
12+
const PackageManagers = React.lazy(() => import('./components/sections/PackageManagers'));
13+
const Frameworks = React.lazy(() => import('./components/sections/Frameworks'));
14+
const RuntimeWars = React.lazy(() => import('./components/sections/RuntimeWars'));
15+
16+
const sectionComponents: Record<string, React.ComponentType> = {
17+
Introduction,
18+
'Event Loop': EventLoop,
19+
'Async Programming': AsyncProgramming,
20+
'Buffers & Streams': BuffersStreams,
21+
Scaling,
22+
'Memory Management': MemoryManagement,
23+
'Module System': ModuleSystem,
24+
'Package Managers': PackageManagers,
25+
Frameworks,
26+
'Runtime Wars': RuntimeWars,
27+
};
28+
29+
function useQuery(): URLSearchParams {
30+
return new URLSearchParams(useLocation().search);
31+
}
32+
33+
const NodeJSPage: React.FC = () => {
34+
const query = useQuery();
35+
const section = query.get('section') || 'Introduction';
36+
const Component = sectionComponents[section] || Introduction;
37+
38+
return (
39+
<div className="p-4 sm:p-6">
40+
<Suspense
41+
fallback={
42+
<div className="flex items-center justify-center h-64">
43+
<div className="animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"></div>
44+
</div>
45+
}
46+
>
47+
<Component />
48+
</Suspense>
49+
</div>
50+
);
51+
};
52+
53+
export default NodeJSPage;

0 commit comments

Comments
 (0)