task-d.7.9
This commit is contained in:
20
docs/setup/installation-profiles.md
Normal file
20
docs/setup/installation-profiles.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Installation Profiles
|
||||
|
||||
Installation profiles select setup plugins, wizard steps, required templates, verification checks, reset scopes, and reseed targets.
|
||||
|
||||
Current profiles:
|
||||
|
||||
- `crm_starter`: foundation plus CRM structure.
|
||||
- `crm_demo`: foundation plus CRM golden/demo dataset.
|
||||
- `production`: foundation plus CRM production setup, with destructive maintenance disabled by default.
|
||||
- `restore_backup`: minimal readiness and verification for restored environments.
|
||||
- `custom`: operator-selected setup modules and templates.
|
||||
|
||||
Profiles are resolved by `src/features/setup/plugins/plugin-registry.ts` and exposed by:
|
||||
|
||||
- `GET /api/setup/profiles`
|
||||
- `GET /api/setup/templates?profile=<profileId>`
|
||||
- `GET /api/setup/readiness?profile=<profileId>`
|
||||
- `POST /api/setup/verify` with optional `profileId`
|
||||
|
||||
The setup wizard uses the selected profile to render profile-aware plugin metadata and wizard steps.
|
||||
37
docs/setup/setup-plugin-development.md
Normal file
37
docs/setup/setup-plugin-development.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Setup Plugin Development
|
||||
|
||||
Setup plugins let modules extend setup without editing the setup wizard directly.
|
||||
|
||||
Plugin source lives under:
|
||||
|
||||
```text
|
||||
src/features/setup/plugins/
|
||||
```
|
||||
|
||||
Required plugin contract:
|
||||
|
||||
- plugin id and version
|
||||
- installation profiles
|
||||
- setup templates
|
||||
- wizard steps
|
||||
- readiness checks
|
||||
- verification checks
|
||||
- CSV preview validators
|
||||
- import handlers
|
||||
- reset scopes
|
||||
- reseed targets
|
||||
- golden dataset registration
|
||||
|
||||
Core plugins:
|
||||
|
||||
- `foundation`: setup platform foundations, state, seed manifests, reset framework, CSV framework
|
||||
- `crm`: CRM templates, CRM verification, CRM reset scopes, and CRM golden dataset
|
||||
|
||||
Future modules should add a plugin class and register it in `plugin-registry.ts`. They should not add one-off setup logic directly to the wizard.
|
||||
|
||||
Safety rules:
|
||||
|
||||
- Plugins cannot bypass Auth.js setup route protection.
|
||||
- Reset scopes must declare destructive behavior and affected tables.
|
||||
- CSV templates must declare ownership to avoid duplicate file contracts.
|
||||
- Seed tasks must be idempotent before execution is exposed.
|
||||
Reference in New Issue
Block a user