Renoxium Docs Pricing Sign in Sign up

18 — Build plan: components, dependencies, and parallel tracks

This document lists everything we build, in two groups: platform components (crates and packages) and official modules (installable into tenant apps). For each it states what it depends on, so agents and people can see what can proceed in parallel and what must wait.

Part A — Platform components

Catalog

IDComponentLocationLanguageDepends onPhase
P1renox-runtimecrates/renox-runtimeRustSupabase Edge Runtime / deno_runtime (external)F0–F1
P2renox-datacrates/renox-dataRustrusqlite/libSQL (external); sqlx for external datasources (F6+)F1
P2bSDK query-builder drivers (renox/kysely, renox/drizzle) and schema → db.d.ts generationsdk/, cli/TypeScriptP2 op contract, P10, P11F2 (types), F4+ (drivers)
P2cExternal datasource connectors (Postgres/MySQL pool in the cell, ctx.datasource) and renox db migrate-to postgrescrates/renox-data, cli/Rust + TypeScriptP2, secrets (P12), network allowlist (P1)F6–F7
P3renox-gatewaycrates/renox-gatewayRusthyper, axum, rustls (external)F1
P4renox-metercrates/renox-meterRust—F1
P5renox-cell (binary renox-worker)crates/renox-cellRustP1, P2, P3, P4; later P6, P7, P8F1
P6renox-templatecrates/renox-templateRusthtml5ever, minijinja (external); P8 for can()F0 (prototype), F2
P7renox-realtimecrates/renox-realtimeRust— (integrates with P5)F5
P8renox-authzcrates/renox-authzRustcedar-policy (external); P2 for role storageF5
P9Module Brokerinside crates/renox-runtime (ops) + crates/renox-data (outbox)RustP1, P2F4
P10SDK (renox package)sdk/TypeScriptOp contracts from P1 (types only)F1 onward, grows per phase
P11CLI (renox)cli/TypeScript (Bun)P10; P6 transpiler (as a Wasm build or via the embedded worker); P5 for renox devF1 onward
P12Control plane APIcontrol/apiTypeScript (Bun, Hono)Artifact format and route-table contract from P5/P11; Postgres; object storageF3
P13Control plane dashboardcontrol/dashboardRenox app (dogfooding)P12; P6, P10F3 (basic), F7 (full)
P14Billingcontrol/billingTypeScriptP12; meter format from P4F3
P15Process sandbox and tiersops/ (systemd units, cgroup/seccomp profiles), P5 integrationRust + opsP5F6
P16Replication and backupP2 (Litestream sidecar / libSQL replica), control plane failover logic in P12Rust + TSP2, P12F6
P17Observabilitytracing in all crates; collector configRust + opsAllF6
P18Module registry and signaturescontrol/api (registry endpoints), P11 (renox publish)TypeScriptP12, P11F7
P19Benchmarksbench/Shell + TS + Rust harnessP1 (F0), then everythingF0 onward
P21Platform MCP server (renox mcp local via stdio; mcp.renoxium.com remote with OAuth 2.1 scopes, confirmation tokens, audit)cli/ (local), control/api (remote)TypeScriptP11, P12; docs as resourcesF2–F3 (local), F3–F4 (remote)
P23Domain and certificate manager: verification (TXT), DNS checks, ACME (HTTP-01, DNS-01 wildcard), certificate store and distribution to gateways, Domains API (ctx.domains)control/api (manager), crates/renox-gateway (SNI + cert reload)TypeScript + RustP3, P12; object storage/KMS for keysF3 (basic custom domains), F7 (wildcard, Domains API)
P22App MCP (functions/tools/, module [[tools]], /mcp per app with OAuth from auth, Cedar actions, metering) and ctx.ai (provider access, optional AI gateway, durable agent jobs)crates/renox-runtime (ops), sdk/, control/ (gateway)Rust + TypeScriptP8 authz, M1 auth (OAuth server), P9 outbox, P4 meteringF5 (App MCP), F7 (ctx.ai)
P20Example appsexamples/Renox appsP10, P11F0 onward

Dependency graph

                 external: Supabase Edge Runtime / deno_runtime, rusqlite, minijinja, cedar-policy
                                   │
   ┌──────────┬──────────┬─────────┼─────────┬──────────┐
   ▼          ▼          ▼         ▼         ▼          ▼
  P1        P2         P3        P4        P6*        P8*          * leaf crates: can start on day one
