Your app.Our runtime.

Built for React that grows —

pages first, then APIs,

auth, and agents without

leaving the same project.

02 / Runtime

One directory.Full stack.

Copythecommandtogetstarted

Pages
app/
APIs
route.ts
Auth
sessions
Agents
stream
Typed procedures
  • createCaller
  • rsc → api
  • same app/
Runtime
  • SSR / RSC
  • middleware
  • one process
AI layer
  • vista/ai
  • tools + RAG
  • g agent

Same app.Same request.

Edit a route, hit Run, and read the JSON. Pages and handlers share one app/ tree — no second service folder for a route that only your UI needs.

Before

Separate frontend & backend

UI and API live in different projects. Run simulates the remote fetch.

frontend/src/pages/notes.tsx

Response

idle

// Edit a file, then Run to see the response.

After

Vista — one app/

Pages and routes share one directory. Edit a file and run it here.

app/api/notes/route.ts

Response

idle

// Edit a file, then Run to see the response.

Auth that ships.Fail closed.

vista g auth writes providers, sign-in, and middleware that denies /account without a session — not a package you bolt on later.

auth.ts

Auth
same app/

Decision

idle

// Edit auth or middleware, pick a path, then Run.

One agent.Same runtime.

Streaming agents and tools live beside your pages. Swap Groq, NIM, or OpenAI with one provider:model string — no second AI service.

app/agents/support/agent.ts

Agent
same app/

Stream

idle

// Edit the agent or route, enter a prompt, then Run.

Stay in one project as the product grows.

Vista is built for the path most apps actually take. You start with pages under app/. When you need a handler, it lives next to the screen that calls it. When you need a session, auth and fail-closed middleware ship from the same scaffold. When you need a model in the loop, agents and tools run on that same runtime — one provider:model string, not a second service folder.

The point is not to replace every tool you already know. It is to keep UI, APIs, auth, and AI in one directory so the request path stays obvious: edit a file, run it, ship it. Typed procedures, route handlers, and streaming agents share the process your React tree already lives in.

If you are still deciding where the backend should sit, start here. Create the app, grow the tree, and move a contract out later only when the product asks for it — not because the framework forced a split on day one.