Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

feat(part-2): schemas + manifest + CnAppRoot - #2

Merged
rubenvdlinde merged 1 commit into
mainfrom
feature/part-2-schemas-manifest
May 11, 2026
Merged

feat(part-2): schemas + manifest + CnAppRoot#2
rubenvdlinde merged 1 commit into
mainfrom
feature/part-2-schemas-manifest

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Part 2 of the DeskDesk tutorial: wire the empty Part 1 shell to real data via OpenRegister + the @conduction/nextcloud-vue manifest renderer.

What's in

  • Schemas in lib/Settings/deskdesk_register.json: floor / desk / booking, plus a components.registers.deskdesk block and 5 desks / 2 floors / 3 bookings of seed data
  • Manifest in src/manifest.json: menu (Desks / Bookings / Floors) + pages (index + detail per schema) routed via CnPageRenderer
  • Frontend collapse: src/App.vue is now ~10 lines (just CnAppRoot); router/index.js generates routes from the manifest; navigation/MainMenu.vue + views/Dashboard.vue + views/items/* + views/settings/UserSettings.vue + views/settings/Settings.vue deleted
  • Store: registers floor / desk / booking with the shared object store on boot
  • SettingsService fix: switched from importFromApp() to importFromFilePath() with a properly Nextcloud-root-relative path

Verified

  • npm run build succeeds
  • POST /api/settings/load returns success and creates the deskdesk register (id 925) with all three schemas + seed objects
  • The manifest-driven shell renders: CnAppNav shows the three menu entries, CnPageRenderer dispatches index pages

Known follow-ups (not blockers)

  • The settings API returns the register slug, but CnIndexPage's store wants the numeric register id. The index pages currently render but show "No items found" until that resolution is wired in.
  • Translation keys (deskdesk.menu.desks etc.) need l10n entries; they render as raw keys for now.

Generated with Claude Code

Part 2 of the DeskDesk tutorial wires the empty Part 1 shell to real
data via OpenRegister + the @conduction/nextcloud-vue manifest renderer.

Schemas (lib/Settings/deskdesk_register.json):
  - floor      label + building + planImage
  - desk       label + floor (relation) + zone + equipment[] + capacity +
               accessibility + photo + notes
  - booking    desk (relation) + user + start + end + purpose + status +
               recurrence
  Plus a components.registers.deskdesk block + 5 desk / 2 floor / 3
  booking seed objects so the app is demoable on first install.

Manifest (src/manifest.json):
  - Three top-level menu entries (Desks / Bookings / Floors), order 10/20/30
  - Pages for index + detail of each schema, dispatched by CnPageRenderer
    by matching $route.name === page.id
  - dependencies: ['openregister'] so CnAppRoot's dependency-check phase
    fires when OpenRegister is missing

Frontend:
  - src/App.vue is now ~10 lines: <CnAppRoot :app-id :manifest />
  - src/router/index.js generates routes from manifest.pages, all pointing
    at CnPageRenderer. No hand-rolled views.
  - Deleted: navigation/MainMenu.vue, views/Dashboard.vue, views/items/*,
    views/settings/UserSettings.vue, views/settings/Settings.vue. Replaced
    by the manifest renderer.
  - src/store/store.js registers all three schemas with the shared object
    store on boot.

Backend:
  - SettingsService::loadConfiguration() now uses
    ConfigurationService::importFromFilePath() with the path resolved
    relative to /var/www/html (\OC::$SERVERROOT). The previous call was
    using the wrong importFromApp() signature.

Known follow-ups (not blockers for the tutorial):
  - The settings API still returns the register *slug* in `register`;
    CnIndexPage's store needs the numeric id. Wire that resolution in a
    follow-up so the index pages list seed data without a manual step.
  - Translation keys (deskdesk.menu.desks etc.) need l10n entries; for
    now they render as raw keys.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/deskdesk @ 51964b0

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm
PHPUnit ⏭️
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-05-10 20:12 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 8bc4e2d into main May 11, 2026
31 of 43 checks passed
@rubenvdlinde
rubenvdlinde deleted the feature/part-2-schemas-manifest branch May 11, 2026 06:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant