# Setting up a Node project

To start a new project, create a directory for it:

```bash
mkdir learn_sc && cd learn_sc
```

Then we will initialize our node project inside the newly created folder:

```bash
npm init -y
```

This will create a `package.json` file, which will evolve as your project grows, such as when installing dependencies with `npm install`

{% hint style="info" %}
JavaScript and npm are some of the most used software tools in the world: if you’re ever in doubt, you’ll find plenty of information about them online.
{% endhint %}

#### Using npx

There are two broads type of packages stored in the npm registry: *libraries* and *executables*. Installed libraries are used like any other piece of JavaScript code, but executables are special.

A third binary was included when installing node: [npx](https://blog.npmjs.org/post/162869356040/introducing-npx-an-npm-package-runner). This is used to run executables installed locally in your project.

For our local blockchain development, we will need to install certain packages/libraries so that we can create a local blockchain network within our local systems. For this we can either **Truffle** or **Hardhat.**

{% hint style="info" %}
Whilst [Truffle](https://www.trufflesuite.com/truffle) and [Hardhat](https://hardhat.org/) can be installed globally we recommend installing them locally in each project so that you can control the version on a project-by-project basis.
{% endhint %}

In this guide, we will be going with using Hardhat.

#### Tracking with Version Control

Before you get coding, you should add [version control software](https://en.wikipedia.org/wiki/Version_control) to your project to track changes.

By far, the most used tool is [Git](https://git-scm.com/), often in conjunction with [GitHub](https://github.com/) for hosting purposes. Indeed, you will find the full source code and history of all OpenZeppelin software in our [GitHub repository](https://github.com/OpenZeppelin).

{% hint style="info" %}
If you’ve never used Git before, a good starting place is the [Git Handbook](https://guides.github.com/introduction/git-handbook/).
{% endhint %}

{% hint style="warning" %}
Don’t commit secrets such as mnemonics, private keys and API keys to version control! Make sure you [`.gitignore`](https://git-scm.com/docs/gitignore) files with secrets.
{% endhint %}
