Update
Hey there, sorry for the delay on this update. I've been balancing founder life and family since my kids got back from spending time with their grandparents. Respect to solo founders building with kids.
In my last post I mentioned working on CI/CD after getting tired of breaking prod.
My goal was a clean dev flow:
- Create a task and branch
- Develop locally with HMR
- Open a PR
- Run quality checks
- Deploy the PR to staging
- Verify, merge, auto-deploy to prod, and clean up staging
Cloudflare does not really support environments. You have to create resources per env yourself. One small misconfiguration can cause staging to call prod APIs. Local dev tooling is also rough, especially with Nuxt and Nitro.
So did I get it working? Yes.
Refactoring
I refactored the project into a proper monorepo using pnpm workspaces. This caused some local dev friction, but those features were not well supported anyway.
Development
This exposed major limitations in Nuxt and Nitro. Cloudflare supports local dev with Miniflare, but Nitro does not use it. To fix this, I built a custom Nitro preset for dev that replaces cloudflare_module. It supports external Worker projects, Durable Objects, and HMR. I plan to open a PR to NitroJS so others can benefit from this.
Workflows
Using GitHub Actions, I set up workflows that detect which sub-projects changed and only run checks on those. Each PR gets its own isolated env by prefixing Cloudflare resources with the PR number and generating Wrangler configs on the fly. Staging URLs are also PR-specific and easy to share.
Conclusion
This took weeks but development is now smooth and much faster, and I am no longer breaking prod! I plan to release an example repo or get the Nitro PR merged so everyone can use this setup.
What's Next?
I have been rethinking pricing and ICPs. Early on I priced too low due to non-ICP feedback. My next update will focus on pricing and value.
Until next time!