o1-labs / zkapp-cli

CLI to create a zkApp (zero-knowledge app) for Mina Protocol
https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp
Apache License 2.0
114 stars 43 forks source link

Idiomatic monorepo setup #619

Open mitschabaude opened 4 months ago

mitschabaude commented 4 months ago

There are some excellent proposals made here by @sam-goodman for how to improve the monorepo setup with separate contracts/ and ui/: https://github.com/o1-labs/o1js/issues/1576#issuecomment-2054190363

Configuring workspaces (probably npm workspaces?) and TS as described in that comment seems like a major improvement over the flow of locally npm-linking subdirectories that we recommend in our docs: https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp-ui#local-development

Alternative

A different way to approach this would be to move contracts and UI into the same project. Pro: it's simpler. I don't have a good sense of the trade-offs there tbh, should ask existing developers for their preferences

ymekuria commented 4 months ago

Configuring workspaces (probably npm workspaces?) and TS as described in that comment seems like a major improvement over the flow of locally npm-linking subdirectories that we recommend in our docs: https://docs.minaprotocol.com/zkapps/how-to-write-a-zkapp-ui#local-development

We need to revisit this and probably move away from recommending npm link as the workflow.