The interface.
The contract behind it.

Public documentation for the runtime installed in supported Uvilno-generated apps. Updated October 27, 2026. These are SDK examples, not a customer's unlocked project source.

A declared schema, shared by every page

The generated project declares typed collections in data/schema.json. Supported fields are string, number, boolean, date and reference; references name another declared collection. Required fields, nullable values and string options are validated on the server. The saved website version pins the applied schema.

Private collections follow the real project visitor identity. A deliberately public_read collection permits shared catalog reading; it does not make every visitor-created private row public. Start real orders, bookings and leads empty. Fictional demonstration collections require 8–15 records with a disclosure. Do not store sensitive clinical or payment-card data in a starter app.

data/schema.json
{
  "version": 1,
  "collections": [
    {
      "name": "tasks",
      "label": "Tasks",
      "access": "private",
      "fields": {
        "title": {
          "type": "string",
          "required": true
        },
        "status": {
          "type": "string",
          "options": [
            "Todo",
            "In progress",
            "Done"
          ]
        },
        "estimate": {
          "type": "number",
          "nullable": true
        }
      },
      "seed": []
    },
    {
      "name": "activity_logs",
      "label": "Activity logs",
      "access": "private",
      "fields": {
        "message": {
          "type": "string",
          "required": true
        }
      },
      "seed": []
    }
  ],
  "automations": [
    {
      "id": "task_created",
      "label": "Record task creation",
      "on": {
        "collection": "tasks",
        "operation": "create"
      },
      "actions": [
        {
          "type": "create",
          "collection": "activity_logs",
          "values": {
            "message": {
              "field": "title"
            }
          }
        },
        {
          "type": "notify",
          "message": "Task saved"
        }
      ]
    }
  ]
}

Uvilno.db: CRUD with acknowledged writes

The controller installs window.Uvilno and window.AppDB into supported generated applications. Uvilno.db(collection) returns a table client. list accepts filter, sort, search, limit and offset; get returns one record or null. create and update return the saved record; remove returns a boolean. Every remote write is project-scoped and validated against the installed schema.

The SDK can show optimistic updates, but a successful server acknowledgment establishes persistence. Failed writes roll the local view back and reject the promise. Catch errors, preserve the user's input and offer retry. A device cache is not evidence of a successful database save.

JavaScript
const tasks = Uvilno.db("tasks");
const rows = await tasks.list({
  filter: { status: "Todo" },
  sort: { field: "title", direction: "asc" },
  search: "proposal", limit: 25, offset: 0
});
const saved = await tasks.create({ title: "Review proposal", status: "Todo", estimate: 2 });
await tasks.update(saved.id, { status: "Done" });
const record = await tasks.get(saved.id);
await tasks.remove(saved.id);

Subscriptions and App Data

subscribe(listener, query?) sends refreshed rows to the listener, refreshes after local writes and polls every four seconds while active for other changes. It returns a cleanup function. This is a polling subscription, not a WebSocket guarantee. Derive tables, totals and charts from the same returned rows rather than keeping a disconnected second dataset.

The creator opens App Data beside Inspect & Edit to inspect actual collection rows, search, create, edit and delete supported records. The owner view refreshes while open and respects revision conflicts. It does not expose locked source or make a generated visitor an administrator.

JavaScript
const unsubscribe = Uvilno.db("tasks").subscribe(
  rows => renderTaskList(rows),
  { sort: { field: "title", direction: "asc" }, limit: 50 }
);
// Call when the view is removed.
unsubscribe();
document.addEventListener("uvilno:db-error", event => {
  showDataError(event.detail.message);
});

Project accounts are separate from the builder

Uvilno.auth.user() returns the current project visitor or null. signIn accepts a configured Google, GitHub or Discord provider, or email/password credentials. register requires an explicit terms decision and may require email confirmation. signOut clears the app identity, not the creator's Uvilno account. The project service controls the session; generated code never receives provider secrets or the platform's service-role key.

The Guest/Member/Admin preview control changes presentation only. auth.role(), auth.setRole() and data-role sections help inspect layouts; they cannot grant database permissions, mutate the real identity or implement a multi-tenant authorization policy. The owner-preview helper is unavailable as a role-grant mechanism on exported apps.

JavaScript
await Uvilno.auth.signIn("google");
// Or use credentials entered through a labelled form:
await Uvilno.auth.signIn({ email, password });
const currentVisitor = Uvilno.auth.user();
const stop = Uvilno.auth.onChange(visitor => renderAccount(visitor));
await Uvilno.auth.signOut();
stop();

Actual in-app inference, with explicit limits

