For Engineering

Rough for Engineering teams

What integrating Rough actually looks like — where it fits in your stack, what you have to build, and what you don't.

The honest pitch

You probably don't want to build a plugin system. They're large, they're long-lived, and they outgrow whatever architecture you initially picked. Rough is a way to get the customer-extensibility surface without paying for that.

What you're integrating is a small SDK and a few clearly-bounded components. What you're not integrating is a sandbox, a runtime, a builder UI, a versioning layer, or any of the operational machinery behind it.

What you actually do

A Rough integration has three steps:

  1. Install @roughapp/feature and call initRough(...) with your project credentials.
  2. Define a tool list — the queries, mutations and subscriptions you want to expose to Features. Each tool has a Zod input/output schema and an implementation that calls into your existing code.
  3. Mount a <RoughSurface> wherever you want Features to appear. Pass the tool list and any context the Surface needs.

That's the core integration. Everything else — building Features, hosting them, sandboxing them, generating types for them — is on Rough's side.

What lives where

What it costs to introduce

The integration itself is small enough to get to a working demo in an afternoon. The real engineering cost is what you'd expect from any new extension surface:

What you don't have to build

How to think about the security model

The short version is: tools are your access control. The bridge guarantees a Feature can only invoke tools you've registered, with inputs that match your schema. Anything beyond that is your job — same as for any API consumer.

A more thorough walk-through is on the security page. The architecture is on how RAF works.

A reasonable rollout

  1. Pick one Surface. Somewhere low-stakes — an internal admin panel is ideal for the first integration.
  2. Expose a small tool list. Two or three tools is plenty to start.
  3. Get a Feature built end-to-end and watch it work.
  4. Expand the tool list and the Surfaces from there as you learn what your users actually try to do.

Related