Repository navigation
Todo
Labels
enhancementNew feature or request
Description
Is your feature request related to a problem? Please describe.
- Some organisations want to install an application like any other app, from the app store or a ZIP, and update it by version.
Why this is needed
- Some organisations want an application installed like any other app, from the app store or a ZIP, with a version number and updates, and without users knowing it runs on Tables.
- buildiq parity: buildiq generates an installable app from a template; Tables lacks it (feature comparison, section 6). buildiq's export does not declare its OpenRegister dependency; ours declares Tables.
- Depends on the manifest export and import (Export an application as a manifest on api/2 #3450 and Import a manifest with a preview of the changes #3451); the plan puts manifest export before packaging. Drafts 43 and 44 and acceptance path 7 depend on it. M5 may move past the freeze as a whole.
Describe the solution you'd like
- Generate a Nextcloud app ZIP from an application: an app skeleton with the manifest inside, a repair step that imports the manifest through the Tables API on install, and a declared dependency on Tables.
Diagram
sequenceDiagram
actor M as Manager
participant G as generator (new)
participant API as api/2 manifest routes (#3450 and #3451)
participant N as Nextcloud
participant RS as repair step of the generated app
M->>G: generate app from an application
G->>API: export the manifest
G-->>M: app ZIP with id, name, version and the manifest, requires Tables
M->>N: install the ZIP
N->>RS: run on install
RS->>API: import the manifest
M->>N: update to a new version
N->>RS: run on update
RS->>API: import with the preview rules of #3451
Acceptance Criteria
- The generated app has its own id, name and version from the manifest.
- On install the repair step imports the manifest; on update it imports the new version with the preview rules of Import a manifest with a preview of the changes #3451.
- The app requires Tables 3.0 or later.
- The template of the generated app lives in the Tables repository.
- Generating needs the manage right on the application: The route declares its permission with
#[RequirePermission]using a fixed node type, and the service checks the same right before it writes; a test runs every write as a reader and expects 403 (or 404 where the reader may not know the object exists).
Out of scope
- Publishing to the app store and pushing to GitHub (deferred past the freeze).
- Own PHP or Vue code in the generated app: it only imports and mounts (A generated app opens its application in the Tables shell #3463).
- The CI install test: Install a generated app on a clean instance #3462.
- Proposed slicing: one PR for the template and the generator, then one for the repair step.
Describe alternatives you've considered
Questions for maintainers
- Who owns the application a repair step imports on install? (a) the admin who installs the app, (b) a user named in the app's settings, (c) no owner, shared to groups from the manifest. We would go with (a), with the existing transfer route to move it, because every application needs an owner today.
- On uninstall, what happens to the application and its data? (a) kept in Tables, (b) deleted. We would go with (a), as Nextcloud apps keep data on uninstall.
Additional context
Linking to other objects
- This issue creates a Nextcloud app that holds one application's manifest.
- Today an application has no reference URL and no link type; Link a row to objects in other apps: mails, Deck cards, files, rows of other tables #3468 names it
tables_application. Links stay inside Tables, so a generated app does not need its own link store. - What this issue must do so a generated app's objects can take part in linking later: keep the application, its tables and rows inside Tables, addressed by their ids like any other application (uuids appear only in the manifest the app ships), so links and references to them work the same whether the application was generated or built by hand. An update must not recreate rows or tables, or links to them break.
Relevant files:
Related issues
- build(main): bump to 3.0 for upcoming foundational changes, drop NC 33 #3310
- depends on drafts S5.1 1 and 2 (31 and 32)
Drafted with AI assistance from the project plan; @rjzondervan reviews it. Part of #3419.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity