Composition & scale
What the codebase actually is — measured, with hand-written and generated code counted separately so size never masquerades as value.
Hand-written lines by area
excludes generated- Backend (PHP · 99 modules)251,900 · 2034 files · 64%PHP
- Applicant portal96,400 · 1012 files · 25%TypeScript/React
- Admin web app22,300 · 219 files · 6%TypeScript/React
- Shared libraries (@nwg/ui, @nwg/state)11,200 · 196 files · 3%TypeScript
- Tooling & scripts5,440 · 163 files · 1%Mixed
- Infrastructure as code (nwg/infra)4,600 · 88 files · 1%Terraform
Language mix
hand-written- PHP251,900 · 64%
- TypeScript / TSX120,600 · 31%
- CSS / SCSS9,300 · 2%
- Other (YAML, shell, config)5,440 · 1%
- HCL (Terraform)4,600 · 1%
Architecture summary
A modular PHP backend of 99 modules exposes a GraphQL API consumed by two React/TypeScript frontends (applicant portal and admin). Doctrine ORM backs Postgres; Elasticsearch and StarRocks power search and analytics; Kafka carries events; S3 stores documents. Staging, storage and search run in Northwind's AWS account and are described in Terraform (nwg/infra). Production Kafka and the production database are still in the vendor's account, with cut-over planned for November. 26,020 lines of GraphQL codegen are generated and excluded from the hand-written total.
Duplication
~6,400 LOC9 near-identical data-grid components remain (400–600 LOC each); September's consolidation merged 13 others into one shared grid. formatMoney is still copied 4× and there are 4 divergent formatDate implementations.
Dead surface
The legacy reports module (v1) has had no commits since November 2025 but is still routed. Whether anyone uses it is an open follow-up.
Generated code (26,020 lines of GraphQL codegen) is reported separately and never folded into the hand-written total — so scale reflects real work, not machine output.
