@ortha/admin-home
v0.0.4
Published
Home/dashboard UI plugin — provides the root authenticated layout and landing page for the Ortha admin application. This is a foundational plugin that most feature plugins depend on.
Readme
@ortha/admin-home
Home/dashboard UI plugin — provides the root authenticated layout and landing page for the Ortha admin application. This is a foundational plugin that most feature plugins depend on.
Installation
Internal monorepo dependency — import directly:
import { homePlugin } from '@ortha/admin-home';Usage
Registering the plugin
import { bootstrap } from '@ortha/admin-platform-bootstrap';
import { homePlugin } from '@ortha/admin-home';
bootstrap(document.getElementById('root')!, [
homePlugin()
// ...other plugins that depend on 'home'
]);Depending on the home plugin
Other feature plugins declare a dependency to use the home layout as their parent route:
const myPlugin = (): AdminPlugin =>
Object.freeze({
id: 'my-feature',
name: 'My Feature',
dependencies: ['home'],
setup(ctx) {
ctx.router.addRoute({
path: '/my-feature',
component: MyFeaturePage
});
}
});Routes
| Path | Page | Description |
| ---- | ----------------------- | ----------------------------- |
| / | Root layout + dashboard | Wraps all authenticated pages |
API Reference
| Export | Kind | Description |
| -------------- | ------- | ------------------------------------------ |
| homePlugin() | factory | Admin plugin — registers root layout route |
Layout Structure
The home layout provides:
- Top navigation bar — renders
SlotRendererforSLOT_TOPBAR_NAV_MAIN_ACTIONS - Sidebar — application navigation
- Content area — renders child routes via
<Outlet />
Internal Structure
src/lib/
└── homePlugin/index.ts # Plugin factory with layout route registrationKey Patterns
- This is a foundational plugin — most feature plugins declare
dependencies: ['home']. - The layout renders
SlotRendererforSLOT_TOPBAR_NAV_MAIN_ACTIONSfrom@ortha/admin-platform-core. - No external API calls — purely layout and navigation infrastructure.
Dependencies
@ortha/admin-platform-core—SlotRenderer,SLOT_TOPBAR_NAV_MAIN_ACTIONS,ProtectedRoute@ortha/admin-platform-plugin-registry— plugin types@ortha/design-system— theme and UI components
Building
nx build admin-home