Purpose: how to apply the selected rules to the observed codebase.
- Annotate JWebMP components/services with Ng* annotations under
com.jwebmp.core.base.angular.client.annotations.*and implement the relevantINg*interfaces for scaffolding strings (interfacespackage). - Ensure module registration stays intact (
AngularClientModule,AngularTypeScriptClientModuleInclusioninmodule-info.java) so Guice/Vert.x triggerAnnotationHelper.startup()and ClassGraph scanning. - Build metadata via
AbstractReferences.processClass(...)(or higher-level generator) to populateComponentConfiguration/AbstractNgConfiguration; usesplitComponentReferences()before rendering to expand imports/injects. - Render TypeScript snippets with the
render*()helpers (fields, hooks, injects, interfaces, imports) and feed them into the host Angular build chain. - Keep glossary routing intact for Angular 20: base rules
rules/generative/language/angular/README.md+ overriderules/generative/language/angular/angular-20.rules.md; TypeScript baserules/generative/language/typescript/README.md.
- SPI/Interfaces:
INgComponent,INgDirective,INgDataService,INgProvider,TypescriptIndexPageConfigurator; support arrays of strings that are converted to Ng* annotations byAnnotationUtils. - Lifecycle hooks:
AngularTypeScriptPostStartup(IGuicePostStartup) runsAnnotationHelper.startup()on Vert.x;GuicedConfigsets scan flags (annotation/classpath/field/method info). - Configuration builders:
ComponentConfigurationaggregates Ng* signals, models, methods, fields, inputs/outputs, imports/providers;AbstractNgConfigurationhandles routing for directives/services/providers. - Rendering contract:
renderOnInit|renderOnDestroy|renderInjects|renderInterfaces|renderFields|renderGlobalFields|renderSignals|renderModelsreturn TypeScript code fragments; consumers must compose them into.tsfiles.
- Annotation scan completes at startup without blocking Guice (executed via Vert.x
executeBlocking); failures are logged via Log4j2. - For a sample annotated class,
getClassMappingsreturns Ng* entries matching the annotations present and their inheritance rules (parent/self flags respected). splitComponentReferences()resolves relative import paths and inject tokens for referenced components/services/providers.- Rendered TypeScript includes required imports/interfaces for hooks used (
OnInit,OnDestroy, etc.) and maintains CRTP-friendly naming in generated code.
- Unit:
AnnotationHelperTestseeds fixtures; extend with assertions for Ng* lists, import resolution, and render outputs (no file system writes required). - Integration/lightweight: instantiate
AngularTypeScriptPostStartupwith a Vert.x test instance to ensure futures resolve and maps populate. - Static checks: enforce module boundary (exports/opens) and Lombok/Log4j2 alignment; consider adding nullness checks using JSpecify defaults.
- CI: run Maven unit tests and formatter/lint steps via GitHub Actions shared workflow (see RULES.md links).
- Existing README is a stub; host docs now live in PACT/RULES/GUIDES/IMPLEMENTATION and
docs/architecture/. - No legacy monolithic docs are retained; forward-only policy applies to future rewrites.