# Overview of the architecture

## System Architecture

Node.js is mainly divided into four parts: Node Standard Library, Node Bindings, V8, and Libuv. The architecture diagram is as follows: ![node.js](/files/F9r1tiDOH3PU4BEiRfnq)

* Node Standard Library is the standard library we use every day, such as Http, Buffer modules.
* Node Bindings is the bridge between JS and C++, encapsulating the details of V8 and Libuv, and providing basic API services to the upper layer.
* This layer is the key to support the operation of Node.js, implemented by C/C++.
  * V8 is a JavaScript engine developed by Google, which provides a JavaScript runtime environment. It can be said that it is the engine of Node.js.
  * Libuv is a specially developed encapsulation library for Node.js, which provides cross-platform asynchronous I/O capabilities.
  * C-ares: Provides asynchronous processing of DNS-related capabilities.
  * http\_parser, OpenSSL, zlib, etc.: Provide other capabilities including http parsing, SSL, data compression, etc.

## Code Structure

View the tree structure using the tree command

```shell
➜  nodejs git:(master) tree -L 1
.
├── AUTHORS
├── BSDmakefile
├── BUILDING.md
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── COLLABORATOR_GUIDE.md
├── CONTRIBUTING.md
├── GOVERNANCE.md
├── LICENSE
├── Makefile
├── README.md
├── ROADMAP.md
├── WORKING_GROUPS.md
├── android-configure
├── benchmark
├── common.gypi
├── config.gypi
├── config.mk
├── configure
├── deps
├── doc
├── icu_config.gypi
├── lib
├── node.gyp
├── out
├── src
├── test
├── tools
└── vcbuild.bat
```

Further view the `deps` directory:

```shell
➜  nodejs git:(master) tree deps -L 1
deps
├── cares
├── gtest
├── http_parser
├── npm
├── openssl
├── uv
├── v8
└── zlib
```

The core of `node.js` depends on six third-party modules. Among them, the core modules http\_parser, uv, and v8 will be introduced in subsequent chapters. `gtest` is a C/C++ unit testing framework.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jianghua-yjhs-organization.gitbook.io/in-depth-understanding-of-node.js-core-ideas-and/chapter1/chapter1-0.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
