@antelopejs/dms-frontend 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +40 -3
  2. package/package.json +4 -3
package/README.md CHANGED
@@ -6,7 +6,44 @@
6
6
  <a href="https://antelopejs.com"><img src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000" alt="Documentation"></a>
7
7
  </div>
8
8
 
9
- Official Vue 3, Vite, Inertia, and SSR frontend loader for AntelopeJS DMS. The `ajs dms` CLI generates a Vue workspace and runs its Node frontend server.
9
+ Frontend-agnostic loader for AntelopeJS DMS. The backend serves a frontend
10
+ manifest and the matching frontend-module archives; the `ajs dms` CLI
11
+ materializes them into a generated workspace for one renderer, builds it, and
12
+ runs its Node frontend server. The `vue` renderer — Vue 3, Vite, Inertia, and
13
+ SSR — is the one shipped today.
14
+
15
+ ## Renderers
16
+
17
+ A renderer is the target framework a generated workspace is built for. The
18
+ loader's contract with a renderer has three parts:
19
+
20
+ - **Manifest negotiation.** `prepare`, `dev`, and `build` request the versioned
21
+ `/dms/frontend` manifest with `renderer=vue&rendererVersion=3`
22
+ (`src/manifest.ts`) and reject every module whose `renderer` does not match.
23
+ The backend side is renderer-keyed too: `AddFrontendModule` takes a
24
+ `renderer: { name, version }`, and each manifest module carries it back
25
+ (`ManifestModule.renderer` in `src/workspace.ts`).
26
+ - **Workspace templates.** Every file of the generated workspace comes from
27
+ `templates/<renderer>/` — `templates/vue/` today. `TEMPLATE_FILES` in
28
+ `src/config.ts` lists what is copied verbatim, and `src/materialize.ts`
29
+ resolves the template root, copies it, materializes the frontend modules
30
+ under `frontend-modules/`, and writes `generated-frontend-modules.json` in
31
+ manifest-priority order.
32
+ - **Generated server.** `templates/vue/server.mjs` and `templates/vue/server/`
33
+ become the Node server that `ajs dms start` runs from the built workspace:
34
+ Inertia visits, backend proxying, sessions, and email rendering.
35
+
36
+ `vue` (version `3`) is the only renderer this package ships, and the loader
37
+ rejects a manifest that declares any other. Renderers for other frameworks —
38
+ React, Svelte, Solid — are a direction, not a promise: nothing in the package
39
+ implements them yet. Adding one means a new `templates/<renderer>/` tree, plus
40
+ making the template root (`src/materialize.ts`) and the manifest query
41
+ (`src/manifest.ts`) renderer-aware instead of hardcoding `vue`. There is no
42
+ `--renderer` flag and no renderer registry; the single-renderer assumption is
43
+ deliberate until a second renderer exists. Whatever a renderer names its module
44
+ entry is its own convention: `dms.frontend.ts` and the
45
+ `#dms-inertia/frontend-module` alias belong to the Vue renderer, not to the
46
+ loader.
10
47
 
11
48
  ## Application ownership
12
49
 
@@ -56,9 +93,9 @@ throttle stamp lives at `~/.antelopejs/dms-frontend/update-check.json`. Set
56
93
  `NO_UPDATE_NOTIFIER=1`, pass `--no-update-check`, or run under `CI` to turn the
57
94
  check off.
58
95
 
59
- The loader renders Vue 3 only: a manifest that declares any other renderer is rejected. `prepare`, `dev`, and `build` request the versioned `/dms/frontend` manifest with `renderer=vue&rendererVersion=3`. Modules are materialized under `frontend-modules/` and registered in deterministic manifest-priority order in `generated-frontend-modules.json`.
96
+ Manifest negotiation and module materialization are the renderer contract described in [Renderers](#renderers).
60
97
 
61
- The generated application uses `@inertiajs/vue3`, `@nuxt/ui/vite` with `{ router: "inertia" }`, and `@nuxt/ui/vue-plugin`. The Node server resolves each Inertia visit through `/dms/page?path=…`, including fresh shared data so account, tenant, and permission changes update navigation state. It proxies backend routes and manages authentication through server-side sessions. `DMS_BOOTSTRAP_SECRET` is used only by the CLI's server-to-server frontend manifest and module archive requests and is never sent by, or exposed to, browser traffic.
98
+ The generated Vue application uses `@inertiajs/vue3`, `@nuxt/ui/vite` with `{ router: "inertia" }`, and `@nuxt/ui/vue-plugin`. The Node server resolves each Inertia visit through `/dms/page?path=…`, including fresh shared data so account, tenant, and permission changes update navigation state. It proxies backend routes and manages authentication through server-side sessions. `DMS_BOOTSTRAP_SECRET` is used only by the CLI's server-to-server frontend manifest and module archive requests and is never sent by, or exposed to, browser traffic.
62
99
 
63
100
  Vue modules use `dms.frontend.ts` and the `#dms-inertia/frontend-module` SDK alias, which replaces the former `#cms-inertia` alias and is the import path every DMS frontend module now uses. Email templates register separately through `dms.email.ts`.
64
101
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-frontend",
3
- "version": "0.1.0",
4
- "description": "Vue 3, Vite, and Inertia frontend loader for AntelopeJS DMS",
3
+ "version": "0.1.1",
4
+ "description": "Frontend-agnostic loader for AntelopeJS DMS, shipping the Vue 3 renderer (Vite, Inertia, SSR)",
5
5
  "keywords": [
6
6
  "antelope",
7
7
  "antelopejs",
@@ -10,6 +10,7 @@
10
10
  "frontend-modules",
11
11
  "inertia",
12
12
  "loader",
13
+ "renderer",
13
14
  "ui",
14
15
  "vite",
15
16
  "vue"
@@ -81,7 +82,7 @@
81
82
  "vue-i18n": "^11.1.12"
82
83
  },
83
84
  "peerDependencies": {
84
- "@antelopejs/core": ">=1.5.0 <2"
85
+ "@antelopejs/core": ">=1.6.0 <2"
85
86
  },
86
87
  "peerDependenciesMeta": {
87
88
  "@antelopejs/core": {