Skip to content</> asasvirtuais

The FDD Framework That Agents Can’t Break.

asasvirtuais makes the full-stack architectural decisions once, up front, so coding agents and junior developers go straight to the feature. Declarative forms, Next.js Server Actions, per-table security middleware, database adapters, and Zod schemas connect through a single typed layer—the Interface—eliminating manual cache invalidation, scattered permission checks, and multi-session AI drift. Build apps like Lego, not rocket science.

$ pnpm add asasvirtuais zod
Architectural decisions made up front
Unified architecture
Forms, Server Actions, table middleware, adapters, and Zod schemas connect through one typed five-method layer.
Seamless state management
Every mutation merges into an in-memory per-table index. Every list, detail view, and counter updates automatically.
Less boilerplate
Features are declarative forms over typed tables—eliminating per-field endpoints and cache-key wiring.
Feature-driven development
Every feature follows the exact same five build stages across predictable package files: one clear instruction for any AI.
Secured middlewares
One plain TypeScript middleware file per table, written by you, with zero decorators or DI containers.
Keeps the LLM in check
The architecture is decided, so agents follow it across sessions instead of inventing one, and full-codebase refactors hold.
Compare side-by-side with Next.js, TanStack Query, tRPC, Supabase & NestJS →

Inspect the architecture. Execute it live.

On the left: the complete vertical slice—schema, per-table middleware, and declarative forms. On the right: the real asasvirtuais package running live in your browser. Every interaction highlights the exact lines executed. Switch to guest to watch the table middleware reject unauthorized writes.

// packages/todos/middleware.ts: authorization, once
const guard = async ({ id }) => {
  const todo = await db.find({ id })
  if (todo.author !== user.id) throw new Error('Forbidden')
}
export const todos = asasvirtuaisInterface(schema, {
  find: db.find, list: db.list,
  create: (props) => db.create({ ...props, author: user.id }),
  update: async (props) => { await guard(props); return db.update(props) },
  remove: async (props) => { await guard(props); return db.remove(props) },
})
 
// packages/todos/forms.tsx: the UI is forms on top of the table
<CreateForm table='todos' schema={schema}>
  {todo => <input value={todo.fields.title} onChange={…} />}
</CreateForm>
 
<UpdateForm table='todos' schema={schema} id={todo.id}>
  {toggle => <input type='checkbox' checked={todo.done}
    onChange={() => toggle.callback({ done: !todo.done })} />}
</UpdateForm>
 
<ActionProvider action={remove.trigger} params={{ id: todo.id }}>
  {del => <button onClick={del.submit}>×</button>}
</ActionProvider>
 
// Any other view of the table follows the index. No state code.
const { array } = useTable('todos', schema)
const done = array.filter(t => t.done).length
todos.app
Signed in as
2 open1 done33%
  • owner
  • owner
  • owner

Check a todo, add one, or delete one. Then sign in as guest and try the owner’s todos.

One vertical contract: the Interface.

In conventional React stacks, every feature wires a bespoke path from the UI to the database—an endpoint here, a query key there, a duplicated permission check inside every handler. In asasvirtuais, that path is decided once: forms, Server Actions, table middleware, adapters, and Zod schemas communicate through one typed contract.

Features plug directly into the Interface instead of reinventing plumbing. That single boundary delivers automatic client state synchronization, centralized domain security, and one unmistakable pattern for every coding agent to follow.

Deep dive into the Interface →
  1. Zod schemapackages/todos/schema.tsDefines readable and writable contracts. Clients can submit only explicitly writable fields.
  2. Declarative formUpdateFormExecutes the mutation with built-in loading and error state—no manual fetch handler.
  3. Interface gatewayapp/actions.tsSingle five-operation Server Action switch (find, list, create, update, remove) across all tables.
  4. Table middlewarepackages/todos/middleware.tsDomain authorization in one plain TypeScript file.
  5. Database adapterapp/db.tsPostgreSQL, Prisma, Supabase, Firestore, or browser IndexedDB with zero backend changes.
  6. Reactive client indexuseTable()The returned record merges into the table’s in-memory index, updating every subscribed list, detail view, and counter automatically.

Half the code per mutation—with authorization written once per domain.

