ADR-00010 — Polyglot Language & Runtime Selection: Go, Rust, Node, Flutter, React

By Engineering Team•September 27, 2026•6 min read
  • Status: Approved / Implemented
  • Date: 2026-09-27
  • Authors: Engineering Team

Context

This platform runs five different language/framework choices side by side — Go, Rust, and Node/NestJS on the backend; Flutter and React on the client side — rather than standardizing on one. Each choice recurs consistently enough across the monorepo (nine Go services, eight Rust services, two Node services plus one Firebase Function runtime, one Flutter app, one React app) that it deserves its own explicit rationale, the same way ADR-00009 documents the platform-wide gRPC-vs-REST choice. This decision is cross-cutting — it is not scoped to any single feature’s BRD/SR; it is the reason every new service’s CLAUDE.md already states its language before anything else.

This ADR is the umbrella “why polyglot at all” decision. BRD-007 and SR-007 restate this platform’s cost/startup-latency/data-protection/platform-reach drivers in the pipeline’s own stage order, and each individual language pairing this ADR summarizes below has its own dedicated, single-decision ADR with the full options/trade-off detail:

This ADR itself keeps its original three-option “polyglot vs. one backend language vs. one full-stack language” framing below — that is a genuinely different decision (whether to be polyglot at all) from any single pairwise comparison, so it is not superseded or split by the five ADRs above; they are the detailed layer underneath it.


Decision Drivers

  • Workload shape varies more than any single language handles well. Domain/CRUD/aggregation services, encrypted-secret stores, bulk-import event pipelines, a cross-platform mobile app, and a CRUD-heavy admin dashboard are five genuinely different problems, not one problem in five outfits.
  • Workflow orchestration needs an officially supported Temporal SDK. Only Go has one in this ecosystem — Rust has no official Temporal SDK (only an internal, non-public sdk-core), and Node has none either (see the platform’s cross-cutting principles capability table) — which by itself decides which language can host the checkout saga.
  • Encryption-at-rest and gateway auth-verification are memory-safety-sensitive. Any service whose core job is holding decrypted PII/PCI plaintext or a signing key in memory, even briefly, benefits from a language that rules out a whole class of memory-safety bugs at compile time rather than at runtime.
  • A browser and a mobile OS only run what they run. React’s target is a browser; Flutter’s target is iOS/Android from one codebase — neither choice competes with the backend-language decision, but each still needs its own justification against its own real alternatives (native iOS/Android; Vue/Angular).
  • Team-wide consistency still matters where the workload doesn’t force a choice. Once Rust is justified for encryption-critical services and Go for Temporal, every other backend service defaults to Go rather than each new service re-opening the language question from scratch.

Options Evaluated

