[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Evolu](https://evolu.dev/docs/api-reference/common/local-first/Evolu) › createEvoluApp

```ts
function createEvoluApp<
  S extends Readonly<
    Record<string, Readonly<Record<string, AnyStandardSchemaV1>>>
  >,
  D extends Readonly<
    Record<string, Readonly<Record<string, AnyStandardSchemaV1>>>
  > = EmptyEvoluSchema,
>(
  schema: ValidateSchema<S> extends never ? S : ValidateSchema<S>,
  config: EvoluAppConfig<D>,
): Task<
  EvoluApp<S, D>,
  UnknownError,
  CreateDbWorkerDep &
    CreateBroadcastChannelDep &
    CreateMessageChannelDep &
    DevicePersistenceDep &
    LockManagerDep &
    ReloadAppDep &
    Partial<ConsoleDep> &
    Partial<CreateMemoryInstanceWorkerDep> &
    Partial<FlushSyncDep> &
    Partial<RequestPersistentStorageDep> &
    StoredWorkerDep
>;
```

Defined in: [packages/common/src/local-first/Evolu.ts:2411](https://github.com/evoluhq/evolu/blob/aa223771feea747ffb1b0f5f3271574455633e37/packages/common/src/local-first/Evolu.ts#L2411)

Creates an [EvoluApp](https://evolu.dev/docs/api-reference/common/local-first/Evolu/interfaces/EvoluApp): Evolu creates and keeps the app's AppOwners in a
device database that [EvoluAppConfig.auth](https://evolu.dev/docs/api-reference/common/local-first/Evolu/interfaces/EvoluAppConfig#auth) unlocks, and opens an
instance of each AppOwner a tab opens. An app that brings its own AppOwners,
such as one deriving them from a hardware wallet, calls [createEvolu](https://evolu.dev/docs/api-reference/common/local-first/Evolu/functions/createEvolu)
instead. It fails with [UnknownError](https://evolu.dev/docs/api-reference/common/Error/variables/UnknownError) when SQLite fails to read the
AppOwners or the device database is refused, as
[EvoluErrorDep.evoluError](https://evolu.dev/docs/api-reference/common/local-first/Evolu/interfaces/EvoluErrorDep#evoluerror) reports too.

It stays pending while another build of the app keeps it waiting, and when
the shared worker fails to load on the web, which
[EvoluErrorDep.evoluError](https://evolu.dev/docs/api-reference/common/local-first/Evolu/interfaces/EvoluErrorDep#evoluerror) reports.

The Run that creates the app must outlive it, as a module-scope Run does:
after that Run ends, such as after a panic, the app's methods throw.

See docs/adr/evolu-creates-and-stores-app-owners.md.