runtime    data      gateway    meter    template    authz         (P6 prototype in F0; P8 in F5)
   │          │          │         │         │          │
   └──────────┴──────────┴────┬────┴─────────┴──────────┘
                              ▼
                        P5 renox-cell (worker binary)          P7 realtime plugs into P5 later
                              │
            ┌─────────────────┼─────────────────┐
            ▼                 ▼                 ▼
      P10 SDK           P19 bench          P11 CLI (dev = embedded worker)
            │                                   │
            └──────────────┬────────────────────┘
                           ▼
                  P12 control plane API ──► P13 dashboard, P14 billing, P18 registry
                           │
                     P15 sandbox/tiers, P16 replication, P17 observability (ops track)

Parallel tracks

Work is organized into tracks that touch disjoint code. Within a track, items are sequential; across tracks, items at the same row can run at the same time.

RowTrack R (Rust data plane)Track T (TypeScript: SDK, CLI, control plane)Track M (modules and examples)Track O (ops, bench)
0 (F0)P1 spike: run Edge Runtime, measure B1/B4; P6 transpiler prototypeP10 type sketch of ctx and opsP20 hello, npm-compat examplesP19 harness for B1, B4, B9, B17
1 (F1)P2 data (authorizer, pool), P3 gateway, P4 meter — all three in parallel (leaf crates)P10 SDK v0 (db, fetch, secrets, log)P20 evil exampleP19 B5, B11, B12 scripts
2 (F1)P5 cell: wire P1–P4; eviction; limitsP11 CLI: new, dev (embedded worker), check (lint)P20 shop skeleton (functions only)B12 noisy-neighbor run
3 (F2)P6 template: transpiler, renderer, fuel, fragment map; render path B prototypeP11 CLI: template transpile step, .renox/types generationP20 shop pages and partialsB6, B7, B8, B9, B13
4 (F3)P5 hardening from F2 findings; artifact loader from object storageP12 API, P14 billing, P13 basic dashboard — parallel with Track R row 4P20 shop deployed through the real control planeB15 deploy benchmark
5 (F4)P9 broker ops: service call, events/outbox, hooks, slots; migration runner in P2P11 add, migrate; lockfile; P10 renox:modules typesM1 auth, M2 org (see Part B)B19 Litestream overhead prep
6 (F5)P8 authz; P6 r-can; P7 realtime; P2 scoped rewriterP10 authz, realtime APIs; P11 authz explain, testM3 2fa, M9 notifications (realtime); chat exampleB14 realtime
7 (F6)P15 sandbox/tiers integration; P16 replication hooksP12 failover logic; P17 dashboards—P15/P16/P17 rollout; B18 failover
8 (F7)P1 isolate mode for marketplace modulesP18 registry, renox publish; pricing in P14M4 billing, M5 admin, M6 storage, M7 email; public docsPen test, abuse controls

Rules for parallel work:

  • A track may only consume another track's output through a written contract committed first: op signatures (P1↔P10), artifact format and route table (P5/P11↔P12), meter record schema (P4↔P14), manifest schema (P9↔P11↔M*). Contracts live under docs/contracts/ once they exist.
  • Leaf crates (P2, P3, P4, P6, P7, P8) must not depend on each other; integration happens only in P5. This keeps them independently buildable and testable by separate agents.
  • Modules (Part B) depend on the SDK version in which their required APIs exist; a module PR that needs a missing SDK API first lands the SDK change.

Part B — Official modules

Catalog

