How app stores identify and namespace apps
Research for App sources + per-Instance installs that expose HTTP routes (see root CONTEXT.md).
Question: how do existing stores and package managers assign identity and avoid name collisions when the same display name (or slug) can appear from different sources?
Claims cite primary sources (official docs, policy manuals, first-party APIs). Directions for later grilling — not a final pick.
Executive recommendation (for grilling)
Separate three identifiers:
- Catalog / package identity — what a source lists and what updates bind to (often reverse-DNS or a short slug within that source).
- Install / instance identity — what this Instance uses for storage, Grants, and (preferably) HTTP path prefixes — opaque and collision-proof across sources.
- Display name — what humans see; never unique; never used as a security or routing key.
Nextcloud-style short app IDs that are the URL namespace work only when there is effectively one catalog namespace per Instance. With multiple App sources, that model collides. Android / Flatpak reverse-DNS reduce accidental collisions but still do not give you two installs of the “same” product ID from two remotes without pain. Chrome Web Store’s key-derived opaque ID is the closest prior for “guess-resistant install URL + stable update binding.”
Summary matrix
| System | Stable unique id | What the user sees | How updates bind | Collision / multi-source story | Lesson for us |
|---|---|---|---|---|---|
| Nextcloud | Short app id (info.xml <id> = folder name) |
Localized <name> |
Same id + new version in archive / store |
Id is global per server; store requires lowercase + underscores; routes use the id | Do not make cross-source catalog slugs the sole Instance HTTP namespace |
| Android / Play | applicationId (Java-package-like, ≥2 segments) |
App title / listing name | Same applicationId + signing certificate |
Play treats a changed id as a new app; id unique on device & store | Stable package id ≠ code namespace; lock id after publish |
| F-Droid | Same Android Application ID; metadata file named after it | Name in metadata / client UI | Rebuilds keyed by Application ID in fdroiddata |
Repo is one namespace of Application IDs | Catalog row key = platform id; mirrors Android |
| Flatpak | Reverse-DNS application ID (org.example.app) |
Desktop Name= / AppStream |
Same app id (ref) from a remote | Remotes are sources; same id from two remotes is not a supported dual-install | Reverse-DNS helps uniqueness; remotes ≠ install namespaces |
| Debian | Binary Package name unique within the Debian archive |
Package description / desktop name | Same package name + newer version | One archive namespace; other repos can still clash in the wild | Archive-scoped uniqueness, not world-unique |
| Arch / pacman | pkgname (short, lowercase) |
pkgdesc / upstream name |
Same pkgname in sync DBs |
Uniqueness expected per repo; AUR name clashes resolved by renaming | Short names need a repo boundary or human disambiguation |
| Chrome Web Store | Opaque extension item id (from signing / public key) | Store listing title | Same item id on the dashboard; updates cannot change id | Display names collide freely; id is crypto-derived | Opaque id for routing/API; separate human title |
Nextcloud (app store + server)
Stable id
The app ID is the unique identifier. Developers choose it; it must be lowercase letters, numbers, and underscores. Folder name and <id> in appinfo/info.xml must match or the app will not load (Nextcloud Developer Manual — Glossary: App ID; App store developer docs — id).
App-store upload rules: archive has one top-level folder of lowercase ASCII + underscores; id must match that folder and “will be used to identify the app” (same developer docs).
What users see
<name> in info.xml (localizable) — independent of the id (Glossary; info.xml examples).
Updates / install binding
Enable/disable and migrations key off the app id (occ app:enable notebook, etc.) (Glossary). New releases keep the same <id> and bump <version>.
HTTP / routing
Route names are appid.controller.method (e.g. mynotebook.page.index); URLs live under the app’s path space (docs example: /apps/notebook/) (Glossary — Route). The id is the namespace for discovery, occ, and URLs on that Instance.
Multi-source / collision
There is no separate “source ⊗ slug” compound key in the server model: one id owns the install slot. Two publishers shipping calendar cannot both install cleanly under that id. The official store’s id charset is the coordination mechanism — first-come / human review — not cryptographic uniqueness.
Lesson
Nextcloud optimizes for one short, guessable, URL-facing id. That matches a single default catalog. It fights multi-source installs and non-guessable API prefixes.
Android applicationId + Google Play
Stable id
Every app has an application ID shaped like a Java package (com.example.myapp). It uniquely identifies the app on the device and in the Play Store (Configure the app module).
Rules: ≥2 dot-separated segments; each segment starts with a letter; [a-zA-Z0-9_] only (same page).
Display vs code namespace
Listing title is separate. Gradle namespace (R class / code package) may differ from applicationId; the merged manifest package attribute becomes the application ID — “where the Google Play Store and the Android platform actually look to identify your app” (same page).
Updates
Never change the application ID after publish — Play treats a changed id as a different app. Updates require the same application ID and signing certificate (same page; Prepare your app for release).
Play Console also registers package names to developer accounts; creating an app fails if another developer already uses that name (Register on Google Play Console).
Lesson
Reverse-DNS claims a global-ish namespace via convention + store registry. Signing binds the update channel. Still: one id → one install identity on the device; not “source A’s notes vs source B’s notes” as parallel apps unless they chose different applicationIds.
F-Droid
Stable id
F-Droid uses the Android Application ID. Build metadata files in fdroiddata are named metadata/<ApplicationID>.yml (example: org.fdroid.fdroid.yml) (Submitting to F-Droid Quick Start Guide; All our APIs).
Updates
fdroidserver processes that metadata; verification and indexes key off the package / Application ID (All our APIs).
Lesson
A third-party catalog can reuse the platform’s stable id as the catalog primary key. For personal-cloud, either invent a Host-level package id or adopt a reverse-DNS (or signed) id that sources must publish — do not invent a second competing short slug that disagrees with the package.
Flatpak
Stable id
Flatpak requires a unique application ID in reverse-DNS form (org.example.app), following D-Bus well-known bus name conventions; the id prefixes exported desktop files, icons, MetaInfo, etc. (Requirements & Conventions — Application IDs; Manifests).
Docs stress controlling the DNS domain used in the id; hosted projects should use io.github… / io.gitlab…, not com.github… (same conventions page).
What users see
Desktop file Name= and AppStream MetaInfo — not the reverse-DNS string (Desktop files / MetaInfo).
Remotes vs identity
Install UX is often flatpak install REMOTE REF — the remote selects the source, but the app id is still the install identity. Installing the same application ID from multiple vendors is not a supported dual-install; workarounds (user vs system install, renaming app dirs) are explicitly unsupported (flatpak#2820). Community discussion notes that reverse-DNS is convention, not a hard guarantee of uniqueness across remotes (flatpak#1258).
Lesson
Source (remote) ≠ namespace for installs. If personal-cloud allows multiple App sources, either (a) require globally unique package ids (Flatpak-style) and forbid two sources from shipping the same id, or (b) namespace installs by (source, package id) / opaque install id so collisions are impossible.
Debian (and rpm-class relatives)
Stable id
Every binary package has a Package name that must be unique within the Debian archive (Debian Policy — Binary packages §3.1).
Name syntax (source and binary): lowercase letters, digits, +, -, .; ≥2 characters; must start alphanumeric (Debian Policy — control fields: Package / Source).
Updates
Same package name, newer version in the archive. Uniqueness of versions also applies across history in the archive (§3.1).
Lesson
Uniqueness is registry-scoped (the archive), not cryptographically global. Multiple third-party apt sources can still publish clashing names — the admin’s chosen sources define the conflict domain. Same shape as personal-cloud’s admin-addable App sources.
Arch Linux / pacman
Stable id
pkgname in the PKGBUILD: lowercase alphanumerics plus @._+-; must not start with - or . (PKGBUILD — pkgname; Arch package guidelines — Package naming).
Collisions
Official repos and the AUR expect one package per name in that namespace; when two unrelated upstreams want the same name, maintainers rename (e.g. more descriptive pkgname) rather than compound (repo, name) install ids (aur-general discussion on conflicting names — social process, not a technical compound key).
Lesson
Short human pkgnames need either a curated single namespace or explicit conflict handling. Fine for pacman; weak for “same slug from two App sources” without an Instance-level disambiguator.
Chrome Web Store (browser extensions)
Stable id
The store’s item id is a unique string identifying the extension (Chrome Web Store API — itemId / id / API v1 items). For development, the manifest "key" field (public key) keeps a consistent extension ID tied to that key material (Manifest — key).
What users see
Store listing title / name — independent of the opaque id.
Updates
Dashboard item id is stable; development docs emphasize preserving one ID so origins, messaging, and web_accessible_resources keep working (Manifest — key). Community/API practice: first upload establishes the id; subsequent updates do not reassign it.
Lesson
Opaque, key-derived ids separate marketing names from install identity and yield non-guessable URL-ish identifiers. Strong prior for Instance install ids and API prefixes when Apps may be hostile or when multiple sources exist.
Directions for Decide App instance identity and API namespacing
- Do not copy Nextcloud’s “short app id = HTTP prefix” as the only identity if multiple App sources are first-class (already locked in distribution).
- Prefer a catalog identity published by the source (reverse-DNS or
source_id + package_id) for browse/update binding and signatures. - Prefer an opaque per-install id (nanoid / ULID / key-derived) for Instance storage, Grants, and default HTTP API prefixes — Chrome-like, not Nextcloud-like.
- Keep display names non-unique; disambiguate in UI with source + version when needed (Flatpak remote picker energy).
- Decide explicitly whether two sources may advertise the same catalog package id (Flatpak: painful) or whether the Host rejects / namespaces them (Debian-archive discipline per source, compound key at install time).
- Standardized External protocol paths (CardDAV/CalDAV) should stay Grant/View-scoped, not App-slug-scoped — so opaque App API prefixes do not fight fixed protocol URLs.