@suli-g/stratum
v0.2.0
Published
A layered React framework for building multi-system management applications.
Maintainers
Readme
Stratum
A layered React framework for building multi-system management applications.
Define the architecture once. Generate every new system with one command.
Setup
npm install
npm run devTesting
yarn test # run unit test suite
yarn test:watch # run tests in watch modeGenerator
npm run make:system <name>Scaffolds a complete management system and wires it into the app automatically.
Examples
npm run make:system orders
npm run make:system staff
npm run make:system delivery-zone # hyphenated → camelCase/PascalCaseEach run creates three files and patches three registries:
| Created | Purpose |
|---|---|
| src/model/<name>.js | Type definition + factory function |
| src/store/slices/<name>.js | Reducer + action type constants |
| src/views/<Name>/index.jsx | View component wired to the store |
| Patched | What changes |
|---|---|
| src/store/reducer.js | Import + delegation line added |
| src/store/initialState.js | Slice key added |
| src/views/tabs.js | Import + registry entry added |
The tab is live in the nav immediately. No other files change.
Individual commands
npm run make:model <name> # model file only
npm run make:slice <name> # slice file only
npm run make:view <name> # view folder onlyArchitecture
src/
├── util/ Pure functions. No React, no state.
├── model/ Data shapes and factory functions.
├── store/ useReducer + Context. All app state lives here.
│ └── slices/ One file per system. Generated by make:system.
└── views/ UI only. Reads store, dispatches actions.
└── shared/ Primitive components (Btn, Field, EmptyState…)Dependency rule — imports flow downward only:
views → store → model → utilNo layer may import from a layer above it.