IDModuleWhat it providesTables (prefix)Depends onRequires platformPhase
M1authUsers, password (argon2id), sessions, magic links, OAuth/OIDC (Google, GitHub, Microsoft), password reset, hook points auth.after_login, auth.before_register; ctx.authauth__users, auth__sessions, auth__identities, auth__tokens—P9 broker (services, hooks), P2 migrationsF4
M2orgOrganizations/workspaces, memberships, invitations, roles per org, org switcher; feeds scope into authzorg__orgs, org__members, org__invitesM1P9F4
M32faTOTP, WebAuthn/passkeys, recovery codes; sets context.mfa_verified; fills auth.after_logintwofa__totp, twofa__webauthn, twofa__recoveryM1P8 authz (context attribute), P9 hooksF5
M4billingPlans, subscriptions, invoices, usage records, checkout and webhooks for Stripe, Checkout.com, Telr, PayTabs, N-Genius, Tabby/Tamara (see M17); public view billing__public_user_plans_v1; events billing.*billing__plans, billing__subscriptions, billing__invoices, billing__usage, billing__webhook_eventsM1, M2P9 events/outbox, fetch allowlist, secretsF7
M5adminAdmin layout, CRUD scaffolding from table metadata, user and org management, audit viewer, slot admin.sidebaradmin__settingsM1, M2P6 slots, P8 r-canF7
M6storageFile uploads to object storage, signed URLs, per-tenant quotas, and the image pipeline (see below)storage__files, storage__variantsM1Platform storage API (P1 op), image op in Rust (image/libvips), P4 meteringF7
M7emailTransactional email via Resend/SES/SMTP, templates rendered with the template engine, outbox-backed sending, suppression listemail__messages, email__suppressions— (listens to auth.*, billing.* events)P9 events, P6 render, fetch allowlistF7
M8auditAppend-only audit trail for sensitive actions, viewer in adminaudit__eventsM1P8 (sensitive action hook)F5 (lib), F7 (UI)
M9notificationsIn-app notifications, SSE live badge, preferences; bridges events to email (M7)notif__items, notif__prefsM1P7 realtime, P9 eventsF5
M10jobsScheduled and queued jobs UI, retries, dead-letter viewer (thin UI over the platform outbox/scheduler)jobs__runs—P9 outbox, scheduler in P5F6
M11searchFull-text search over declared tables using SQLite FTS5, search box partialsearch__index_*—P2 (FTS5 enabled), P6 partialsF7+
M12i18nLocale detection, translation catalogs, t filter, currency/date filtersi18n__catalogs—P6 filtersF7+
M13analyticsPrivacy-friendly page and event analytics per tenant app, dashboard partialanalytics__events_*—P4 or dedicated op, P7 for liveF7+
M14cmsContent types, markdown/rich text, media via M6, public pagescms__*M1, M6P6Later
M15whatsappWhatsApp Cloud API: notifications, OTP, templates, light inbox, chat-to-orderwa__messages, wa__templates— (listens to events)P9 events, fetch allowlistF5
M16auth phone-first + UAE PASS (extension of M1)+971 OTP via WhatsApp/SMS, passkeys, UAE PASS OAuth providerin auth__*M1, M15 (OTP transport)P8F4–F5
M17payments-gcc (extension of M4)Stripe UAE, Checkout.com, Telr, PayTabs, N-Genius adapters; Apple/Google Pay; Tabby/Tamara BNPL; COD; bank-transfer reconciliationin billing__*M4fetch allowlist, secretsF7
M18tax-gccFTA tax invoices (TRN, 5% VAT, zero-rated/exempt), credit notes, VAT period reports, Peppol/ASP adapter interface; ZATCA adapter latertax__invoices, tax__periodsM2, M4P6 (PDF render)F7
M19i18n RTL (extension of M12)EN/AR for all official modules, RTL layout, Eastern Arabic digits and Hijri optional, AED/date formats, Arabic plural rulesin i18n__*M12P6 RTL supportF4 (core), F7 (complete)
M20delivery-gccAramex, Careem/Quiqup shipments and tracking; Talabat/Deliveroo order ingestiondelivery__shipmentsM4fetch allowlistF7+
M21marketplace-syncNoon and Amazon.ae stock and order syncmkt__listings, mkt__orders—P9, fetch allowlistF7+
M22reportsSales/cash reports, Excel/CSV export, Zoho Books / QuickBooks / Xero exportreports__snapshotsM4P6F7
M23gcc-dataEmirates and areas, +971 validation, Emirates ID and TRN format checks, trade license field, Makani/P.O. Box address componentgcc__areas—P6 componentsF4 (small)
M24bookingSchedules, slots, deposits, WhatsApp reminders; base for salons, clinics, fitness, home servicesbooking__*M1, M15, M4P7 realtimeF7

Market rationale, starters (booking, restaurant-ordering, shop, real-estate-crm, tourism-booking, invoice, membership, company-profile), and verification items are in 21-uae-gcc-strategy.md. M15–M24 join the waves as follows: M23 and M19 core in W2; M15 and M16 in W3; M17, M18, M22, M24 in W4–W5; M20 and M21 in W6.

M6 image pipeline

Originals are stored once; variants are produced on demand, cached, and served like static files. The tenant writes one tag (<x-image>, 08-template-engine.md); the browser receives a small, correctly sized image in the best format it supports.

