Add per-plugin view resolver (todo §2); render plugins/<id>/views/<view>.ejs with nested names + traversal guard, core partials reachable via include()
This commit is contained in:
@@ -253,8 +253,9 @@ and reproducible; mount a volume only to add plugins to an already-built image.
|
||||
> it (id, `apiVersion`, conflicts) — runs at boot (`src/discovery.ts`); a bad plugin stops
|
||||
> startup with a precise message. The router (`src/router.ts`) then mounts each route at `/<id>`,
|
||||
> resolves `:name` params, runs the permission gate, and turns the handler's `RouteResult` into
|
||||
> the response. _(Planned, §2:)_ the per-plugin view resolver + static serving are next. The
|
||||
> mount mechanics above are how the files get into the container either way.
|
||||
> the response; a `view` result renders `plugins/<id>/views/<view>.ejs` (`src/view-resolver.ts`),
|
||||
> which may `include()` the core building-block partials. _(Planned, §2:)_ per-plugin static
|
||||
> serving is next. The mount mechanics above are how the files get into the container either way.
|
||||
|
||||
## The menu system _(planned)_
|
||||
|
||||
@@ -435,6 +436,7 @@ src/paginate.ts paginate(total,page,pageSize): page model (counts, row wind
|
||||
src/plugin.ts Plugin contract: manifest types, definePlugin(), version + conflict rules + fullPath()
|
||||
src/discovery.ts discoverPlugins(): scan plugins/, import + validate each plugin.ts default export, fail loud at boot (§2)
|
||||
src/router.ts matchRoute()/allowedMethods()/isAuthorized(): map method+path → plugin route, params, permission gate (§2)
|
||||
src/view-resolver.ts renderPluginView(): render plugins/<id>/views/<view>.ejs; plugin views can include() core partials (§2)
|
||||
views/ Core EJS templates (index = the app-shell People dashboard, 403/404/500, partials/ incl. app shell, nav tree, filter bar, data table, pagination, form field, auth card, menu/popover, theme switch, icon sprite)
|
||||
public/ Static assets under /public/ (css/styles.css + auth.css, favicon, robots.txt)
|
||||
config/menu.ts Central menu override + branding (planned)
|
||||
|
||||
Reference in New Issue
Block a user