When the managed AI connector is enabled, Uvilno.ai.ask(prompt, {system?, temperature?}) returns actual text. Uvilno.ai.json(prompt, schemaDescription) returns a parsed object or array. The server requires an isolated app identity and enabled connector, charges the creator's metered studio allowance and limits each response to 600 output tokens. Input, deadline and visitor/IP/project/owner admission limits also apply.

The JSON description guides the model; it is not a general JSON Schema validator. Validate the returned domain fields before rendering or saving them. Handle invalid results, quota failures and network errors explicitly. Never present a canned success message as live inference.

JavaScript
const explanation = await Uvilno.ai.ask(
  "Summarize the supplied meeting notes in three short actions.",
  { system: "Use only supplied facts.", temperature: 0.2 }
);
const result = await Uvilno.ai.json(
  "Return one short study suggestion for the supplied topic.",
  "An object with a suggestion string, at most 160 characters."
);
if (!result || typeof result.suggestion !== "string") {
  throw new Error("The result needs a valid suggestion.");
}

Transactional rules, local observers

schema.automations declares bounded create/update/remove triggers. Approved actions can create a record, update a related record, increment a number or persist an in-app notification. Actions share the record transaction and ownership scope. A failed action rolls the write back; idempotent replays cannot duplicate effects. Actions do not recursively invoke rules, execute arbitrary code, call URLs, send email or grant roles.

Uvilno.automations.register and subscribe observe acknowledged browser mutations and return cleanup functions. Reliable server actions belong in the validated schema, not a browser callback. rules() returns installed rule metadata; logs() returns approved persisted activity. App Data → Automations & Logs is the owner's inspection surface.

JavaScript
const stop = Uvilno.automations.register(
  { collection: "tasks", operation: "create" },
  event => refreshActivityBadge(event)
);
const rules = await Uvilno.automations.rules();
const events = await Uvilno.automations.logs();
stop();

Local media and test Checkout

Uvilno.storage saves supported generated-app media on the visitor's device. It is distinct from the creator's uploaded project assets and from cloud file storage. Device-local blobs are not a durable team document store, and a local browser permission or storage limit may prevent saving.

Uvilno.payments.checkout() opens the configured managed Checkout flow; payments.testMode is true in this release. Stripe Connect authorization and onboarding are explicit. A test receipt is not a real payment, payout or shipment. Before a live commerce release, review provider configuration, webhook handling, tax, fulfillment and data authorization.

JavaScript
const localFile = await Uvilno.storage.save(fileFromInput);
// The file remains on this visitor’s device.
if (Uvilno.payments.testMode) {
  showTestModeNotice();
}
Uvilno.payments.checkout();

Target the next edit

In the Builder composer, type @ and choose an owned page/file, collection or inspected element. Actual examples are @index.html, @js/app.js, @db:tasks and @selected-element. References become removable pills; Arrow keys and Enter select, Escape dismisses. The owned context response includes paths and collection labels, not locked source or customer records.

The server validates those references against the saved version, then combines the private repository map with bounded affected-file context. Mapped direct text, link and color changes in Inspect & Edit use no model allowance. A targeted AI instruction is a normal generation request. Neither context mentions nor the repo map guarantee a fixed edit time.

Observe, verify and recover

A controller-authored probe checks boot exceptions, broken images, invalid routes, overflow and data hydration. Observations are bounded metadata, not private page values or source. They can accompany the next edit, but a browser message cannot establish a verified build or bypass authorization.

A separately limited, platform-funded repair can reproduce a native static-project runtime crash, change at most two relevant files using one free-model response, and browser-check before saving. Existing Next.js verification remains separate. Failed checks preserve the saved version. There is no universal no-error or unlimited free-repair promise.

Own source; account for services

The $4.99 one-time project unlock permits source inspection, download and supported GitHub source push. Plus, Pro and Ultra have their existing source entitlements. GitHub import, push and pull require explicit repository authorization; do not promise two-way sync with an unconnected account.

Source exports include the applicable frontend runtime, declared schema, referenced assets, fonts and licenses. They do not contain private customer records, provider credentials or an independent hosted backend. Exported authentication requires registering the final HTTPS origin, and managed data/auth/AI/payments remain Uvilno-hosted dependencies unless migrated or replaced. Website version rollback does not roll back customer data.

Common implementation questions.

Does the SDK give me an independent backend in my exported ZIP?

No. Source exports include the frontend runtime and declared schema, while managed authentication, data, AI and payments remain hosted services unless you migrate or replace them. Private records and provider credentials are not included.

Does setting the preview role to Admin grant real permissions?

No. Preview roles change presentation only. Actual data permissions follow the isolated signed-in project visitor and server checks.

Does app AI use my studio allowance?

Yes. Actual Uvilno.ai requests use the creator's metered allowance, with a 600-output-token response ceiling and additional admission limits.

Check the architecture. Compare the tradeoffs.

Follow the data model, account boundary and source handoff before choosing a builder.