# AI App Builder with Managed Database and User Accounts

Canonical: https://uvilno.com/features/database-and-auth
Updated: 2026-11-13

Describe the data and visitor sign-in methods your application needs. Uvilno supports declared managed collections and app identities with configured email, Google, Discord and GitHub authentication. The generated interface renders the account experience. Managed authorization scopes records to the app and user, with an ecosystem realm for explicitly connected companion projects.

Create a free Uvilno account, name your project and review this brief. Generation starts when you send it.

[See the tested private-record example](https://uvilno.com/guides/repair-shop-portal-example)

## Name the records and their permissions

A useful collection definition includes actual fields, relationships and who can read or update each record. A personal task app should keep tasks private to their owner. A public catalog and a private order history need different scopes. The App Data manager helps the creator inspect managed collections, while the application SDK exposes only the account's authorized operations.

## Request the provider and verify its readiness

Ask for Google login explicitly when that is part of the experience. Provider availability, callback registration and email delivery are configuration requirements. A prompt cannot supply missing credentials. Confirm a real session after sign-in, test refresh and logout, and verify a different project or user cannot access the private data. The creator's Uvilno session and app visitor identity are separate.

## Verify a private task tracker with two visitors.

Use a sign-in screen, a task list and a task detail view. The task tracker gives you a concrete way to check a database save, a fresh read and an access refusal before adding more screens.

1. **Define the smallest usable app** — Prepare the editable brief. Use one private tasks collection with a required title and status options Todo, In progress and Done. Start with an empty collection. The managed service associates a record with its authenticated visitor, so the form does not submit an owner field.
2. **Sign in and confirm a saved row** — Resolve setup for the visitor login method you requested. Sign in as the first test visitor and create “Review proposal” with status Todo. Wait for the save to succeed, change the status to Done, then reload the app. Confirm the same task appears as Done in the list and its detail view. The creator can check the saved row in App Data.
3. **Try the same record from a separate session** — Keep the first session open and use another browser profile for the second test visitor. Confirm the second visitor has an empty task list. Open the first visitor's task detail URL and confirm the record is unavailable. Create an unrelated task as the second visitor and confirm that it stays out of the first visitor's list.
4. **Repeat on the published version** — After the saved version passes verification and its services are ready, enable its live URL in Publish Studio. Repeat sign-in, the acknowledged write and the second-visitor check on that origin. If the provider reports missing setup or a write fails, keep the input available and surface the error before inviting users.

### Reproduce the checks

**Observed in local database fixtures**

The local database fixture read independent private records for two visitors, preserved a deletion across schema resync, rejected a stale update and denied an attempted cross-user mutation. It also refused owner-level list access to an ordinary visitor.

**Verify on your deployment**

Check the generated interface, actual sign-in callbacks and a second visitor's detail URL. Those checks depend on the app you build and the providers configured for it.

Run with repository access:

```sh
pnpm --filter @wb/web exec vitest run src/server/workspace/entities-db.test.ts
```

## Continue this workflow

- [Run the two-account database and login test](https://uvilno.com/guides/test-ai-app-database-and-auth)
- [See a private booking record tested in a browser](https://uvilno.com/guides/repair-shop-portal-example)
- [Read the tasks schema and saved-write contract](https://uvilno.com/docs#database)
- [Choose a full-stack SaaS starting brief](https://uvilno.com/use-cases/saas-and-ai-tools)
- [Connect the same data to a mobile companion](https://uvilno.com/features/ecosystem-wire#workflow)

## Platform plan

| Platform | Generated experience |
| --- | --- |
| web | Account forms and a signed-in dashboard reading authorized records. |
| mobile | A compact account experience and the same managed data where linked. |
| desktop | An owner or staff workspace with explicit record-management permissions. |

## Declared collections

| Collection | Fields | Access |
| --- | --- | --- |
| tasks | title (required string), status (string option) | Self-only reads and writes for each signed-in app user. |
| profiles | display_name (string), notifications_enabled (boolean) | Optional private profile settings. Ownership is assigned by the service. |

## Acceptance checks

- Complete sign-in with each required configured provider.
- Reload, navigate and sign out while observing confirmed session state.
- Try the private record using a second user and verify access is refused.
- Check email confirmation and password recovery using actual delivery.

## Setup and launch boundaries

- Provider credentials, callback readiness and mail delivery must be configured where required.
- App sessions, creator sessions and preview presentation personas have distinct authority.
- Managed storage and authentication remain hosted dependencies after frontend source export.

## Editable starting brief

Build a private task tracker with a sign-in screen, a task list and task details. Use a configured visitor sign-in method. Declare one empty private tasks collection with a required string title and status options Todo, In progress and Done. Each visitor can only list, create and update their own records. Show loading, empty and save-error states, preserve form input after failure, and show the saved task only after the database acknowledges the write. Include sign-out. Verify that one task survives reload and that a second visitor cannot list or open it. Report missing provider setup and never simulate a successful login.

## Common questions

### Does saying Add Google login configure the provider automatically?

The request can select the capability and generated interface. Real sign-in still depends on provider readiness, credentials and a registered callback. Review the reported setup state and test a real login.

### Will exporting my app also export the managed identity service?

Frontend source unlock includes the authored application. Hosted database and identity services remain dependencies unless you separately migrate them or configure the documented deployment adapter.
