Skip to content

Decompose AppModule aggregator into per-domain dynamic modules #256

Description

@kilodesodiq-arch

Problem Statement. app.module.ts lists 30+ imports directly. As NestJS modules grow,
this becomes painful: a unit test of any module currently pulls in everything.

Technical Context. app/backend/src/app.module.ts.

Expected Outcome. A feature-modules.ts registry returns an array of DynamicModules
per domain (claims, campaigns, evidence, etc.). A single import uses
FeatureModuleRegistry.forRoot() reduces the file size to < 80 lines.

Acceptance Criteria.

  • New AppModule < 80 lines.
  • A unit-test in app/backend/test/app-module.spec.ts ensures that no feature module is
    imported twice.

Files or modules likely to be affected.
app.module.ts,
new feature-modules.registry.ts.

Difficulty. Medium
Estimated effort. M


Database & Data Model — Issues 49–56


Backlog item #48 from `docs/maintainer-issue-backlog.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions