@mounaji_npm/core
v0.4.2
Published
Core runtime utilities for Mounaji apps: providers, bootstrap, layout guards, and module capability access.
Downloads
285
Maintainers
Readme
@mounaji_npm/core
Main core runtime package for Mounaji apps. Keeps foundational app plumbing together while preserving domain modularity.
@mounaji_npm/core is the runtime entrypoint for app setup concerns. If you install core, you should not need to install app-providers, app-bootstrap, layout-guards, module-registry-core, or module-gates separately unless you want to consume those packages directly.
Includes
@mounaji_npm/app-providers@mounaji_npm/app-bootstrap@mounaji_npm/layout-guards@mounaji_npm/module-registry-core@mounaji_npm/module-gates
Install
npm install @mounaji_npm/corePeer requirements:
reactreact-dom
Bundled runtime subdependencies:
@mounaji_npm/app-providers@mounaji_npm/app-bootstrap@mounaji_npm/layout-guards@mounaji_npm/module-registry-core@mounaji_npm/module-gates
Quick Start
import {
AppProviders,
useSystemAssistantsBootstrap,
useLayoutGuards,
CapabilitiesProvider,
PermissionGate,
} from '@mounaji_npm/core';
function Bootstrap({ user, showOnboarding }) {
useSystemAssistantsBootstrap({
user,
showOnboarding,
createInitializer: async () => ({
areSystemAssistantsInitialized: async () => true,
initializeSystemAssistants: async () => {},
}),
});
return null;
}
export default function App({ children }) {
return (
<AppProviders providers={[]}>
<CapabilitiesProvider
adapter={{
getCapabilitiesSnapshot: async () => ({
plan: 'pro',
permissions: ['members.view'],
features: [],
modules: {},
}),
}}
params={{ organizationId: 'org_1', userId: 'usr_1' }}
>
<Bootstrap user={{ id: 'usr_1' }} showOnboarding={false} />
<PermissionGate permissions={['members.view']} fallback={<div>Access denied</div>}>
{children}
</PermissionGate>
</CapabilitiesProvider>
</AppProviders>
);
}Scope
@mounaji_npm/core is intentionally limited to foundational runtime concerns.
Domain modules like auth, database, api-client, and organization-team stay independent.
Use core for app wiring and capability-aware runtime setup.
Use saas-template for the shell and module-driven app layout.
Use cli when you want to scaffold a new project from the terminal.
