# Solidity - start a new project with
### with hardhat project
* mkdir <new directory>
* cd <new directory>
* npm init --yes
* npm install --save-dev hardhat
* npx hardhat

after creating a project. it will shows as below. It creates major directories for you.

reference: https://hardhat.org/tutorial/creating-a-new-hardhat-project.html
---
### import/install library
專案中盡量用前人已經寫好測試過的code,可以避免自己刻程式時未考慮周詳而導致的資安漏洞。
可以從npm網站找找library是否被npm支援,https://www.npmjs.com/
若有的話,依照網頁上的指示,到專案的資料夾下install。

順利install後,可以在node_modules下看到安裝的lib,而合約中import路徑就從 lib 開始。

reference: https://remix-ide.readthedocs.io/en/latest/import.html