Skip to content

Commit 593d43b

Browse files
xuyushun441-sysos-zhuangclaude
authored
feat(apps): split platform apps into one-app packages (ADR-0048) (#1813)
* feat(apps): scaffold @objectstack/studio app package (ADR-0048, boot-neutral) ADR-0048 "one app per package": Studio becomes its own ObjectStack package (`com.objectstack.studio`, namespace `studio`) so `/apps/<packageId>` resolves unambiguously instead of being lost inside plugin-auth's multi-app manifest. This commit is intentionally boot-neutral: - New package `packages/apps/studio` with a thin `StudioAppPlugin` that registers the Studio manifest; STUDIO_APP is still imported from platform-objects (transitional) and the package is NOT yet wired into the dev/serve plugin set. - Adds `packages/apps/*` to the pnpm workspace globs and `@objectstack/studio` to the changeset fixed group. Boot path (dev-plugin/serve.ts) and plugin-auth's manifest are untouched, so `os dev`/`os serve` behaviour is unchanged. The boot-path switch (wire the new package, drop the app from plugin-auth, move the AppSchema in) lands separately so it can be verified against a live boot. Builds clean (tsup CJS/ESM/DTS). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(apps): scaffold @objectstack/setup app package (ADR-0048, boot-neutral) Mirrors @objectstack/studio: Setup becomes its own package (`com.objectstack.setup`, namespace `setup`) carrying SETUP_APP and its baseline SETUP_NAV_CONTRIBUTIONS. Boot-neutral (transitional import from platform-objects; not yet wired into dev/serve). Added to the changeset fixed group. Builds clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(apps): reclaim @objectstack/account for console Account app; drop dead SPA (ADR-0048) Removes the deprecated standalone account-portal SPA (apps/account) and reclaims the @objectstack/account name for the console Account app as its own package (`com.objectstack.account`, namespace `account`). Boot-neutral skeleton (mirrors studio/setup): thin AccountAppPlugin, transitional import from platform-objects, not yet wired into dev/serve. CLI's vestigial workspace dep now resolves to the reclaimed package (no code imported the old SPA). Builds clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(apps): wire Setup/Studio/Account app packages into dev+serve; drop from plugin-auth (ADR-0048) ⚠️ BOOT-CRITICAL — verify with a live `os dev` (and `os serve`) boot before merge. Completes the ADR-0048 app split: - plugin-auth's manifest no longer registers `apps: [SETUP_APP, STUDIO_APP, ACCOUNT_APP]` nor `navigationContributions: SETUP_NAV_CONTRIBUTIONS`; it keeps only the auth objects + their detail pages. - dev-plugin.ts and cli `serve.ts` now register the three new app packages (best-effort dynamic import, skipped if not installed) right after AuthPlugin, so each app publishes under its own package id (com.objectstack.{setup,studio, account}) and `/apps/<packageId>` resolves unambiguously. - plugin-dev + cli declare the three app packages as workspace deps. The AppSchemas still physically live in @objectstack/platform-objects/apps (the new packages import them); moving the definitions in is a later non-behavioral cleanup. Verified statically: all packages build, plugin-dev/cli typecheck clean, plugin-auth (114) + platform-objects (55) tests pass. NOT runtime-boot-verified. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(apps): app plugins depend on AuthPlugin by plugin name, not package id (ADR-0048) Live `os dev` boot surfaced: `Dependency 'com.objectstack.plugin-auth' not found for plugin 'com.objectstack.setup'`. The kernel matches plugin `dependencies` by plugin NAME — AuthPlugin's name is `com.objectstack.auth`, while its package id is `com.objectstack.plugin-auth`. Point the class-level dependency at the plugin name (`com.objectstack.auth`); the manifest-level dependency stays the package id. Adds packages/cli/src/adr-0048-app-split.test.ts: boots a real ObjectQL engine, runs each app plugin's start(), asserts setup/studio/account register under their own package ids and coexist. VERIFIED end-to-end: `os dev` (app-showcase) boots clean and /api/v1/meta/app reports setup→com.objectstack.setup, studio→com.objectstack.studio, account→com.objectstack.account (previously all com.objectstack.plugin-auth). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 253b996 commit 593d43b

117 files changed

Lines changed: 808 additions & 15050 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@objectstack/account": minor
3+
---
4+
5+
feat(apps): reclaim `@objectstack/account` for the console Account app (ADR-0048)
6+
7+
Removes the deprecated standalone account-portal SPA (`apps/account`) and
8+
reclaims the `@objectstack/account` name for the console Account app as its own
9+
ObjectStack package (`com.objectstack.account`, namespace `account`) per
10+
ADR-0048 "one app per package". Boot-neutral skeleton (transitional import from
11+
platform-objects; not yet wired into the dev/serve plugin set — that switch
12+
lands in a follow-up verified against a live `os dev` boot).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@objectstack/setup": minor
3+
---
4+
5+
feat(apps): extract Setup into its own `@objectstack/setup` app package (ADR-0048)
6+
7+
ADR-0048 "one app per package": Setup gets a distinct package id
8+
(`com.objectstack.setup`) and namespace (`setup`), carrying both `SETUP_APP` and
9+
its baseline `SETUP_NAV_CONTRIBUTIONS`, so `/apps/<packageId>` resolves
10+
unambiguously. Boot-neutral skeleton (transitional import from platform-objects;
11+
not yet wired into the dev/serve plugin set — that switch lands in a follow-up
12+
verified against a live `os dev` boot).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@objectstack/studio": minor
3+
---
4+
5+
feat(apps): extract Studio into its own `@objectstack/studio` app package (ADR-0048)
6+
7+
ADR-0048 "one app per package": Studio gets a distinct package id
8+
(`com.objectstack.studio`) and namespace (`studio`) so `/apps/<packageId>`
9+
resolves unambiguously instead of being lost inside a multi-app package.
10+
11+
This change adds the package skeleton (`packages/apps/studio`) with a thin
12+
registration plugin. Transitional: `STUDIO_APP` is still imported from
13+
`@objectstack/platform-objects/apps`, and the package is not yet wired into the
14+
dev/serve plugin set — that boot-path switch (and dropping the app from
15+
`plugin-auth`'s manifest) lands in a follow-up so it can be verified against a
16+
live `os dev` boot.

.changeset/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
"@objectstack/observability",
2525
"@objectstack/formula",
2626
"@objectstack/platform-objects",
27+
"@objectstack/studio",
28+
"@objectstack/setup",
2729
"@objectstack/runtime",
2830
"@objectstack/rest",
2931
"@objectstack/driver-memory",

apps/account/CHANGELOG.md

Lines changed: 0 additions & 295 deletions
This file was deleted.

0 commit comments

Comments
 (0)