I'm currently looking for a new role. If you're looking to add a developer to your team, I'd love to chat! You can find my resume here.
Carve

Carve

[CACHED]
  • javascript

So, the other day I was starting a new project, just like hundreds of other projects before it. This one however, was actually an older project that I wanted to revive. But you know what? Just like hundreds of other projects before it… I wanted to change everything about the stack it was originally built on. 🤦🏻‍♂️

Init

I got all hot and heavy thinking through my opinions. What I like to work with, what I might want to work with in the future, and where the state of some other projects and frameworks are at. I used to be quite the advocate for React and Next.js, but in the past year or so I’ve gotten a little dismayed by Next.js and Vercel (more on this later). I was still into React and found Tanstack Router, which I initially built my project on… and it was great, I will always recommend anything Tanstack to anyone. I had also been working with Vue.js at my job full time and was really finding that to be enjoyable. I had actually initially learned Vue.js before ever getting into React. That was years ago.

Over engineering, Much?

As I was working through getting a new project up and running that I could somewhat import my old project into, I kept running into walls, knowing what ultimately I wanted.

A monorepo that was type safe end-to-end. Something like create-t3-app but with some very different ways of doing things. I wanted the flexibility to add apps or packages and have them work together within a singular repo… that’s what monorepo’s are for. I needed my types to flow through from the servers to the web apps for my own personal DX (developer experience). I also wanted the frontend apps and backend servers to work through an API layer that still allowed types to work, which can be tricky in a monorepo. I wanted, needed, the ability to add servers and frontends and maintain a singular api layer.

Needless to say, I stopped working on the project at hand and started a new one. Lets build a template for all future projects. So like a good soldier, that’s what I did.

Credit

I want to give credit where credit is due. The very first iteration of this was started with Better T Stack. It’s a very cool project and I hope those devs continue to build on it. I’ll urge you to look into it when starting up your frontend projects.

Now

I’ve spent the last few days working through things (emotionally and mentally), and I think I’ve built a “tool” that could be beneficial… at least for me, going forward.

  • It’s very opinionated.
  • It’s very early.
  • I’m very likely to change opinions.

Carve

I’m calling it Carve. There’s no good reason for that, but shoot… I can’t call it Tanstack Start… and I’ve already started working on branding efforts (which is a whole other rabbit hole for me). 🙃

The template uses Nuxt.js for a frontend application. I’ve really started liking Nuxt.js. At the time of this writing, Nuxt Labs, the team behind Nuxt.js, were just bought by Vercel. I’m not sure what that means for the future of Nuxt.js, but from what I’ve seen, it might be OK… They didn’t seem to destroy SvelteKit and some of the other Nuxt Lab projects are said to be going open source. Like Nuxt UI Pro, which I’d like to add to this template.

In an alternate universe version of myself, I’ve chosen Elysia.js for the starter backends. I would typically shout “use Hone.js” from the mountaintops, but I actually had a better experience getting types to flow with Elysia.

Maybe you caught that “backend(s)” in the last paragraph. This may be a mistake that I’ll change later, but I’m separating auth logic from app logic into their own servers and databases. At this point I could separate much more before I’m really done with this, but this is where I’m starting. It’s a lot to maintain on a development side and I do have a dockerfile to help spin up the databases, but again, this is a WIP, and will change.

Speaking of Auth, here are some decisions I’ve made (that may change)

  • I’ve chosen Better Auth, it’s really cool.
  • I’m using Bun for package management and runtime.
  • Instead of tRPC or REST or GraphQL, oRPC because I’m interested.
  • Biome, but honestly I may go back to ESLint and Prettier… Biome doesn’t format Vue SFC’s, and I”m butt hurt about that.
  • Turborepo, but I’m also looking at NX, who knows where that’ll go.

There are other decisions I’m making as I go and they might change all the time. But right now, you can at least get something up and running.

So, LFGO!!

You can use Carve right now. Find it at this Github link, and click the “Use This Template” button at the top of the page.

Just read through the README.md and the supporting /docs/ and you should be good. You also may need to install Bun on your machine, though. And, there are scripts outlined in the /docs/CARVE_INIT.md file that help if you want to rename the project and get things going.

Anyway, have fun and let me know how it goes.