Open bpierre opened 6 years ago
Adding another con, all 'first-party' Aragon apps use separate packages for the contracts and the webapp. I think we should make the default developer experience as similar as possible to what we consider the best way of building Aragon apps is.
I like logically separating things as much as possible, to avoid confusion. I've even been thinking about making the contracts go into a different subdirectory, so that it might look something like:
app-root
|
|--- frontend
|--- src
|--- package.json
|--- evm
|--- contracts
|--- package.json
And maybe lerna at the root to make it easier to install all in one go?
I wouldn't call the subdir EVM though, imagine that in the future Aragon apps run on WASM
Some ideas of variable correctness: onchain
, backend
, ethereum-backend
, ethereum-app
, contracts
, smart-contracts
, ethereum
, arapp
, solidity
.
I was also thinking about webapp
instead of frontend
(thinking about projects having several types of frontends in the future), but frontend
would work fine for now.
I guess I like onchain
the best out of those, as the name with least confusion. Technically EWASM would still be an "EVM".
And maybe lerna at the root to make it easier to install all in one go?
What about repos that already use lerna to manage multiple apps like aragon/aragon-apps or TPT? Would the idea be that each app uses lerna to manage the two packages or are they all managed by the monorepo top-level lerna? Just worried than adding more packages could make dealing with app monorepos even more painful than it is right now.
Yeah, don't disagree with that. I was thinking each app would also use lerna to manage the two packages... but that's probably overkill.
We could also do “lerna without lerna”, only to avoid introducing another tool:
app-root
|
|--- package.json <= The name, version and running commands would go here. Some commands
| would only be aliases of local commands in frontend/ and evm/.
| `npm install` would also install the deps in frontend/ and evm/.
|
|
|--- frontend
|--- src
|--- package.json <= private: true, local commands and deps
|--- ethereum
|--- contracts
|--- package.json <= private:true, local commands and deps
With the above, we should also place generic assets, e.g. icons, images, etc. into app-root/assets/
, and make sure the publishing tool includes that in its list of files.
The manifest.json
should go directly into app-root
, and potentially the arapp.json
could go into app-root/evm
, since it's all contract related.
Pros:
Cons:
@izqui @sohkai thoughts?