Option 1 — Match each workload to the runtime best suited to its dominant constraint (polyglot by design) (CHOSEN)

  • Go — the default backend language. Used for domain/CRUD/aggregation microservices (tenant-service, shop-service, search-service, product-catalog, inventory-service, content-processor, user-preference-service, shipment-service) and the one workflow-orchestration host, order-service, specifically because Go is the only language here with an official Temporal SDK.

  • Rust — used wherever a service’s core responsibility is handling encrypted secret material or gateway-facing token/App-Check verification on the hot path: pii-service, pci-service (the encrypted PII/PCI attribute stores), media-access-service, payment-service, document-service, provider-auth-service, user-secure-engine (the Firebase token/App Check verifier every gated request passes through), and notification-service. Memory-safety guarantees without a garbage collector matter most exactly where plaintext secret material lives briefly in process memory.

  • Node/NestJS — used where the dominant shape is event/pipeline orchestration rather than domain CRUD: tenant-migration (verify → execute → publish) and tenant-migration-orchestrator (consume → dispatch), plus firebase-function, whose runtime is fixed by Firebase Cloud Functions’ primary supported language.

  • Flutter — ui-application, the customer-facing mobile app: one codebase compiled natively to both iOS and Android, instead of two native codebases duplicating the same catalog/cart/checkout logic.

  • React + MUI + Zustand — ui-admin-application: a CRUD-heavy admin dashboard, where MUI’s table/form/data-grid components and React’s ecosystem depth reduce build time relative to a less mature web framework, and Zustand avoids Redux’s boilerplate for an app of this size (see the root CLAUDE.md’s no-over-engineering principle).

  • Pros:

    • Each service’s language matches what that service actually spends its complexity budget on, instead of fighting a language that wasn’t built for that shape.
    • go-lang-core-lib/rust-lang-core-lib/node-lang-core-lib each mirror the same capability shape (errors, logging, auth, tracing — see the platform’s cross-cutting principles) so a developer moving between languages still recognizes the same conventions, even though the syntax changes.
    • New-service language choice is no longer an open question — the Template Selection Matrix (the platform’s layered architecture standard) already encodes “what kind of service, which language, which template” as one lookup.
  • Cons & Accepted Trade-offs:

    • Three backend languages and two client frameworks mean five sets of tooling, CI configuration, and hiring/onboarding material instead of one.
    • node-lang-core-lib is genuinely behind go-lang-core-lib in parity (no TypeScript types, inconsistent typed-error coverage — see the platform’s cross-cutting principles’ “Node’s known gaps”) — an accepted cost of Node’s footprint here being smaller (migration pipeline + one Cloud Function runtime) than Go’s or Rust’s.
    • A capability that exists in one core lib (e.g. Node’s circuit breaker) has no equivalent in the others where the underlying language/ecosystem doesn’t need or support it the same way — tracked explicitly as a real gap, not silently assumed to exist everywhere (see the platform’s cross-cutting principles capability inventory table).

Option 2 — One backend language (Go) everywhere, Flutter/React unchanged

Move pii-service, pci-service, media-access-service, payment-service, document-service, provider-auth-service, user-secure-engine, notification-service, and the Node migration pipeline onto Go, keeping only the two client frameworks as they are.

  • Pros:
    • One backend language, one core lib, one hiring profile, one CI toolchain for every service.
  • Cons (Why Rejected):
    • Go’s garbage collector and lack of an ownership/borrow-checker model is a real, structural gap for services whose entire purpose is protecting secret material (PII/PCI plaintext, signing keys) — the exact risk Rust’s memory-safety model is chosen to reduce.
    • tenant-migration/tenant-migration-orchestrator predate any Go migration template and are themselves the source pattern @templates/node-mongo-microservice/ was built from — rewriting them in Go would discard a working, already-instrumented pipeline for no workload-shape benefit.

Option 3 — One full-stack language (Node/TypeScript) for backend, web admin, and Cloud Functions; Flutter unchanged for mobile

Standardize every backend service and ui-admin-application on Node/TypeScript, since a browser can only run JS/TS anyway and Cloud Functions already requires it.

  • Pros:
    • Backend and admin-web share one language, reducing the number of ecosystems to two (Node + Flutter) instead of four.
  • Cons (Why Rejected):
    • No official Temporal SDK for Node — order-service’s checkout saga would lose its only viable workflow-orchestration runtime in this ecosystem.
    • node-lang-core-lib is explicitly documented as not yet at parity with go-lang-core-lib (see the platform’s cross-cutting principles) — moving every domain/CRUD service onto Node today would mean building out that parity under migration pressure, rather than as planned, incremental hardening.
    • Node’s memory-safety model is no stronger than Go’s for the encryption-critical services Option 1 already gives to Rust for a specific reason — this option doesn’t address the same concern Option 2 fails on, it just relocates it.

Final Decision

Option 1 is selected. It is already the pattern every real service and client app in this platform uses — this ADR documents the built system’s rationale, not a proposal. Go is the default for domain/CRUD services and the sole Temporal host; Rust is reserved for services whose core job is protecting secret material or verifying identity on the hot path; Node/NestJS hosts the migration pipeline and the one Firebase Function runtime; Flutter and React are each the standard choice for their respective client target. Matching language to workload, rather than forcing one language platform-wide, is the accepted trade-off for this monorepo’s size and the number of genuinely different problems it solves.