<div class="chartlet-wrapper"><style>.chartlet-stage{position:relative;display:inline-block;max-width:100%;vertical-align:top}.chartlet-stage>svg{display:block}.chartlet-hotspot{position:absolute;border-radius:8px;cursor:pointer}.chartlet-focus{margin:0 0 12px 0;font-size:13px}.chartlet-focus summary{cursor:pointer;min-height:24px}.chartlet-focus fieldset{border:none;padding:0;margin:4px 0 0 0}.chartlet-focus label{display:inline-flex;align-items:center;min-height:44px;margin-right:14px;cursor:pointer;white-space:nowrap}.chartlet-focus input{margin-right:4px}.chartlet-focus input:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.chartlet-wrapper:has(.chartlet-focus-node:checked) #chartlet-79335aff9fa623ac .chartlet-f{opacity:.18}#chartlet-79335aff9fa623ac-hs-0{left:2%;top:38.053%;width:7.429%;height:12.389%}#chartlet-79335aff9fa623ac-hs-1{left:16.286%;top:38.938%;width:9.714%;height:10.619%}#chartlet-79335aff9fa623ac-hs-2{left:36%;top:38.053%;width:8%;height:12.389%}#chartlet-79335aff9fa623ac-hs-3{left:56.571%;top:27.434%;width:7.429%;height:12.389%}#chartlet-79335aff9fa623ac-hs-4{left:56%;top:46.018%;width:8.571%;height:15.929%}#chartlet-79335aff9fa623ac-hs-5{left:75.714%;top:46.903%;width:8.571%;height:8.85%}#chartlet-79335aff9fa623ac-hs-6{left:76.286%;top:26.549%;width:7.429%;height:14.159%}#chartlet-79335aff9fa623ac-hs-7{left:87.429%;top:61.947%;width:10.286%;height:8.85%}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-0:checked) #chartlet-79335aff9fa623ac .chartlet-f-0{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-0:checked) #chartlet-79335aff9fa623ac .chartlet-n-0 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-0:checked) #chartlet-79335aff9fa623ac .chartlet-n-0 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-1:checked) #chartlet-79335aff9fa623ac .chartlet-f-1{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-1:checked) #chartlet-79335aff9fa623ac .chartlet-n-1 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-1:checked) #chartlet-79335aff9fa623ac .chartlet-n-1 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-2:checked) #chartlet-79335aff9fa623ac .chartlet-f-2{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-2:checked) #chartlet-79335aff9fa623ac .chartlet-n-2 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-2:checked) #chartlet-79335aff9fa623ac .chartlet-n-2 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-3:checked) #chartlet-79335aff9fa623ac .chartlet-f-3{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-3:checked) #chartlet-79335aff9fa623ac .chartlet-n-3 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-3:checked) #chartlet-79335aff9fa623ac .chartlet-n-3 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-4:checked) #chartlet-79335aff9fa623ac .chartlet-f-4{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-4:checked) #chartlet-79335aff9fa623ac .chartlet-n-4 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-4:checked) #chartlet-79335aff9fa623ac .chartlet-n-4 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-5:checked) #chartlet-79335aff9fa623ac .chartlet-f-5{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-5:checked) #chartlet-79335aff9fa623ac .chartlet-n-5 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-5:checked) #chartlet-79335aff9fa623ac .chartlet-n-5 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-6:checked) #chartlet-79335aff9fa623ac .chartlet-f-6{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-6:checked) #chartlet-79335aff9fa623ac .chartlet-n-6 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-6:checked) #chartlet-79335aff9fa623ac .chartlet-n-6 .chartlet-seq-box{stroke-width:3}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-7:checked) #chartlet-79335aff9fa623ac .chartlet-f-7{opacity:1}.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-7:checked) #chartlet-79335aff9fa623ac .chartlet-n-7 .chartlet-flow-node,.chartlet-wrapper:has(#chartlet-79335aff9fa623ac-focus-7:checked) #chartlet-79335aff9fa623ac .chartlet-n-7 .chartlet-seq-box{stroke-width:3}</style><details class="chartlet-focus"><summary>Focus</summary><fieldset><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" checked> Show all</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-0"> Customer</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-1"> Customer portal</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-2"> API gateway</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-3"> Monolith</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-4"> Billing service</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-5"> Invoice events</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-6"> Accounts</label><label><input type="radio" name="chartlet-79335aff9fa623ac-focus" class="chartlet-focus-node" id="chartlet-79335aff9fa623ac-focus-7"> Payment provider</label></fieldset></details><figure class="chartlet-figure" data-viz="chart"><figcaption>Billing moves from the monolith to its own service</figcaption><div class="chartlet-stage"><svg xmlns="http://www.w3.org/2000/svg" width="1400" height="452" viewBox="0 0 1400 452" id="chartlet-79335aff9fa623ac" role="img" aria-labelledby="chartlet-79335aff9fa623ac-title chartlet-79335aff9fa623ac-description" class="chartlet-root"><title id="chartlet-79335aff9fa623ac-title">Billing moves from the monolith to its own service</title><desc id="chartlet-79335aff9fa623ac-description">Architecture diagram with 8 components and 8 connections in 1 boundary. Platform: API gateway, Monolith, Billing service, Invoice events, Accounts. Most connected: Billing service (4 connections). Nothing leads into Customer. Nothing leads out of Invoice events, Accounts and Payment provider. Bottleneck: API gateway; without it the diagram falls apart. Customer (person): connects to Customer portal (pays). Customer portal (frontend): connects to API gateway (calls, via HTTPS). API gateway (security): connects to Monolith (routes today) and Billing service (routes after). Monolith (service): connects to Accounts (via SQL). Billing service (service): connects to Accounts (via SQL), Invoice events (publishes) and Payment provider (charges, via HTTPS). Accounts (database): no outgoing connection. Invoice events (queue): no outgoing connection. Payment provider (external system): no outgoing connection. Roles: critical: API gateway, Accounts, Billing service → Payment provider; planned: Billing service, Invoice events, API gateway → Billing service, Billing service → Accounts, Billing service → Invoice events; deprecated: Monolith, API gateway → Monolith, Monolith → Accounts.</desc><style>.chartlet-root{--chartlet-text:#172033;--chartlet-muted:#344054;--chartlet-grid:#d9dee8;--chartlet-zero:#667085;--chartlet-accent:#2563eb;--chartlet-background:#fff;--chartlet-color-1:#2563eb;--chartlet-color-2:#c2410c;--chartlet-color-3:#475569;--chartlet-color-4:#111827;max-width:100%;height:auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:var(--chartlet-text)}#chartlet-79335aff9fa623ac .chartlet-title{font-size:22px;font-weight:650;fill:var(--chartlet-text)}#chartlet-79335aff9fa623ac .chartlet-label,#chartlet-79335aff9fa623ac .chartlet-tick,#chartlet-79335aff9fa623ac .chartlet-value,#chartlet-79335aff9fa623ac .chartlet-value-inverse,#chartlet-79335aff9fa623ac .chartlet-axis-title{font-size:12px;fill:var(--chartlet-muted)}#chartlet-79335aff9fa623ac .chartlet-value,#chartlet-79335aff9fa623ac .chartlet-value-inverse{font-weight:600}#chartlet-79335aff9fa623ac .chartlet-value{fill:var(--chartlet-text)}#chartlet-79335aff9fa623ac .chartlet-value-inverse{fill:var(--chartlet-background)}#chartlet-79335aff9fa623ac .chartlet-axis-title{font-weight:600}#chartlet-79335aff9fa623ac .chartlet-grid{stroke:var(--chartlet-grid);stroke-width:1}#chartlet-79335aff9fa623ac .chartlet-zero{stroke:var(--chartlet-zero);stroke-width:1.5}#chartlet-79335aff9fa623ac .chartlet-bar,#chartlet-79335aff9fa623ac .chartlet-point{fill:var(--chartlet-accent)}#chartlet-79335aff9fa623ac .chartlet-line{fill:none;stroke:var(--chartlet-accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}#chartlet-79335aff9fa623ac .chartlet-background{fill:var(--chartlet-background)}.chartlet-root{--chartlet-node:#eef3fd;--chartlet-lane:#f7f9fc;--chartlet-lane-head:#eef1f6;--chartlet-shadow:rgba(16,24,40,.09);--chartlet-role-blue:#2563eb;--chartlet-role-blue-fill:#eef3fd;--chartlet-role-green:#15803d;--chartlet-role-green-fill:#ecfdf3;--chartlet-role-amber:#b45309;--chartlet-role-amber-fill:#fff7e8;--chartlet-role-teal:#0f766e;--chartlet-role-teal-fill:#e9faf7;--chartlet-role-violet:#6d28d9;--chartlet-role-violet-fill:#f3efff;--chartlet-role-gray:#667085;--chartlet-role-gray-fill:#f7f8fa;--chartlet-role-red:#b42318;--chartlet-role-red-fill:#fef3f2}.chartlet-root.chartlet-theme-dark{--chartlet-node:#1a2436;--chartlet-lane:#121925;--chartlet-lane-head:#18212f;--chartlet-shadow:rgba(0,0,0,.45);--chartlet-role-blue:#7ea6ff;--chartlet-role-blue-fill:#1a2436;--chartlet-role-green:#4ade80;--chartlet-role-green-fill:#132a1d;--chartlet-role-amber:#fbbf24;--chartlet-role-amber-fill:#2b2210;--chartlet-role-teal:#2dd4bf;--chartlet-role-teal-fill:#0f2a27;--chartlet-role-violet:#b69cff;--chartlet-role-violet-fill:#231c38;--chartlet-role-gray:#9aa7bd;--chartlet-role-gray-fill:#161d29;--chartlet-role-red:#f97066;--chartlet-role-red-fill:#2d1616}#chartlet-79335aff9fa623ac .chartlet-role-blue{fill:var(--chartlet-role-blue-fill);stroke:var(--chartlet-role-blue)}#chartlet-79335aff9fa623ac .chartlet-role-green{fill:var(--chartlet-role-green-fill);stroke:var(--chartlet-role-green)}#chartlet-79335aff9fa623ac .chartlet-role-amber{fill:var(--chartlet-role-amber-fill);stroke:var(--chartlet-role-amber)}#chartlet-79335aff9fa623ac .chartlet-role-teal{fill:var(--chartlet-role-teal-fill);stroke:var(--chartlet-role-teal)}#chartlet-79335aff9fa623ac .chartlet-role-violet{fill:var(--chartlet-role-violet-fill);stroke:var(--chartlet-role-violet)}#chartlet-79335aff9fa623ac .chartlet-role-gray{fill:var(--chartlet-role-gray-fill);stroke:var(--chartlet-role-gray)}#chartlet-79335aff9fa623ac .chartlet-role-red{fill:var(--chartlet-role-red-fill);stroke:var(--chartlet-role-red)}#chartlet-79335aff9fa623ac .chartlet-diagram-rim{fill:none;stroke:var(--chartlet-role-teal);stroke-width:1.5}#chartlet-79335aff9fa623ac .chartlet-diagram-shadow{fill:var(--chartlet-shadow);stroke:none;rx:7px}#chartlet-79335aff9fa623ac .chartlet-diagram-chip{fill:var(--chartlet-background);stroke:var(--chartlet-grid);stroke-width:1;rx:4px}#chartlet-79335aff9fa623ac .chartlet-diagram-chip-text{font-size:12px;fill:var(--chartlet-text)}#chartlet-79335aff9fa623ac .chartlet-diagram-badge{fill:var(--chartlet-accent);stroke:var(--chartlet-background);stroke-width:2}#chartlet-79335aff9fa623ac .chartlet-diagram-badge-text{font-size:10px;font-weight:700;fill:var(--chartlet-background)}#chartlet-79335aff9fa623ac .chartlet-flow-node{stroke-width:1.5;stroke-linejoin:round;rx:7px}#chartlet-79335aff9fa623ac .chartlet-flow-start{stroke-width:2}#chartlet-79335aff9fa623ac .chartlet-flow-end{stroke-width:3}#chartlet-79335aff9fa623ac .chartlet-flow-external{stroke-dasharray:5 3}#chartlet-79335aff9fa623ac .chartlet-flow-inner{stroke:var(--chartlet-role-blue);stroke-width:1}#chartlet-79335aff9fa623ac .chartlet-flow-label{font-size:13px;font-weight:600;fill:var(--chartlet-text)}#chartlet-79335aff9fa623ac .chartlet-flow-sublabel{font-size:11px;fill:var(--chartlet-muted)}#chartlet-79335aff9fa623ac .chartlet-flow-edge{fill:none;stroke:var(--chartlet-zero);stroke-width:1.4;stroke-linejoin:round}#chartlet-79335aff9fa623ac .chartlet-flow-dashed{stroke-dasharray:5 4}#chartlet-79335aff9fa623ac .chartlet-flow-dotted{stroke-dasharray:1 4;stroke-linecap:round}#chartlet-79335aff9fa623ac .chartlet-flow-main{stroke:var(--chartlet-accent);stroke-width:2.2}#chartlet-79335aff9fa623ac .chartlet-flow-head{fill:var(--chartlet-zero);stroke:var(--chartlet-zero);stroke-width:1;stroke-linejoin:round}#chartlet-79335aff9fa623ac .chartlet-flow-main-head{fill:var(--chartlet-accent);stroke:var(--chartlet-accent)}#chartlet-79335aff9fa623ac .chartlet-flow-lane{fill:var(--chartlet-lane);stroke:var(--chartlet-grid);stroke-width:1}#chartlet-79335aff9fa623ac .chartlet-flow-lane-alt{fill:var(--chartlet-background)}#chartlet-79335aff9fa623ac .chartlet-flow-lane-head{fill:var(--chartlet-lane-head);stroke:none}#chartlet-79335aff9fa623ac .chartlet-flow-lane-label{font-size:11px;font-weight:650;fill:var(--chartlet-muted);letter-spacing:.04em}#chartlet-79335aff9fa623ac .chartlet-flow-group{fill:var(--chartlet-accent);fill-opacity:.04;stroke:var(--chartlet-zero);stroke-width:1;stroke-dasharray:4 3;rx:10px}#chartlet-79335aff9fa623ac .chartlet-flow-group-label{font-size:11px;font-weight:600;fill:var(--chartlet-muted)}#chartlet-79335aff9fa623ac .chartlet-arch-head{fill:var(--chartlet-role-violet-fill);stroke:var(--chartlet-role-violet);stroke-width:1.5}#chartlet-79335aff9fa623ac .chartlet-arch-dot{fill:var(--chartlet-role-blue);stroke:none}#chartlet-79335aff9fa623ac .chartlet-flow-role-critical .chartlet-flow-node{stroke:var(--chartlet-role-red);stroke-width:3}#chartlet-79335aff9fa623ac .chartlet-flow-role-planned .chartlet-flow-node{stroke:var(--chartlet-role-violet);stroke-dasharray:6 3}#chartlet-79335aff9fa623ac .chartlet-flow-role-deprecated .chartlet-flow-node{stroke:var(--chartlet-role-gray);stroke-dasharray:1.5 3}#chartlet-79335aff9fa623ac .chartlet-flow-role-critical .chartlet-flow-edge{stroke:var(--chartlet-role-red);stroke-width:2.6}#chartlet-79335aff9fa623ac .chartlet-flow-role-planned .chartlet-flow-edge{stroke:var(--chartlet-role-violet);stroke-dasharray:6 4}#chartlet-79335aff9fa623ac .chartlet-flow-role-deprecated .chartlet-flow-edge{stroke:var(--chartlet-role-gray);stroke-dasharray:1 4;stroke-linecap:round}#chartlet-79335aff9fa623ac .chartlet-flow-role-critical .chartlet-flow-head,#chartlet-79335aff9fa623ac .chartlet-flow-role-critical .chartlet-diagram-badge{fill:var(--chartlet-role-red);stroke:var(--chartlet-role-red)}#chartlet-79335aff9fa623ac .chartlet-flow-role-planned .chartlet-flow-head,#chartlet-79335aff9fa623ac .chartlet-flow-role-planned .chartlet-diagram-badge{fill:var(--chartlet-role-violet);stroke:var(--chartlet-role-violet)}#chartlet-79335aff9fa623ac .chartlet-flow-role-deprecated .chartlet-flow-head,#chartlet-79335aff9fa623ac .chartlet-flow-role-deprecated .chartlet-diagram-badge{fill:var(--chartlet-role-gray);stroke:var(--chartlet-role-gray)}#chartlet-79335aff9fa623ac .chartlet-legend{font-size:12px;fill:var(--chartlet-muted)}</style><rect x="492" y="92" width="700" height="200" class="chartlet-flow-group"/><text x="500" y="105" text-anchor="start" class="chartlet-flow-group-label">Platform</text><g class="chartlet-f chartlet-f-0 chartlet-f-1"><polyline points="132,200 220,200" class="chartlet-flow-edge"><title>Customer → Customer portal: pays</title></polyline><polyline points="220,203.5 228,200 220,196.5 220,203.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-f-1 chartlet-f-2"><polyline points="364,200 496,200" class="chartlet-flow-edge"><title>Customer portal → API gateway: calls [HTTPS]</title></polyline><polyline points="496,203.5 504,200 496,196.5 496,203.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-f-2 chartlet-f-3 chartlet-flow-role-deprecated"><polyline points="616,188 754.435,188 754.435,152 784,152" class="chartlet-flow-edge"><title>API gateway → Monolith: routes today</title></polyline><polyline points="784,155.5 792,152 784,148.5 784,155.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-f-2 chartlet-f-4 chartlet-flow-role-planned"><polyline points="616,212 754.435,212 754.435,244 776,244" class="chartlet-flow-edge"><title>API gateway → Billing service: routes after</title></polyline><polyline points="776,247.5 784,244 776,240.5 776,247.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-f-3 chartlet-f-6 chartlet-flow-role-deprecated"><polyline points="896,152 1014.786,152 1014.786,140 1060,140" class="chartlet-flow-edge"><title>Monolith → Accounts: [SQL]</title></polyline><polyline points="1060,143.5 1068,140 1060,136.5 1060,143.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-f-4 chartlet-f-6 chartlet-flow-role-planned"><polyline points="904,222.4 1014.786,222.4 1014.786,164 1060,164" class="chartlet-flow-edge"><title>Billing service → Accounts: [SQL]</title></polyline><polyline points="1060,167.5 1068,164 1060,160.5 1060,167.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-f-4 chartlet-f-5 chartlet-flow-role-planned"><polyline points="904,244 1028.893,244 1028.893,232 1052,232" class="chartlet-flow-edge"><title>Billing service → Invoice events: publishes</title></polyline><polyline points="1052,235.5 1060,232 1052,228.5 1052,235.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-f-4 chartlet-f-7 chartlet-flow-role-critical"><polyline points="904,265.6 1014.786,265.6 1014.786,300 1216,300" class="chartlet-flow-edge"><title>Billing service → Payment provider: charges [HTTPS]</title></polyline><polyline points="1216,303.5 1224,300 1216,296.5 1216,303.5" class="chartlet-flow-head"/></g><g class="chartlet-f chartlet-n-0 chartlet-f-0 chartlet-f-1"></g><g class="chartlet-f chartlet-n-1 chartlet-f-0 chartlet-f-1 chartlet-f-2"></g><g class="chartlet-f chartlet-n-2 chartlet-f-1 chartlet-f-2 chartlet-f-3 chartlet-f-4"></g><g class="chartlet-f chartlet-n-3 chartlet-f-2 chartlet-f-3 chartlet-f-6"></g><g class="chartlet-f chartlet-n-4 chartlet-f-2 chartlet-f-4 chartlet-f-5 chartlet-f-6 chartlet-f-7"></g><g class="chartlet-f chartlet-n-5 chartlet-f-4 chartlet-f-5"></g><g class="chartlet-f chartlet-n-6 chartlet-f-3 chartlet-f-4 chartlet-f-6"></g><g class="chartlet-f chartlet-n-7 chartlet-f-4 chartlet-f-7"></g><g class="chartlet-f chartlet-f-0 chartlet-f-1"><rect x="136" y="175" width="36.88" height="21" class="chartlet-diagram-chip"/><text x="141" y="189" text-anchor="start" class="chartlet-diagram-chip-text">pays</text></g><g class="chartlet-f chartlet-f-1 chartlet-f-2"><rect x="368" y="160" width="63.64" height="36" class="chartlet-diagram-chip"/><text x="373" y="174" text-anchor="start" class="chartlet-diagram-chip-text">calls</text><text x="373" y="189" text-anchor="start" class="chartlet-diagram-chip-text">[HTTPS]</text></g><g class="chartlet-f chartlet-f-2 chartlet-f-3"><rect x="620" y="163" width="87.76" height="21" class="chartlet-diagram-chip"/><text x="625" y="177" text-anchor="start" class="chartlet-diagram-chip-text">routes today</text></g><g class="chartlet-f chartlet-f-2 chartlet-f-4"><rect x="620" y="216" width="87.76" height="21" class="chartlet-diagram-chip"/><text x="625" y="230" text-anchor="start" class="chartlet-diagram-chip-text">routes after</text></g><g class="chartlet-f chartlet-f-3 chartlet-f-6"><rect x="900" y="127" width="47.56" height="21" class="chartlet-diagram-chip"/><text x="905" y="141" text-anchor="start" class="chartlet-diagram-chip-text">[SQL]</text></g><g class="chartlet-f chartlet-f-4 chartlet-f-6"><rect x="908" y="197.4" width="47.56" height="21" class="chartlet-diagram-chip"/><text x="913" y="211.4" text-anchor="start" class="chartlet-diagram-chip-text">[SQL]</text></g><g class="chartlet-f chartlet-f-4 chartlet-f-5"><rect x="958.56" y="197.4" width="64.24" height="21" class="chartlet-diagram-chip"/><text x="963.56" y="211.4" text-anchor="start" class="chartlet-diagram-chip-text">publishes</text></g><g class="chartlet-f chartlet-f-4 chartlet-f-7"><rect x="908" y="269.6" width="63.64" height="36" class="chartlet-diagram-chip"/><text x="913" y="283.6" text-anchor="start" class="chartlet-diagram-chip-text">charges</text><text x="913" y="298.6" text-anchor="start" class="chartlet-diagram-chip-text">[HTTPS]</text></g><g class="chartlet-f chartlet-n-0 chartlet-f-0 chartlet-f-1"><rect x="28" y="174.5" width="104" height="56" class="chartlet-diagram-shadow"/><rect x="28" y="172" width="104" height="56" class="chartlet-flow-node chartlet-role-violet"><title>Customer</title></rect><circle cx="80" cy="183" r="6" class="chartlet-arch-head"/><text x="80" y="212.5" text-anchor="middle" class="chartlet-flow-label">Customer</text></g><g class="chartlet-f chartlet-n-1 chartlet-f-0 chartlet-f-1 chartlet-f-2"><rect x="228" y="178.5" width="136" height="48" class="chartlet-diagram-shadow"/><rect x="228" y="176" width="136" height="48" class="chartlet-flow-node chartlet-role-blue"><title>Customer portal</title></rect><line x1="228" y1="188" x2="364" y2="188" class="chartlet-flow-inner"/><circle cx="236" cy="182" r="1.8" class="chartlet-arch-dot"/><circle cx="242" cy="182" r="1.8" class="chartlet-arch-dot"/><circle cx="248" cy="182" r="1.8" class="chartlet-arch-dot"/><text x="296" y="210.5" text-anchor="middle" class="chartlet-flow-label">Customer portal</text></g><g class="chartlet-f chartlet-n-2 chartlet-f-1 chartlet-f-2 chartlet-f-3 chartlet-f-4 chartlet-flow-role-critical"><polyline points="504,174.5 616,174.5 616,208.1 560,230.5 504,208.1 504,174.5" class="chartlet-diagram-shadow"/><polyline points="504,172 616,172 616,205.6 560,228 504,205.6 504,172" class="chartlet-flow-node chartlet-role-red"><title>API gateway</title></polyline><text x="560" y="198.5" text-anchor="middle" class="chartlet-flow-label">API gateway</text><circle cx="504" cy="172" r="8" class="chartlet-diagram-badge"/><text x="504" y="175.5" text-anchor="middle" class="chartlet-diagram-badge-text">!</text></g><g class="chartlet-f chartlet-n-3 chartlet-f-2 chartlet-f-3 chartlet-f-6 chartlet-flow-role-deprecated"><rect x="792" y="126.5" width="104" height="56" class="chartlet-diagram-shadow"/><rect x="792" y="124" width="104" height="56" class="chartlet-flow-node chartlet-role-blue"><title>Monolith – billing module</title></rect><text x="844" y="149.5" text-anchor="middle" class="chartlet-flow-label">Monolith</text><text x="844" y="163.5" text-anchor="middle" class="chartlet-flow-sublabel">billing module</text><circle cx="792" cy="124" r="8" class="chartlet-diagram-badge"/><text x="792" y="127.5" text-anchor="middle" class="chartlet-diagram-badge-text">−</text></g><g class="chartlet-f chartlet-n-4 chartlet-f-2 chartlet-f-4 chartlet-f-5 chartlet-f-6 chartlet-f-7 chartlet-flow-role-planned"><rect x="784" y="210.5" width="120" height="72" class="chartlet-diagram-shadow"/><rect x="784" y="208" width="120" height="72" class="chartlet-flow-node chartlet-role-blue"><title>Billing service</title></rect><text x="844" y="248.5" text-anchor="middle" class="chartlet-flow-label">Billing service</text><circle cx="784" cy="208" r="8" class="chartlet-diagram-badge"/><text x="784" y="211.5" text-anchor="middle" class="chartlet-diagram-badge-text">+</text></g><g class="chartlet-f chartlet-n-5 chartlet-f-4 chartlet-f-5 chartlet-flow-role-planned"><rect x="1064" y="210.5" width="120" height="40" class="chartlet-diagram-shadow"/><rect x="1064" y="208" width="120" height="40" class="chartlet-flow-node chartlet-role-violet"/><rect x="1060" y="214.5" width="120" height="40" class="chartlet-diagram-shadow"/><rect x="1060" y="212" width="120" height="40" class="chartlet-flow-node chartlet-role-violet"><title>Invoice events</title></rect><text x="1120" y="236.5" text-anchor="middle" class="chartlet-flow-label">Invoice events</text><circle cx="1060" cy="212" r="8" class="chartlet-diagram-badge"/><text x="1060" y="215.5" text-anchor="middle" class="chartlet-diagram-badge-text">+</text></g><g class="chartlet-f chartlet-n-6 chartlet-f-3 chartlet-f-4 chartlet-f-6 chartlet-flow-role-critical"><polyline points="1068,127.5 1068,181.5 1069.772,182.794 1074.967,184 1083.23,185.036 1094,185.83 1106.541,186.33 1120,186.5 1133.459,186.33 1146,185.83 1156.77,185.036 1165.033,184 1170.228,182.794 1172,181.5 1172,127.5 1170.228,126.206 1165.033,125 1156.77,123.964 1146,123.17 1133.459,122.67 1120,122.5 1106.541,122.67 1094,123.17 1083.23,123.964 1074.967,125 1069.772,126.206 1068,127.5 1068,127.5" class="chartlet-diagram-shadow"/><polyline points="1068,125 1068,179 1069.772,180.294 1074.967,181.5 1083.23,182.536 1094,183.33 1106.541,183.83 1120,184 1133.459,183.83 1146,183.33 1156.77,182.536 1165.033,181.5 1170.228,180.294 1172,179 1172,125 1170.228,123.706 1165.033,122.5 1156.77,121.464 1146,120.67 1133.459,120.17 1120,120 1106.541,120.17 1094,120.67 1083.23,121.464 1074.967,122.5 1069.772,123.706 1068,125 1068,125" class="chartlet-flow-node chartlet-role-teal"><title>Accounts – Postgres</title></polyline><polyline points="1068,125 1069.772,126.294 1074.967,127.5 1083.23,128.536 1094,129.33 1106.541,129.83 1120,130 1133.459,129.83 1146,129.33 1156.77,128.536 1165.033,127.5 1170.228,126.294 1172,125" class="chartlet-diagram-rim"/><text x="1120" y="152.5" text-anchor="middle" class="chartlet-flow-label">Accounts</text><text x="1120" y="166.5" text-anchor="middle" class="chartlet-flow-sublabel">Postgres</text><circle cx="1068" cy="120" r="8" class="chartlet-diagram-badge"/><text x="1068" y="123.5" text-anchor="middle" class="chartlet-diagram-badge-text">!</text></g><g class="chartlet-f chartlet-n-7 chartlet-f-4 chartlet-f-7"><rect x="1224" y="282.5" width="144" height="40" class="chartlet-diagram-shadow"/><rect x="1224" y="280" width="144" height="40" class="chartlet-flow-node chartlet-flow-external chartlet-role-gray"><title>Payment provider</title></rect><text x="1296" y="304.5" text-anchor="middle" class="chartlet-flow-label">Payment provider</text></g><g class="chartlet-flow-role-critical"><circle cx="32" cy="434" r="8" class="chartlet-diagram-badge"/><text x="32" y="437.5" text-anchor="middle" class="chartlet-diagram-badge-text">!</text><line x1="46" y1="434" x2="68" y2="434" class="chartlet-flow-edge"/></g><text x="74" y="438" text-anchor="start" class="chartlet-legend">Critical</text><g class="chartlet-flow-role-planned"><circle cx="147.72" cy="434" r="8" class="chartlet-diagram-badge"/><text x="147.72" y="437.5" text-anchor="middle" class="chartlet-diagram-badge-text">+</text><line x1="161.72" y1="434" x2="183.72" y2="434" class="chartlet-flow-edge"/></g><text x="189.72" y="438" text-anchor="start" class="chartlet-legend">Planned</text><g class="chartlet-flow-role-deprecated"><circle cx="262.96" cy="434" r="8" class="chartlet-diagram-badge"/><text x="262.96" y="437.5" text-anchor="middle" class="chartlet-diagram-badge-text">−</text><line x1="276.96" y1="434" x2="298.96" y2="434" class="chartlet-flow-edge"/></g><text x="304.96" y="438" text-anchor="start" class="chartlet-legend">Deprecated</text></svg><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-0" for="chartlet-79335aff9fa623ac-focus-0"></label><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-1" for="chartlet-79335aff9fa623ac-focus-1"></label><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-2" for="chartlet-79335aff9fa623ac-focus-2"></label><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-3" for="chartlet-79335aff9fa623ac-focus-3"></label><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-4" for="chartlet-79335aff9fa623ac-focus-4"></label><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-5" for="chartlet-79335aff9fa623ac-focus-5"></label><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-6" for="chartlet-79335aff9fa623ac-focus-6"></label><label class="chartlet-hotspot" id="chartlet-79335aff9fa623ac-hs-7" for="chartlet-79335aff9fa623ac-focus-7"></label></div><p class="chartlet-source">Source: Architecture review, migration plan</p><details class="chartlet-data" data-viz-text><summary>Show chart data</summary><table><caption>Data for Billing moves from the monolith to its own service</caption><thead><tr><th scope="col">Component</th><th scope="col">Kind</th><th scope="col">Boundary</th><th scope="col">Role</th><th scope="col">Connects to</th></tr></thead><tbody><tr><th scope="row">Customer</th><td>person</td><td></td><td></td><td>Customer portal (pays)</td></tr><tr><th scope="row">Customer portal</th><td>frontend</td><td></td><td></td><td>API gateway (calls, via HTTPS)</td></tr><tr><th scope="row">API gateway</th><td>security</td><td>Platform</td><td>critical</td><td>Monolith (routes today, deprecated), Billing service (routes after, planned)</td></tr><tr><th scope="row">Monolith</th><td>service</td><td>Platform</td><td>deprecated</td><td>Accounts (via SQL, deprecated)</td></tr><tr><th scope="row">Billing service</th><td>service</td><td>Platform</td><td>planned</td><td>Accounts (via SQL, planned), Invoice events (publishes, planned), Payment provider (charges, via HTTPS, critical)</td></tr><tr><th scope="row">Accounts</th><td>database</td><td>Platform</td><td>critical</td><td></td></tr><tr><th scope="row">Invoice events</th><td>queue</td><td>Platform</td><td>planned</td><td></td></tr><tr><th scope="row">Payment provider</th><td>external system</td><td></td><td></td><td></td></tr></tbody></table></details></figure></div>