Start

Frontend

Host the UI on the project host and call its APIs from the browser.

A Robodev project host can serve the UI and the APIs together. Create the project from povio/tiny-template in the dashboard, then edit locally and run robodev deploy. Hosted React builds set VITE_API_URL to empty and use window.location.origin. Local Vite (or any other frontend) can point at the same host.

Hosted on Robodev

  • index.html plus src/main.tsx (or .ts / .jsx / .js) is a React app. Starbase bundles it. index.html alone is a static site. No index.html is API-only. A page path that matches no route and no file gets index.html (status 200) so client-side routing works. A multi-page or server-rendered site can opt into its own not-found page instead: set "robodev": { "notFoundPage": "404.html" } in the root package.json (true means 404.html) and those paths get that file from the built frontend with status 404. Off by default, so a 404.html alone changes nothing.
  • Tiny apps/fe: robodev deploy with a .robodev frontend block runs the local Vite build and uploads that static site.
  • Blessed browser packages: react, react-dom, and @robodev-ai/client. User package.json scripts and vite.config are not run.
  • Swagger stays at /_robodev/docs so a React app can own /docs.

When the human wants the app served from Robodev, the Robodev MCP connector (https://robodev.povio.dev/mcp) can also publish the frontend with publish_frontend_files — a built dist, or React source using react, react-dom, react-router-dom and @robodev-ai/client; it replaces the live frontend and keeps the backend. The connector can also publish a prototype, a standalone static site outside the project, with deploy_artifact; see Artifacts (/docs/artifacts).

Robodev vs Supabase

  • Robodev: TypeScript robodev/database.ts plus robodev/api/*.ts, deployed with robodev deploy (locally, or from the project's GitHub Actions workflow). The browser talks with fetch and VITE_API_URL, or with @robodev-ai/client.
  • Not Supabase: no @supabase/supabase-js, no PostgREST .from(), no Postgres CDC / Supabase realtime, no RLS. App-defined WebSockets exist — see Sockets (/docs/sockets). File storage is Robodev storage via injected ctx.storage in defineApi, not the Supabase Storage API.
  • End-user login is Robodev Auth on the project host (Bearer tokens). See Auth (/docs/auth). It is not the Starbase dashboard login.
  • Discover routes from OpenAPI on the project host. Do not invent endpoints.

Routes default to public (auth: false). Anyone who knows the URL can call those. CORS allows all browser origins. For protected routes, send Authorization: Bearer <accessToken> from Robodev Auth. Do not invent a JWT or cookie session that the backend does not check.

Fetch and env contract

Set VITE_API_URL to the project API URL with no trailing slash (projectApiUrl in robodev/.robodev). robodev link writes this for the project. If the tool is not Vite, set its public env var to the same URL and read that name instead — the URL contract does not change.

fetch

function projectApiUrl(): string {
  const fromEnv = import.meta.env.VITE_API_URL;
  if (typeof fromEnv === "string" && fromEnv.trim()) return fromEnv.replace(/\/+$/, "");
  if (typeof window !== "undefined") return window.location.origin;
  return "";
}

async function request<T>(path: string, init?: RequestInit): Promise<T> {
  const apiUrl = projectApiUrl();
  const res = await fetch(`${apiUrl}${path}`, {
    ...init,
    headers: { "Content-Type": "application/json", ...init?.headers },
  });
  if (!res.ok) {
    throw new Error((await res.text()) || `${res.status} ${path}`);
  }
  return res.json() as Promise<T>;
}

const planets = await request<Planet[]>("/api/planets");
await request("/api/planets", {
  method: "POST",
  body: JSON.stringify({ name: "Mars" }),
});

// Protected route (GET /api/me):
const token = localStorage.getItem("accessToken");
const me = await request<{ user: { id: string; email: string } }>("/api/me", {
  headers: token ? { Authorization: `Bearer ${token}` } : {},
});

Optional @robodev-ai/client

Prefer the small browser client when you need signup, login, and Bearer attachment. It is not React hooks. Use api.get("/api/...") or api.fetch("/api/..."). Nested api.boards.list.get() is a path builder, not a typed SDK. File uploads go through your own defineApi handlers. How-to: Auth (/docs/auth) and Storage (/docs/storage).

React Native and Expo: pass createClient({ url, storage }) with a sync or async storage (AsyncStorage, an expo-secure-store adapter) and await api.auth.ready() before reading getToken() or opening a socket. Google sign-in uses api.auth.signIn.googleUrl({ redirectUri }) and api.auth.completeFromUrl(url). See React Native and Expo (/docs/dev#react-native).

client

import { createClient } from "@robodev-ai/client";

const api = createClient({ url: import.meta.env.VITE_API_URL });
await api.auth.signIn.email({ email, password });
const { user } = await api.auth.getUser();
const me = await api.get("/api/me");
const raw = await api.fetch("/api/me").then((r) => r.json());

Project hosts

  • Production API: https://{projectId}.robodev.povio.dev
  • OpenAPI: {VITE_API_URL}/openapi.json
  • Swagger UI: {project host}/_robodev/docs — not https://robodev.povio.dev/docs
  • Copy the API URL from the project page in Starbase, from robodev projects, or from robodev deploy output.

Next

Create a project at /projects/new → From GitHub template. Getting started is at /docs.