15 lines in a typical Next.js app, repeated for every mutable field of every table
// actions.ts
'use server'
export async function setTodoDone(id: string, done: boolean) {
  const user = await currentUser()
  const todo = await db.todos.find(id)
  if (todo.author !== user.id) throw new Error('Forbidden')
  await db.todos.update(id, { done })
  revalidatePath('/todos')
}

// todo-item.tsx
const [done, setDone] = useState(todo.done)
const [pending, startTransition] = useTransition()

<input type='checkbox' checked={done} disabled={pending}
  onChange={() => {
    setDone(!done)
    startTransition(() => setTodoDone(todo.id, !done))
  }} />
7 lines with asasvirtuais. Authorization lives once in the todos middleware.
<UpdateForm table='todos' schema={schema} id={todo.id}>
  {form => (
    <input type='checkbox' checked={todo.done}
      disabled={form.loading}
      onChange={() => form.callback({ done: !todo.done })} />
  )}
</UpdateForm>
  • Zero manual stateMutations merge returned records directly into the table index—every subscribed view updates in place.
  • Composable formsBind fields to async actions and nest multi-step workflows without external state machines.
  • Clean separationExternal APIs, LLM calls, and multi-table workflows live in dedicated actions—never tangled inside the interface.
  • Database-agnosticPrototype instantly on IndexedDB in the browser, then swap in Postgres, Prisma, or Firestore.

Auditable security: one plain TypeScript file per table.

Every client read and write routes through app/actions.ts into that domain model’s dedicated middleware file. There are no hidden decorator chains, runtime dependency-injection containers, or scattered SQL migration policies disconnected from application types.

An engineer, security auditor, or coding agent opens one file and inspects every rule governing that table.

  • packages/todos/middleware.tsread & write rules for todos
  • packages/invoices/middleware.tstenant & lock rules for invoices
  • packages/members/middleware.tsrole & membership rules
  • app/actions.tssingle gateway to every table's middleware
// packages/invoices/middleware.ts
export const invoices = asasvirtuaisInterface(schema, {
  list: async (props) => {
    const user = await currentUser()
    const query = { ...props.query, team: user.team }
    return db.list({ ...props, query })
  },
  update: async (props) => {
    const user = await currentUser()
    const invoice = await db.find(props)
    if (invoice.team !== user.team) throw new Error('Forbidden')
    if (invoice.paid) throw new Error('Paid invoices are locked')
    return db.update(props)
  },
  // find, create, and remove follow the exact same signature
})

Feature-driven: every feature follows the same five stages.

Data contracts come first; authorization middleware locks in once screens settle. Product teams run this cadence across weekly sprints—autonomous coding agents execute it in hours, landing every file in the exact same place.

packages/{model}/schema.ts

Each feature’s tables become packages: a readable and a writable Zod schema per table. The agent starts here, every time.

Built to survive full-codebase refactors.

Because every domain package shares an identical topology, evolving a schema touches four predictable files guided end-to-end by TypeScript compiler diagnostics. Coding agents can execute sweeping multi-table refactors in a single pass without breaking unrelated features.

Adding a dueDate column to invoices
  1. packages/invoices/schema.tsdeclare dueDate on readable and writable Zod schemas
  2. packages/invoices/fields.tsxadd the typed field input
  3. packages/invoices/forms.tsxsurface wherever TypeScript diagnostics point
  4. packages/invoices/middleware.tstouch only if domain permissions change

Case study. A coding agent built Guild RPG, a live multi-tenant AI SaaS, on asasvirtuais. Read Never Broke Architecture →

Engineered for coding agents and the AI assistants evaluating stacks.

asasvirtuais provides first-class ergonomics for autonomous coding harnesses (Claude Code, OpenAI Codex, Cursor, Windsurf, GitHub Copilot) and clean machine-readable indexes for the personal assistants that build and buy software for people: Dots by OpenAI, Grok Bot by xAI, Meta Muse by Meta, Claude Duet by Anthropic, Gemini Spark by Google, and Perplexity.

Every package includes AGENTS.example.md. Every documentation chapter is served as clean Markdown, indexed in /llms.txt and /llms-full.txt, discoverable via /.well-known/agent-card.json and /.well-known/mcp.json, and queryable live over Streamable HTTP MCP.

