@theshiftrtech/nestjs-panel
v0.1.0
Published
Decorator-driven NestJS admin panel — runtime module, SPA generator, and static serving by SHFTR
Maintainers
Readme
Install
npm install @theshiftrtech/nestjs-panelPeer dependencies (Nest 11, class-validator, class-transformer, etc.) must be present in your application — the package does not bundle Nest.
Quick start
# 1. Wire AdminPanelModule + adminPanelConfig (see PDF)
# 2. Annotate controllers with @PanelModule / @PanelApi / @PanelAction
# 3. Generate & run
npm run admin:generate
npm run start:devAdd to your package.json:
{
"scripts": {
"admin:generate": "nestjs-panel generate"
}
}| Resource | URL |
|----------|-----|
| Admin UI | http://localhost:<port>/<ADMIN_PANEL_PATH> |
| Login | POST /<apiPrefix>/admin-panel/login |
| Branding | GET /<apiPrefix>/admin-panel/config |
Integration
import { adminPanelConfig, AdminPanelModule, setupAdminPanel, AdminPanel, ADMIN_PANEL } from "@theshiftrtech/nestjs-panel";
// AppModule
ConfigModule.forRoot({ load: [appConfig, adminPanelConfig] }),
AdminPanelModule.forRootAsync(),
// main.ts
setupAdminPanel(app, new AdminPanel({ title: "Admin Panel", theme: { /* ... */ }, /* ...from env */ }), {
apiPrefix: appConfig.apiPrefix,
port: appConfig.port,
});Full step-by-step setup, env reference, decorator catalogue, and CLI docs are in the Usage Guide (PDF).
Documentation
| Doc | Description | |-----|-------------| | Usage Guide (PDF) | Complete integration handbook | | docs/usage-guide.html | PDF source |
