@ossy/platform
v0.0.1-alpha.2
Published
Platform module: deployment platform config resource template and home UI for Ossy websites
Downloads
177
Readme
@ossy/platform
Ossy Platform module: resource template @ossy/platform/config (mirrors deployment-tools platform-config.json) and the platform home UI (PlatformHomeBody, metadata for routing).
Install
npm install @ossy/platformPeer dependencies (your app should already include them):
react@ossy/connected-components(forusePageShellon module pages)@ossy/design-system@ossy/router-react@ossy/sdk-react
Use in a website
- Spread
PlatformResourceTemplatesinto your appresourceTemplates(and sync to the API via publish / cms upload). - Add
@ossy/platformtomodulesinsrc/config.jssosrc/platform/home.page.jsis picked up (JSX-free so Rollup can parse.page.js;*.page.jsxworks undersrc/for other files if the bundler accepts JSX there). - Add
src/page-shell.jsx(or.js) that default-exports your site layout (e.g. ossy.se re-exportsLayout). Module pages callusePageShell()so they do not depend on site paths. - Register
Definitionin your navigation / module registry.
Surface in this package: *.page.* files may live anywhere under src/; resources are exported from the package root (PlatformResourceTemplates, constants). API routes and worker tasks can follow the same *.api.js / *.task.js conventions under the site src/ today; pulling those from installable modules can mirror modules later (e.g. shared discovery for APIs / worker tasks).
Publishing
Released on its own semver from this monorepo (lerna publish with independent versions). Bump @ossy/platform when only this module changes.
Direction
Long term, which modules a workspace may enable should be driven by the CMS and tied to billing / entitlements. Packages stay the distributable implementation of each module; access control lives in the product, not in npm scope alone.