StepBehavior
UploadOriginal stored in object storage; width, height, hash, and MIME recorded in storage__files; size and type limits enforced; EXIF/GPS stripped for privacy; SVG sanitized or rejected
Request /_img/<id>?w=400&f=autoGateway checks the variant cache. On a miss, a Rust op (image crate or libvips via FFI, decided in F7 by quality/speed) resizes, crops (fit, focus), and encodes: f=auto picks AVIF or WebP from Accept, else JPEG/PNG. The variant is stored as <hash>-w400-avif in object storage and recorded in storage__variants
Subsequent requestsServed from the variant cache with Cache-Control: public, max-age=31536000, immutable (URLs are content-addressed); never touches the tenant isolate
Allowed sizesOnly widths declared in [storage.images] widths = [200, 400, 800, 1600]; other values round to the nearest, which bounds the number of variants per original
<x-image> outputsrc, srcset for 1x/2x, width/height from metadata (no layout shift), loading="lazy", decoding="async", optional blur placeholder (tiny inline data URI)
MeteringTransform CPU is platform time; variant count and storage bytes are billed to the tenant; a per-tenant transform rate limit prevents abuse
Private imagesSigned URLs with expiry for files not marked public; the same pipeline applies
LaterFocus-point cropping, watermarks, animated formats, video thumbnails

Module dependency graph

            M1 auth
          ┌───┼──────────┬───────────┬──────────┐
          ▼   ▼          ▼           ▼          ▼
       M2 org  M3 2fa   M6 storage  M8 audit   M9 notifications
          │                                        │
     ┌────┴────┐                                   │
     ▼         ▼                                   │
  M4 billing  M5 admin ◄── slots from M4, M6, M8, M9, M10
                                                   │
  M7 email ◄── events from M1, M4, M9 (no hard dependency; event subscriptions only)

  Independent of auth: M7 email, M10 jobs, M11 search, M12 i18n, M13 analytics

Build order and parallelism

WaveModulesWhy togetherBlocked by
W1M1 authEverything user-facing depends on it; also the first real test of services, hooks, migrationsP9 broker, P2 migrations, P11 add (F4)
W2 (parallel)M2 org, M7 email, M10 jobsM2 needs only M1; M7 and M10 need no other module, only platform events/outboxW1 for M2; P9 events for M7/M10
W3 (parallel)M3 2fa, M8 audit, M9 notificationsAll need M1 and platform authz/realtime; none needs each otherP8 authz, P7 realtime (F5)
W4 (parallel)M4 billing, M6 storageM4 needs M1+M2; M6 needs M1 and the storage op; they do not touch each otherW2 for M4; P1 storage op for M6
W5M5 adminConsumes slots from most modules; best built once M4/M6/M8/M9 exist to fill itW3, W4
W6 (parallel, optional)M11 search, M12 i18n, M13 analytics, M14 cmsIndependent, demand-drivenPlatform features as listed

Definition of done for a module

  1. module.toml with declared tables, permissions, config, services, events, hooks, slots, and authz actions.
  2. Forward-only migrations with checksums; at least one versioned public view if other modules need its data.
  3. Services with generated types; events documented with payload schemas.
  4. Default Cedar policies and a policy test file.
  5. Pages/partials use r-can for UI and guard/authz.require for enforcement; user-owned tables accessed via db.scoped.
  6. Tests: unit (services), authorization (per role), template snapshots (per role), and an install/upgrade test against the shop example.
  7. Documentation page under modules/<name>/README.md: install, config, permissions, services, events, hooks, slots, overrides.
  8. Metered and within default quotas on the shop example (no regression on B6).

Part C — Suggested agent assignment

When several agents work at once, assign by track and keep each PR inside one component:

AgentScopeMust not touch
Agent R1P1 runtime, P5 cellcontrol/, modules/
Agent R2P2 data, P6 template (leaf crates)P1, P5 integration (hand over via contracts)
Agent R3P3 gateway, P4 meter, P7 realtime, P8 authz (leaf crates)P1, P5 integration
Agent T1P10 SDK, P11 CLIcrates/ internals beyond op contracts
Agent T2P12 API, P13 dashboard, P14 billing, P18 registrycrates/, cli/
Agent M1Official modules in the current wavePlatform crates; SDK changes go through Agent T1
Agent O1P15–P17 ops, P19 benchmarks, P20 examplesProduct code except test fixtures

Hand-offs happen only through committed contracts and passing tests; see AGENTS.md for the PR rules.

Source on GitHub