DEV Community

Prateik Lohani
Prateik Lohani

Posted on

Node modules confusion??

I am a beginner to web development and I just created this hardhat project to test a smart contract for a charity donation DApp that has the following folder structure:

Image description

Now how do I add a frontend to this thing? I first initialized it using npm init, then I added hardhat using npm i hardhat, intialized the hardhat project using npx hardhat init and finally did all the testing yada yada...
Until it was done.

Now how do I add a react frontend to it? I thought about creating another frontend folder here itself in which I'll create all the web pages...
...And it's here where the node modules confusion comes up.

Image description

Won't this create 2 node modules folders? One in the main directory, one in the frontend directory?

Is that good practice?

Top comments (0)