Scope
UI metadata so the host dashboard (Next.js + module federation) can render module sidebar entries and locate module remote bundles.
API additions to `mirrorstack.go`
```go
func NavItem(spec NavItemSpec)
func (m *Module) NavItem(spec NavItemSpec)
func WebBundle(url string) // module federation remoteEntry.js URL
func (m *Module) WebBundle(url string)
```
Registry types
```go
type NavItemSpec struct {
ID string `json:"id"`
Title string `json:"title"`
Path string `json:"path"`
Icon string `json:"icon,omitempty"`
ParentGroup string `json:"parentGroup,omitempty"`
Order int `json:"order,omitempty"`
}
```
Accumulator: `navItems []NavItemSpec`, `webBundle string` (set-once). Adders: `AddNavItem`, `SetWebBundle`.
Manifest changes
```go
UI ManifestUI `json:"ui"`
type ManifestUI struct {
NavItems []registry.NavItemSpec `json:"navItems"`
WebBundle string `json:"webBundle,omitempty"`
}
```
What is NOT included (deliberately)
- `ms.Page()` — pages auto-discovered from `web/platform/pages/**/page.tsx` by future `@mirrorstack/vite-plugin` (see `app-modules/app-mod-media/web/vite.config.ts` for today's manual federation exposes).
- `ms.Contribute()` — contributions auto-discovered from `web/platform/contributions//.tsx`.
Go SDK declares only what the frontend build can't infer: sidebar metadata + remote bundle URL.
Acceptance
Depends on
Part of the #14 orchestration work.
Scope
UI metadata so the host dashboard (Next.js + module federation) can render module sidebar entries and locate module remote bundles.
API additions to `mirrorstack.go`
```go
func NavItem(spec NavItemSpec)
func (m *Module) NavItem(spec NavItemSpec)
func WebBundle(url string) // module federation remoteEntry.js URL
func (m *Module) WebBundle(url string)
```
Registry types
```go
type NavItemSpec struct {
ID string `json:"id"`
Title string `json:"title"`
Path string `json:"path"`
Icon string `json:"icon,omitempty"`
ParentGroup string `json:"parentGroup,omitempty"`
Order int `json:"order,omitempty"`
}
```
Accumulator: `navItems []NavItemSpec`, `webBundle string` (set-once). Adders: `AddNavItem`, `SetWebBundle`.
Manifest changes
```go
UI ManifestUI `json:"ui"`
type ManifestUI struct {
NavItems []registry.NavItemSpec `json:"navItems"`
WebBundle string `json:"webBundle,omitempty"`
}
```
What is NOT included (deliberately)
Go SDK declares only what the frontend build can't infer: sidebar metadata + remote bundle URL.
Acceptance
Depends on
Part of the #14 orchestration work.