@@ -29,43 +29,52 @@ npm run commit # Interactive conventional commit (commitizen)
2929## Architecture
3030
3131### Injectable Wrappers Pattern
32+
3233Core ` @hypertrace/hyperdash ` classes are wrapped as Angular injectable services following the pattern ` [ClassName]Service ` :
34+
3335- ` DashboardManagerService ` , ` ModelManagerService ` , ` ThemeManagerService ` , etc.
3436- Always use the service wrapper (e.g., ` DashboardManagerService ` ) rather than the core class directly.
3537
3638### Module System
39+
3740- ` DashboardCoreModule ` : Main runtime module with default property types and deserializers
3841- ` DashboardCoreModule.with(metadata) ` : Extend with custom types, models, renderers, editors, deserializers
3942- ` DashboardEditorModule ` : Separate module for editing capabilities
4043
4144### Key Injection Tokens
45+
4246- ` MODEL_PROPERTY_TYPES ` : Register custom property types
4347- ` DASHBOARD_DESERIALIZERS ` : Register custom deserializers
4448
4549### Rendering
50+
4651- ` DashboardComponent ` (` <hda-dashboard> ` ): Main rendering component
4752- ` DashboardModelDirective ` (` hdaDashboardModel ` ): Injects models into template context
4853- ` ThemePropertyPipe ` : Theme-aware property rendering
4954
5055## Code Conventions
5156
5257### Selectors
58+
5359- ** Library components** : ` hda-* ` prefix (kebab-case)
5460- ** Library directives** : ` hda* ` prefix (camelCase)
5561- ** App components** : ` app-* ` prefix
5662
5763### TypeScript
64+
5865- Strict mode enabled with ` noUnusedLocals ` , ` noUnusedParameters ` , ` strictNullChecks `
5966- Explicit access modifiers required (public/private/protected)
6067- No ` any ` types allowed
6168- Parameter properties preferred: ` constructor(private readonly service: Service) `
6269
6370### Testing
71+
6472- Jest with ` @ngneat/spectator ` for component testing
6573- Test files: ` *.test.ts ` or ` *.spec.ts `
6674- Coverage excludes: ` *.module.ts ` , ` public_api.ts ` , ` test/ ` directory
6775
6876### Commits
77+
6978- Conventional commits required (enforced via commitlint)
7079- Use ` npm run commit ` for interactive commit wizard
7180- Pre-commit hook runs Prettier on staged files
0 commit comments