Skip to main content

One backend, many frontends

One app to serve every user — human or machine. A Reboot backend does not know or care what kind of client is calling it: the same types, the same methods, and the same durable state are reachable from every front door.

Humans

FrontendWhat it isStart here
WebA React app in the browser, talking to your Reboot backend.Web apps
React NativeA React Native app on iOS and Android, using the same generated hooks as the web app. In alpha.React Native apps
MCP UIYour methods as MCP tools, and React components rendered in the conversation, inside ChatGPT, Claude, or VS Code.MCP UIs

Agents

An AI agent reaches your app over MCP. Which methods it may call, User methods included, is your explicit choice, method by method.

An agent can also run inside your app, rather than calling in from outside: see Agents for Pydantic AI agents whose model and tool calls are durable and replay-safe inside a workflow.

Services

Another service, a script, or your own backend code calls your application directly — see from within your app, from outside your app, and over HTTP. You can also add custom HTTP routes for webhooks and anything else that cannot call a method.

What stays the same

Whichever front door a call comes through, three things do not change.

One identity per user. Sign-in is handled by the backend's OAuth server, not by any one client. A person who signs in on the web is the same User, with the same state, in your mobile app and in their MCP client. There is no account linking to build.

One generated client, and one way in. rbt generate emits one typed React client that the web app, the native app, and any UI methods all import from. On every frontend, sign-in is useSignIn() and the signed-in person is useUser(); see On the client.

One authorization model. Authorizers run on the backend, so a method restricted to its owner is restricted the same way whether the caller is a browser, a phone, an AI, or another service.

What differs

Only the mechanics at the very edge:

  • Where the backend URL comes from. The web app reads it from an environment variable at build time; a native app reads it from its own config; a UI method needs no URL at all, because the provider detects the MCP host.
  • How the sign-in flow runs. A browser redirects and comes back. A native app opens a system browser. An MCP client runs the flow when the user connects your app.
  • What the user sees. A full page, a native screen, or a component embedded in a conversation.

Serving several at once

Nothing stops one application from doing all of it. The bank-pydantic example does, and its layout is the one to copy when you expect more than one frontend.

Next