Codebase inventory

Snapshot of the develop branch. Counts exclude *.spec.ts from the component/service/model columns.

Totals

Artefact Count Note

TypeScript files

1455

Including specs.

TypeScript lines (excluding specs)

~96,700

Application code only.

Components

421

*.component.ts

Services

150

.service.ts — includes -mock.service.ts and *-abstract.service.ts

Models

80

*.model.ts

Directives

18

*.directive.ts

Pipes

12

*.pipe.ts

Enums

21

*.enum.ts (more enums live inside other files)

Angular modules

27

*.module.ts

Spec files

~400

*.spec.ts

Templates

407

*.html

Stylesheets

279

*.scss

Guards

4

AuthGuard, FeatureFlagGuard, FeatureFlagsGeneralGuard, SubPermissionsGuard (+ RouteAccessResolver, which is a guard despite its name)

Resolvers

2

SupplierKeyResolver and its mock

Store slices

12

See the store action catalogue

Effect classes

6

Registered in EffectsModule.forRoot

Feature flags

14

See the flag catalogue

Permissions

40

See the permission catalogue

Backend base URLs

~19

See environment keys

Committed build residue

284

Stale *.js files beside their .ts sources — not inputs

284 committed .js files (plus their .js.map siblings) sit next to .ts sources throughout src/app. They are residue from an earlier toolchain. Always edit the .ts; exclude .js from searches or you will get duplicate hits and read stale code.

Per module

Module Components Services Models Directives Pipes Specs

suppliers

200

68

45

5

1

197

manage

79

7

3

0

0

72

shared

67

50

12

12

8

65

crm-tools

45

15

18

1

1

38

processes

12

5

0

0

0

13

reports

6

3

0

0

1

6

admin

4

0

0

0

0

1

auth

3

0

0

0

0

3

marketplaces

2

2

2

0

0

3

app-welcome

1

0

0

0

0

1

underwriting

1

0

0

0

0

0

emails

0

0

0

0

0

0

guards

0

0

0

0

0

0

mocks

0

0

0

0

1

0

pyb-material

0

0

0

0

0

0

store

0

0

0

0

0

0

What the distribution tells you

Suppliers is half the application

200 of 421 components and 68 of 150 services. Any change to supplier loading, the part-editing mechanism or SupplierDetailsModel has wide reach. See suppliers.

Manage is second-largest but service-light

79 components against 7 services — the back-office screens are mostly forms over the global-settings and users endpoints rather than bespoke integrations. See manage.

shared carries a third of the services

50 services in shared/ versus 67 components, and it owns all 12 directives-outside- suppliers and 8 of the 12 pipes. It is a genuine library, not a dumping ground — but it also means a change there is a broad change. See shared library.

emails, guards, pyb-material, store and mocks are structural

emails/ is routes only (components live in crm-tools/); guards/ holds two guards; pyb-material/ re-exports Material; store/ holds the reducer map; mocks/ is test-only.

underwriting/ is one component

The cross-supplier tracker, fully EVA-rendered. Per-supplier underwriting lives under suppliers/supplier/supplier-underwriting/. See UW tracker.

Spec counts track component counts

~400 specs for ~421 components. Coverage by count is high; coverage by behaviour is uneven — many are should create smoke tests. The substantive suites are the advance calculator, feature flags, the card model and real-time validation. See testing.

processes has more specs than components

13 specs to 12 components — the batch and balance-approval logic is comparatively well covered, which matters given it moves money.

Largest single files

Worth knowing before opening them:

File Lines Note

suppliers/store/supplier/supplier.effects.ts

~920

The router-driven load, the aggregate forkJoin, and every supplier side effect.

suppliers/store/supplier/supplier.actions.ts

~650

~70 action types plus ~27 selectors.

crm-tools/store/crm.effects.ts

~570

Timeline loading and all CRM mutations.

…/pending-offer-calculator/store/calculator.spec.ts

~560

The most thorough spec in the repository.

suppliers/store/supplier/supplier.reducers.ts

~510

Also where the reducer mutations live.

…/pending-offer-calculator/store/calculator.reducers.ts

~430

The pricing arithmetic.

crm-tools/store/crm.actions.ts

~280

Actions plus the stream-selector factory.

…/pending-offer-calculator/store/calculator.actions.ts

~245

30 action types.

crm-tools/store/crm.reducers.ts

~220

The normalised timeline store.

suppliers/model/supplier.model.ts

~310

SupplierModel, SupplierDetailsModel, ISupplierDetailsDTO, the address and messenger models, and the derived getters.

Route surface

Area Approx. routes

suppliers (incl. ~25 tabs and their children)

~55

manage

~25

processes (two tables)

10

reports

7

admin

4

tasks, emails, marketplaces, underwriting, welcome, auth, root

~15

Full table: the route catalogue.

Regenerating these numbers

# per-artefact totals
find src/app -name '*.component.ts' ! -name '*.spec.ts' | wc -l
find src/app -name '*.service.ts'   ! -name '*.spec.ts' | wc -l
find src/app -name '*.model.ts' | wc -l
find src/app -name '*.spec.ts'  | wc -l

# per module
for d in src/app/*/; do
  printf '%-18s %s\n' "$(basename "$d")" \
    "$(find "$d" -name '*.component.ts' ! -name '*.spec.ts' | wc -l)"
done

# application lines, excluding specs
find src/app -name '*.ts' ! -name '*.spec.ts' -exec cat {} + | wc -l

# the stale build residue
find src/app -name '*.js' | wc -l

Update this page when a module’s shape changes materially — see the blast-radius checklist in the docs-writer skill.