Essay record

Building a Fullstack Rust Web App Boilerplate for Coding Agents

Record
Essay / / 3 min read / 925 words
On this page4 sections / +

DISCLOSURE: Some links may be affiliate links. Details

I've long built boilerplates and templates for myself so I can spin up new projects faster and carry forward the approaches / techniques I've picked up along the way. Now that I exclusively code with agents, I'm rethinking what makes those boilerplates useful.

In this post I want to share how I'm making CloudSeed Rust, my fullstack Rust web app boilerplate, more agent-native through Durable Context and System Guardrails.

What is CloudSeed Rust?

CloudSeed is my fullstack Rust webapp boilerplate.

CloudSeed Rust architecture showing the Dockerized server, PostgreSQL, CSS pipeline, and OpenTelemetry observability.

It's essentially a modulith (modular monolith) that provides a seed from which to build your app including common defaults pre-configured like:

  • DDD vertical slices
  • Data access + migrations
  • Authentication + emails
  • Background jobs
  • SSR frontends with Tailwind and DaisyUI
  • Observability via OpenTelemetry

Why use a boilerplate when AI can build the app from scratch?

I think the answer changes a little every few months as the models get better but the basic tradeoff remains the same:

  • Build from scratch - You have the most flexibility but you also need to think through every decision. It's easier to miss an area and takes longer to get to a solid foundation.
  • Build from a boilerplate - The basics are already covered so you can start building your app sooner with better defaults. Of course it may not be how you want to do things and some choices may be harder to customize.

With humans, the bottlenecks were often both direction and execution. We needed to figure out what to build, then spend the time to actually build it. A boilerplate saved both direction and execution time.

With agents, I think the bottleneck shifts much more towards direction. Given sufficient context, agents can execute fast and with good quality - most can one-shot a working webapp in a few minutes. That changes how valuable simply getting an app up and running is.

The value I see in a boilerplate now (and with planning in general) is the opinionated scaffolding for how to build something that is correct, robust, and performant. It still saves time, but more of that value comes from the decisions and patterns you carry throughout the life of the app vs just getting something running.

Making CloudSeed Agent-friendly

I'm approaching this the same way I'm thinking about building software factories - environments where agents can work autonomously towards our goals.

Agents travel toward the destination defined by Durable Context, bounded by System Guardrails on both sides of the path.

The 2 pieces I'm focused on are:

For CloudSeed, a lot of the Durable Context looks like standard documentation:

  • Foundation - What is this module for and why does it exist?
  • Requirements - What are the core things it's trying to accomplish?
  • Architecture - How does it accomplish those things?
  • Verification - How do we validate it's actually doing them?

That's because a lot of it is just documentation! Being clear about what we're trying to accomplish gives agents (and humans!) the context to make informed decisions about how to proceed.

For System Guardrails, I haven't felt the need to build out many extras yet. CloudSeed's goal is to be a solid base (a seed!) from which to grow your app. There's a balance between making that base solid and keeping it flexible for whatever you want to build.

Rust already provides a lot of guardrails out of the box, which is one reason I think it's so well positioned in the age of AI. Its compiler and linters already enforce many rules that agents have to work within. If I were building this in Python or TypeScript, I'd want to ship more lint rules to catch common gotchas but Rust does a lot of this by default.

As people continue to ship projects with CloudSeed and provide feedback, I'll likely evolve this approach to cover more common gotchas but I also want to balance this with speed and flexibility.

Next

CloudSeed remains my goto for starting new Rust webapps despite exclusively coding with agents for the last year. If anything it allows me to be more handsoff as I know they're starting with a strong foundation with best practices I've developed from my own exp shipping projects on the side and at places like Meta and Rippling.

If that sounds useful, CloudSeed Rust is available now. If you do decide to try it, I'd love to hear what you're building with it - can drop a comment here or reply to one of my emails.

Special thanks to my HAMINIONS Members for your continued support - you make free posts like this possible. HAMINIONS get access to dozens of example projects (many doing deep dives into components / technologies CloudSeed is built on) and discounts for projects like CloudSeed. If you want more content like this, consider joining today.

If you liked this post, you might also like:

Built with CloudSeed Rust