Examples
Examples show how the template pieces fit together.
Manifest Composition
Each feature's *.manifest.ts is the single source for nav, routes, route metadata, and permissions. src/modules/examples/examples.manifest.ts uses mountModuleManifest to mount those definitions under /examples/* without mutation, then uses composeModuleManifest to build the Examples tree.
src/modules/examples/examples.registration.ts owns the Examples default entry and legacy compatibility redirects. src/modules/module-registry.ts is app-local composition, while src/modules/app-module-registry.ts contains generic validation. When promoting Users into a real top-level business module, reuse usersManifest instead of copying route/nav objects. The registry rejects duplicate module IDs, top-level nav paths, route paths, route names, and conflicting redirects.
Remove Examples Completely
For a new project, prefer having the CLI apply the complete pruning:
pnpm dlx create-super-admin@latest my-admin --theme base --no-examples --pm pnpm--no-examples removes the source, registration, dependency, and AI-context surfaces listed below together, and cannot be combined with --charts echarts. Use the manual recipe for projects that have already been generated or customized.
Remove the following as one feature slice:
- Delete
src/modules/examples/,src/modules/access/,src/modules/dashboard/,src/modules/users/, andsrc/modules/workbench/. - Delete the corresponding
src/api/access.api.ts,dashboard.api.ts,users.api.ts, andworkbench.api.tsfiles, plus their matching mock files undersrc/api/mock/. - Remove the
examplesRegistrationimport and registration entry fromsrc/modules/module-registry.ts. Do not add replacement fallbacks to the router, auth guard, or workspace components. - Update
ai-context/extension-points.md: removesrc/modules/examples/examples.manifest.ts,src/modules/examples/examples.registration.ts, and the “Remove Examples” task guidance, then record that Examples were omitted so AI context cannot point to deleted files. - If ECharts was generated, also remove
src/modules/charts/,src/shared/charts/, theechartsandvue-echartsdependencies, andai-context/charts.md; remove that context import fromAGENTS.mdand set the chart provider insuper-admin.config.tsback tonone. - Run
pnpm checkin a standard project. In a minimal project, runpnpm typecheck && pnpm build.
The default entry is derived from the remaining registrations. Keeping UI Kit routes the app to /ui-kit/foundations; registering no modules uses /workspace. Removing the Examples registration also intentionally removes legacy paths such as /dashboard and /users*.
Template Guide
Open the admin app and visit:
/examples/template-guideThis page maps the current replacement seams:
- mock API data
- API adapters
- module queries
- module frontend types
- adapter-only replacement
- full module reshape
Dashboard
/examples/dashboard shows a metric and activity surface backed by a Dashboard API adapter.
Workbench
/examples/workbench shows operational job cards and queue states.
Users
/examples/users/all shows a richer CRUD-style table with filters, pagination, drawer forms, and mock API scenarios.
Access
/examples/access shows frontend-level permission metadata. It does not require a real auth backend.
Charts
/examples/charts is the optional ECharts template page. Generated projects include this page under Examples and install echarts plus vue-echarts only when ECharts is selected during setup or --charts echarts is passed.
UI Kit
/ui-kit/foundations and related UI Kit routes demonstrate reusable admin primitives from packages/ui.
Use UI Kit for primitives. Use Examples for module composition.