near / near-explorer

NEAR blockchain explorer
https://explorer.near.org/
Apache License 2.0
85 stars 53 forks source link

DX w/ monorepo tooling #803

Open luixo opened 2 years ago

luixo commented 2 years ago

Story

As a developer who just started working on projects, I stumbled upon a bump while bootstrapping the app. The repository seems to be monorepo, but lacks appropriate tooling (e.g. lerna, pnpm). There is no instruction for a developer to run npm i in every folder you're going to work in, and default npm i in root folder didn't help much. Combining with wild-card module declaration (which is in my belief smelly code by itself) it caused me to dig for some time why every module in project is broken and linked to wildcard module declaration.

Proposals

frol commented 2 years ago

There are just two subprojects (backend and frontend), so it felt like an overkill to introduce extra tooling for that. My plan was to use docker-compose as the way to document how to run the project altogether.

P.S. cli folder should be removed: https://github.com/near/near-explorer/pull/804

luixo commented 2 years ago

As of my experience, in this kind of setup (just client and server) package.json is usually shared. Anyway, I believe a little extra documentation won't hurt anyone

frol commented 2 years ago

Meh, I don't think it is a good idea to mix client and server dependencies / commands since that may cause various unexpected issues.

P.S. I am all for improvements to documentation :+1:

luixo commented 1 year ago

This might do it.