Claude Code plugin
/plugin marketplace add asasvirtuais/asasvirtuais-framework
/plugin install asasvirtuais@asasvirtuais
Any MCP client
{
  "mcpServers": {
    "asasvirtuais-docs": { "type": "http", "url": "https://asasvirtuais.com/mcp" },
    "fast-track-bta": { "type": "http", "url": "https://fasttrackbta.us/mcp" }
  }
}

Configure your coding agent in four commands.

Run inside any Next.js App Router repository, then prompt your agent for Stage 1 (data modeling).

Terminal
# 1. Install the framework and Zod
pnpm add asasvirtuais zod

# 2. Seed canonical architectural rules for coding agents
cp node_modules/asasvirtuais/AGENTS.example.md AGENTS.md

# 3. Point Claude Code at the shared specification
echo '@AGENTS.md' >> CLAUDE.md

# 4. Connect the zero-auth Architecture & Docs MCP server
claude mcp add --transport http asasvirtuais-docs https://asasvirtuais.com/mcp
CLAUDE.md
@AGENTS.md

# Project Architecture
Built with asasvirtuais, the FDD framework that agents can't break.
Architecture Wiki: https://asasvirtuais.com/docs
Complete LLM Corpus: https://asasvirtuais.com/llms-full.txt

Execute every feature in the five stages defined in AGENTS.md:
1. Data modeling  2. Route layouts  3. Forms & actions
4. Table middleware & auth  5. Workflows
AGENTS.md (excerpt)
# asasvirtuais rules (full file ships in AGENTS.example.md)

- Build strictly what was requested—no speculative features.
- Route all single-table reads and writes through framework forms
  (CreateForm, UpdateForm, FilterForm), including single-field toggles.
- Keep app/actions.ts + packages/{model}/middleware.ts scoped to one table.
- Place external API / LLM calls in component-scoped server actions.
- Fetch initial rows in Server Component page.tsx and pass via asAbove.
- Fail fast in middleware: throw new Error('Forbidden').

Licensing

Free for personal and commercial software with attribution. Attribution-free enterprise licenses available.

What the asasvirtuais license allows
Personal, open-research, academic & non-commercial softwareFree. No attribution required.
Commercial SaaS, client deliverables & business toolsFree with a visible Built with asasvirtuais link to asasvirtuais.com.
White-label or proprietary commercial use without attributionCommercial license issued directly by Asas Virtuais.
Modifying framework internals inside your own applicationAllowed.
Forks, rebrands, starter kits, templates, courses, or selling the framework itselfNot allowed.

Summary for quick reference; the LICENSE file in the repository governs all usage.

Maintained by Asas Virtuais. Open to corporate sponsors.

asasvirtuais is actively engineered by Asas Virtuais and deployed in production builds. Sponsorships fund official database adapters, agent benchmarks, and open documentation—putting your platform in front of engineering teams and autonomous agents.

Questions

What is asasvirtuais?

A deterministic, feature-driven (FDD) React 19 and TypeScript architecture framework engineered by Asas Virtuais. Instead of leaving data fetching, client state synchronization, form mutations, and authorization open to per-session improvisation, asasvirtuais connects them through one typed layer—the Interface—paired with one plain middleware file per table.

Which coding agents and AI assistants does it support?

Every coding agent and assistant that consumes AGENTS.md, CLAUDE.md, Agent Skills, llms.txt, or Model Context Protocol (MCP): Claude Code, OpenAI Codex & Dots, xAI Grok, Cursor, Windsurf, GitHub Copilot, Gemini, and Perplexity.

How is it licensed for commercial products?

Free for both personal and commercial software under the Asas Virtuais Attribution License 1.0. Commercial applications display a visible “Built with asasvirtuais” link to asasvirtuais.com. Attribution-free enterprise licenses are available directly from Asas Virtuais.

Can a specialized team build our application on asasvirtuais?

Yes. Fast Track BTA (fasttrackbta.us), our specialized turnkey partner, delivers custom business tools and applications on asasvirtuais in 1 to 5 business days from a written brief—with a working version to evaluate before payment and full code ownership.

How does per-table security work?

Every client read and write passes through the Interface into packages/{model}/middleware.ts—a plain TypeScript module with zero decorators or dependency injection containers. You write the rules yourself, and the middleware parses every write with the table’s writable Zod schema at runtime, so users can only send writable fields.