App Manifest Schema
Source: docs/reference/app-manifest-schema.md
App Manifest Schema
The app manifest is a JSON file that describes a Korporus application to the shell.
Full Schema
interface AppManifest {
/** Unique app identifier, kebab-case (e.g. "my-app") */
id: string;
/** Human-readable display name */
name: string;
/** URL to the app icon (SVG recommended) */
icon: string;
/** Semver version string */
version: string;
/** URL to the Module Federation remote entry */
remoteEntry: string;
/** Map of slot names to custom element tag names */
slots: {
menubar: string;
main: string;
settings?: string;
};
}Validation Rules
id: Must be a non-empty stringname: Must be a non-empty stringicon: Must be a non-empty stringversion: Must be a non-empty stringremoteEntry: Must be a non-empty stringslots: Must be an object with required keys["menubar", "main"]slots.settings: Optional app settings slot used by/app/{id}/settings- There is no
helpslot in v1. App help is rendered through the centralized Help app and shell Help menu contract. - Slot values must be non-empty strings (custom element tag names)
Example
{
"id": "hello-app",
"name": "Hello World",
"icon": "/manifests/hello-app-icon.svg",
"version": "1.0.0",
"remoteEntry": "/apps/hello/remoteEntry.js",
"slots": {
"menubar": "hello-app-menubar",
"main": "hello-app-main",
"settings": "hello-app-settings"
}
}TypeScript
Import the types from @korporus/app-manifest:
import { type AppManifest, parseManifest, validateManifest } from "@korporus/app-manifest";parseManifest(raw: unknown): AppManifest— Validates and returns a typed manifest. Throws on invalid input.validateManifest(raw: unknown): ValidationResult— Returns{ valid: boolean, errors: string[] }.