coinbase / build-onchain-apps

Accelerate your onchain creativity with the Build Onchain Apps Template. ⛵️
https://buildonchainapps.xyz
MIT License
707 stars 119 forks source link

Feature Request: General feedback and advice #43

Closed roninjin10 closed 11 months ago

roninjin10 commented 11 months ago

Is your feature request related to a problem? Please describe.

Love that you are doing this! Just wanted to provide some helpful feedback since i'm building a similar project right now for EVMts. I also built the optimism starterkit which got a lot of positive feedback.

Describe the solution you'd like

Name the package create-foo

By naming the package create-onchain-app instead of @base-org/build-onchain-app it will follow the standard tooling expects and work seemlessly with all package managers. e.g npx create-onchain-app npm init onchain-app pnpm create onchain-app and yarn create onchain-app will all work.

Also make sure you add the binary to bin in package.json

Consider building with tsup

Small tip but if you use tsup to build the app it has a nice feature of automatically making the build output executable https://tsup.egoist.dev/#building-cli-app .

Eslint config is way too opinionated

Lots of rules in the eslint config but in general this is too opinoinated for a general starterkit. Myself, I would never use an eslint config based off of air bnb. IMO only the most important rules that prevent bugs should be included and it should be otherwise less opinionated

Tailwind is too opinoinated

I think including tailwind is a step too far. I plan on including tailwind as an option for create-evmts-app via including it as an option. This is how create-t3-app works too.

Some command line tech I like that could be helpful

There are three pieces of tech that are worth looking into when you build the cli.

  1. Clack - just a really good way of building a cli app
  2. pastel - React based cli framework that I'm using for create-evmts-app
  3. cac - this is a great more robust option than comandeer while still being as minimal. This was my goto before I switched to using pastel and also what the create-wagmi-app cli uses

    Docs

Optimism starter got great feedback mostly from it's really detailed docs and readme. It might be a good starting point for the create onchain app readme https://github.com/ethereum-optimism/optimism-starter.

Additionally the optimism starter has a signifcant amount of links to documentation in the source code that could be helpful pattern to follow image

Describe alternatives you've considered

No response

Additional context

My WIP create-evmts-app cli is here https://github.com/evmts/evmts-monorepo/pull/650/files. Sharing just in case it sparks any ideas or inspiration. Feel free to copy anything from it.

Also I would love to add the onchain-app template as an option later.

Here is a video of what I implemented so far: Untitled_ Nov 9 2023 1_08 PM.webm

Zizzamia commented 11 months ago

Ciao @roninjin10, love all those notes.

Overall, we are still finishing up our first real release this week. So yeah, the code is messy, and several essential parts are missing.

One point to make is that we are going to have an opinionated starter kit. With opinions primarily based on what we are comfortable using, and overall, has considerable support in the industry.

I will close this ticket for now, and I look forward to chatting more in a week or two, either over Github or even over Google Meet.

Especially as this is just the beginning for us, we will surely hit a few miss-directions, which we are happy to debate and see how to improve.