rl-docs-hub

Home · Apps · rl-main-infra


Repository Structure Standard

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:

  1. shared platform foundation
  2. shared ingress / edge capabilities
  3. workload modules
  4. docs / runbooks / status artifacts
  5. inventory / discovery / migration artifacts

Standard intent

The repo must stay readable as more workloads are added. The core rule is simple:

Naming transition rule

Use PBX in:

Keep OpenCX only as a legacy alias tied to existing code/config names that are already in use.

Practical naming policy

Do 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/

Structure rules

1) 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.

2) src/platform/ingress/

This area owns reusable ingress and edge patterns.

Examples:

These modules should describe a transport/capability pattern, not a business workload.

3) src/workloads/

This area owns workload composition.

A workload folder answers questions like:

Current/future examples:

4) src/migrations/

This area owns temporary or high-churn transition code.

Examples:

Migration code should be easy to find and easy to retire later.

5) 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.

6) docs/

The repo-local docs should be separated by document type because they age differently.

What should move now vs later

Adopt now

These rules should apply immediately even before a full refactor:

Defer until previews are stable

These are worth doing later, not as a risky bulk rename:

Final standard

rl-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.