API reference › @evolu/common › local‑first/Evolu › AppName

const AppName: brand(
  "AppName",
  UrlSafeString,
  (value) =>
    value.length <= 41 ? ok() : err<AppNameError>({ type: "AppName", value }),
  (error) =>
    `The value ${JSON.stringify(error.value)} is not between 1 and 41 characters.`,
);

Defined in: packages/common/src/local-first/Evolu.ts:499

Application name.

Evolu uses AppName as the base prefix for Evolu.name. The final stored database name is derived per AppOwner as ${appName}-${createIdFromString(appOwner.id)}. A memory instance uses the same prefix with a hash of its owner, a memory marker, and a random instance ID, so every instance gets its own name; see EvoluConfig.memoryOnly.

Uses the same safe alphabet as UrlSafeString (letters, digits, -, _) and must be between 1 and 41 characters.

Names that differ only in letter case, such as acme and Acme, name the same AppOwner databases where storage ignores case, as macOS's file system, WebKit's OPFS, and Windows do, so two such apps that use the same AppOwner share its data. Pick names that differ in more than case.

TODO(next major): Make AppName case-insensitive, such as by allowing only lowercase letters, so two names never differ only in case.