Home · Apps · rl-main-infra
rl-main-infra is the platform Infrastructure-as-Code repo for the production AWS estate. It should not be treated as a single-workload repo.
The structure standard exists to keep five concerns clearly separated:
The repo must stay readable as more workloads are added. The core rule is simple:
Use PBX in:
Keep OpenCX only as a legacy alias tied to existing code/config names that are already in use.
PBXsrc/workloads/pbx/pbxopencx module names, config keys, exports, or historical notesDo not spread OpenCX into new docs or new folder/module names.
rl-main-infra/
├── inventory/
│ ├── discovery.json
│ ├── cloudflare/
│ └── route53/
├── scripts/
├── src/
│ ├── config/
│ │ ├── index.ts
│ │ ├── shared.ts
│ │ └── workloads/
│ │ ├── pbx.ts
│ │ ├── fed-proxy.ts
│ │ └── data-download.ts
│ ├── core/
│ │ ├── naming.ts
│ │ ├── tags.ts
│ │ ├── types.ts
│ │ └── discovery.ts
│ ├── platform/
│ │ ├── foundation/
│ │ ├── ingress/
│ │ ├── dns/
│ │ └── security/
│ ├── workloads/
│ │ ├── pbx/
│ │ ├── fed-proxy/
│ │ └── data-download/
│ ├── migrations/
│ │ ├── cloudfront/
│ │ ├── route53/
│ │ └── data/
│ └── index.ts
└── docs/
├── standards/
├── architecture/
├── runbooks/
├── migrations/
└── status/
src/platform/foundation/This area owns the shared platform baseline and import/reference modules for estate-wide AWS resources.
Examples:
This area is for shared platform reality, not for one workload’s business intent.
src/platform/ingress/This area owns reusable ingress and edge patterns.
Examples:
These modules should describe a transport/capability pattern, not a business workload.
src/workloads/This area owns workload composition.
A workload folder answers questions like:
Current/future examples:
src/workloads/pbx/src/workloads/fed-proxy/src/workloads/data-download/src/migrations/This area owns temporary or high-churn transition code.
Examples:
Migration code should be easy to find and easy to retire later.
inventory/This area is for discovered or exported artifacts, not hand-authored architecture logic.
Examples:
Inventory is evidence/input material. It should not be confused with durable platform modules.
docs/The repo-local docs should be separated by document type because they age differently.
docs/standards/ → durable repo rulesdocs/architecture/ → workload/platform design notesdocs/runbooks/ → operator proceduresdocs/migrations/ → transitional plans/statusdocs/status/ → dated execution notesThese rules should apply immediately even before a full refactor:
src/workloads/pbx/src/platform/ingress/src/migrations/docs/ subfoldersopencx naming unless compatibility requires itThese are worth doing later, not as a risky bulk rename:
opencx modules/configs everywhererl-main-infra is a platform IaC repo.
That means:
If a new file does not clearly fit one of those buckets, the structure is probably wrong.