admin-config
/admin-config
Wire admin routes, configure browser-safe plugin imports, and create custom field renderers. Use when setting up momentumAdminRoutes, browserImports, or FieldRendererRegistry.
- Author
- DonaldMurillo ↗
- Repository
- momentum-cms ↗
- Licence
- MIT
- Last repository change
- 14.06.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 14.06.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Wire admin routes, configure browser-safe plugin imports, and create custom field renderers. Use when setting up momentumAdminRoutes, browserImports, or FieldRendererRegistry.
Arguments
/admin-config <routes|field-renderer|plugin-imports>
Original author description
Wire admin routes, configure browser-safe plugin imports, and create custom field renderers. Use when setting up momentumAdminRoutes, browserImports, or FieldRendererRegistry.
How it works
- Arguments
- Admin Config Generator
- Admin Icons
- Custom Field Renderers
SKILL.md preview
---
name: admin-config
description: Wire admin routes, configure browser-safe plugin imports, and create custom field renderers. Use when setting up momentumAdminRoutes, browserImports, or FieldRendererRegistry.
argument-hint: <routes|field-renderer|plugin-imports>
---
# Admin Config & Field Renderers
Reference for wiring admin routes, plugin browser imports, and custom field renderers.
## Arguments
- `$ARGUMENTS` - What to configure: `routes`, `field-renderer`, or `plugin-imports`
## Admin Config Generator
The admin config generator reads `momentum.config.ts` (server-side, Node) and outputs a browser-safe TypeScript file with proper imports. This eliminates manual wiring of collections, auth collections, and plugin routes in app routing.
### Usage in app routes
```typescript
import { momentumAdminRoutes } from '@momentumcms/admin';
import { adminConfig } from '../generated/momentum.config';
export const appRoutes: Route[] = [
...momentumAdminRoutes(adminConfig),
// app-specific routes...
];
```
### Plugin browserImports
Plugins declare browser-safe imports via `browserImports` on `MomentumPlugin`:
```typescript
browserImports: {
collections: { path: '@momentumcms/auth/collections', exportName: 'BASE_AUTH_COLLECTIONS' },
adminRoutes: { path: '@momentumcms/plugins/analytics/admin-routes', exportName: 'analyticsAdminRoutes' },
modifyCollections: { path: '@momentumcms/plugins/analytics/block-fields', exportName: 'injectBlockAnalyticsFields' },
}
```
### Component loaders in generated config
The generator emits `admin.components` (global) and per-collection `admin.components` as lazy-loading functions with rewritten import paths. This means `momentum.config.ts` is the single source of truth for page overrides and layout slots.
For swappable pages and layout slots, see `/admin-customize`.
## Admin Icons
All heroicons/outline (324 icons) are provided globally at the admin route level via `provideAdminIcons()` in `libs/admin/src/lib/icons/provide-admin-icons.ts`. This is wired into `momentumAdminRoutes()` automatically — no manual icon registration needed anywhere.
Collections and plugins just set their `icon` field to any `hero*` name (e.g., `'heroEnvelopeOpen'`). The type is `hero${string}` for basic autocomplete. E2E tests enforce every sidebar item renders an SVG.
## Custom Field Renderers
Field renderers are lazily loaded via `FieldRendererRegistry`. Built-in renderers are registered with `provideMomentumFieldRenderers()`.
### App setup (required)
```typescript
import { provideMomentumFieldRenderers } from '@momentumcms/admin';
export const appConfig: ApplicationConfig = {
providers: [provideMomentumFieldRenderers()],
};
```
### Adding a custom field type
```typescript
import { provideFieldRenderer } from '@momentumcms/admin';
export const appConfig: ApplicationConfig = {
providers: [
provideMomentumFieldRenderers(),
provideFieldRenderer('color', () =>
import('./renderers/color-field.component').then((m) => m.ColorFieldRenderer),
),
],
};
```
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · DonaldMurillo/momentum-cms | 95 | MIT |
| DonaldMurillo/momentum-cms | 95 | MIT |
Database snapshot: 13.11.2026 · package version 5922255f6890 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100system-config
Add admin store configuration to an existing module — system.xml section/group/field, config.xml defaults, ACL, optional source/backend models, plus a typed Config reader (ScopeConfigInterface wrapper with store-aware getters). Use for 'add a config field/toggle/API-key setting'… - 100react-admin
This skill should be used when building, modifying, or debugging a react-admin application — including creating resources, lists, forms, data fetching, authentication, relationships between entities, custom pages, or any CRUD admin interface built with react-admin. - 100medusa-admin
Extend the Medusa v2 admin dashboard — widgets injected at zones, custom UI routes, Medusa UI components, and Admin API integration. Use when customizing the admin interface. - 96admin-deploy
Use when deploying this admin project to a server or updating a server to a new commit.