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 |
|
Services |
150 |
|
Models |
80 |
|
Directives |
18 |
|
Pipes |
12 |
|
Enums |
21 |
|
Angular modules |
27 |
|
Spec files |
~400 |
|
Templates |
407 |
|
Stylesheets |
279 |
|
Guards |
4 |
|
Resolvers |
2 |
|
Store slices |
12 |
|
Effect classes |
6 |
Registered in |
Feature flags |
14 |
|
Permissions |
40 |
|
Backend base URLs |
~19 |
See environment keys |
Committed build residue |
284 |
Stale |
|
284 committed |
Per module
| Module | Components | Services | Models | Directives | Pipes | Specs |
|---|---|---|---|---|---|---|
|
200 |
68 |
45 |
5 |
1 |
197 |
|
79 |
7 |
3 |
0 |
0 |
72 |
|
67 |
50 |
12 |
12 |
8 |
65 |
|
45 |
15 |
18 |
1 |
1 |
38 |
|
12 |
5 |
0 |
0 |
0 |
13 |
|
6 |
3 |
0 |
0 |
1 |
6 |
|
4 |
0 |
0 |
0 |
0 |
1 |
|
3 |
0 |
0 |
0 |
0 |
3 |
|
2 |
2 |
2 |
0 |
0 |
3 |
|
1 |
0 |
0 |
0 |
0 |
1 |
|
1 |
0 |
0 |
0 |
0 |
0 |
|
0 |
0 |
0 |
0 |
0 |
0 |
|
0 |
0 |
0 |
0 |
0 |
0 |
|
0 |
0 |
0 |
0 |
1 |
0 |
|
0 |
0 |
0 |
0 |
0 |
0 |
|
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
SupplierDetailsModelhas 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.
sharedcarries 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,storeandmocksare structural-
emails/is routes only (components live incrm-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 createsmoke tests. The substantive suites are the advance calculator, feature flags, the card model and real-time validation. See testing. processeshas 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 |
|---|---|---|
|
~920 |
The router-driven load, the aggregate |
|
~650 |
~70 action types plus ~27 selectors. |
|
~570 |
Timeline loading and all CRM mutations. |
|
~560 |
The most thorough spec in the repository. |
|
~510 |
Also where the reducer mutations live. |
|
~430 |
The pricing arithmetic. |
|
~280 |
Actions plus the stream-selector factory. |
|
~245 |
30 action types. |
|
~220 |
The normalised timeline store. |
|
~310 |
|
Route surface
| Area | Approx. routes |
|---|---|
|
~55 |
|
~25 |
|
10 |
|
7 |
|
4 |
|
~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.