Skip to content

Technology · 01 Architecture & Structure

How we structure a product, and what it costs to change.

Modular monolith or microservices, queues or direct calls, one tenant or many: the shape of a system decides how cheap it is to change in year three. Here is how OlDevs picks a structure, what each one costs later, and how we hand it over.

Updated September 2026 You own everything Reply within one business day

build-orchestrator

main

src/

queue.ts

pool.ts

retry.ts

types.ts

index.ts

export interface BuildJob {

repo: string;

region: "ca-west-1";

}

export async function queue(

job: BuildJob,

): Promise<Run> {

return await pool.add(job);

212

Tests passed

0

Type errors

1.4s

Build time

Watching src/ — optimised rebuild on save

Architecture & Structure, in short

OlDevs, a full-stack studio in Vancouver, starts most products as a modular monolith with clear internal boundaries, an API-first design and a single deployment pipeline, then splits out services or serverless functions only where scale, isolation or team size justifies the added operating cost.Every structural choice is recorded with its trade-offs, covered by automated tests and CI/CD, and handed over with documentation so the client's own team can maintain it.

Key facts

01Default choice
Modular monolith with API-first boundaries
02Split into services when
Teams, scaling or compliance need independence
03Async by default for
Email, webhooks, media, reports, syncs
04Testing shape
Pyramid: many unit, some integration, few end-to-end
05Delivery
Trunk-based CI/CD, working demo every week
06Updated
September 2026

01 · Architecture & Structure

Six ways to structure a product, and when each fits

Each structure below solves a real problem and creates a new one, so we choose by the problem you actually have.

01

Modular monolith

The right first choice for most products: one deployable, strict module boundaries, one database, one pipeline. Cheap to run and easy for a small team to reason about. The later cost is discipline; if boundaries erode, extracting a service means untangling shared code first.

Default · One deployable · Low operating cost

02

Microservices

Right when separate teams need to ship independently, or one part of the system has very different scaling or compliance needs. The cost arrives immediately: service discovery, distributed tracing, contract testing and an on-call rota. We recommend it only when the organisation can staff it.

Independent teams · Isolation · Higher operating cost

03

Serverless functions

A good fit for spiky or infrequent workloads: image processing, scheduled jobs, webhooks, low-traffic APIs. Nothing runs while idle and capacity grows without planning. Later costs are cold starts, vendor-specific packaging and debugging across dozens of small functions instead of one process.

Spiky load · Pay per use · Vendor coupling

04

Event-driven and queue-based

Right when work can happen after the request returns: emails, invoices, sync jobs, media, notifications. Queues absorb bursts and let one failure retry without taking the site down. The cost is eventual consistency; the interface and the reporting must be designed to tolerate a short delay.

Resilience · Background work · Eventual consistency

05

API-first and headless CMS

Right when the same content or data feeds a website, a mobile app and partner integrations. Editors get a proper CMS, developers get a typed API, and the front end can change without touching the back end. The cost is two systems to host, secure and upgrade instead of one.

Multi-channel · Headless · Typed contracts

06

Multi-tenant SaaS

Right when many customers share one product and you want one codebase and one deployment. A shared schema with a tenant column is cheapest; schema-per-tenant or database-per-tenant buys isolation for regulated customers. Picking the wrong tier is expensive to reverse once real data exists.

SaaS · Tenant isolation · Row-level security

Stack

What we build on.

Concrete tools, current at the time of writing; confirmed for your project at scoping.

Monorepo and build

pnpm workspacesTurborepoNxTypeScriptesbuildGradle

API and contracts

OpenAPI 3.1GraphQLtRPCgRPCJSON SchemaZod

Messaging and jobs

Amazon SQSRabbitMQApache KafkaRedis StreamsBullMQTemporal

Testing

VitestJestPlaywrightTestcontainersPactk6

CI/CD and delivery

GitHub ActionsGitLab CIDockerTerraformArgo CDRenovate

Observability and documentation

OpenTelemetryPrometheusGrafanaSentryArchitecture Decision RecordsC4 diagramsDocusaurus

What changed

2025–2026 updates.

What moved in this area and what it means for your build.

  1. 2026

    Monolith-first is the mainstream default again

    After years of public write-ups on the cost of running many small services, most teams now start with a modular monolith and split later. For a client this means a simpler first release, fewer cloud line items and a system one person can hold in their head.

  2. 2026

    AI coding assistants raise the value of boundaries

    Assistants produce code quickly but drift across modules and duplicate logic. We now encode layering rules as lint checks and contract tests so generated code stays where it belongs, which keeps the codebase maintainable after the assistants have moved on.

  3. 2025

    OpenTelemetry became the expected instrumentation standard

    Vendor-neutral traces, metrics and logs are now assumed from day one rather than bolted on. Clients can move between Grafana, Datadog or another vendor without rewriting instrumentation, and outages are diagnosed from a trace rather than from guesswork.

  4. 2025

    Durable workflow engines went mainstream

    Tools such as Temporal for long-running, retryable processes (customer onboarding, billing runs, document pipelines) are replacing hand-built chains of cron jobs and queues. The client benefit is fewer half-finished processes and a visible history of every step.

  5. Late 2025

    Edge runtimes matured, but data stayed regional

    Running authentication, redirects and personalisation at the edge is now routine. The data still lives in one region, so for Canadian clients with residency requirements we design which logic may run at the edge and which must stay inside a Canadian region.

  6. 2026

    Platform templates replace bespoke setup

    Golden-path templates for new services and repositories, with CI, logging, secrets handling and security scanning preconfigured, are now standard practice. For a client with several products this means consistent operations across every repository we hand over.

How we choose

Six questions we ask before recommending anything.

01

Who will maintain it after launch

The structure has to fit the team that will own it. An in-house team of two gets a monolith they can run, not twelve services they cannot. If we are the long-term maintainers, we still design for the day that changes.

02

Hosting region and data residency

Public sector, health-adjacent and financial clients often need data to stay in Canada. That constrains which managed services, queues and serverless regions are available, and it is settled before any other structural choice.

03

The budget of change

For each major decision we estimate what it would cost to reverse in eighteen months. Decisions that are cheap to undo, such as adding a queue, are made quickly; those that are not, such as the tenancy model, get a written options review.

04

Real load, not imagined load

We size for the traffic you have and the traffic your launch plan can plausibly produce. Scale paths are designed and documented, but the extra machinery is built when a measured signal calls for it, not before.

05

Release cadence and team count

The number of groups that must ship on their own schedule sets the number of independent deployables. One product team means one pipeline; several teams with separate roadmaps justify separate services and contracts between them.

06

Compliance and audit needs

Audit logging, tenant isolation, role boundaries and retention rules are far cheaper to design in than to retrofit. When a client expects SOC 2, PIPEDA or provincial privacy review, those requirements shape the module and data boundaries from the start.

Who it's for

Architecture & Structure for organisations that have to get it right.

Whether the audience is a customer, a member, a citizen, or your own team, the choice has to hold up under real use.

Corporations

You have existing systems, an identity provider and an architecture review board. We produce decision records, integration diagrams and a security model your internal reviewers can approve, then hand the codebase to your IT organisation with a runbook they can follow.

Associations and government

Procurement wants clarity and a long service life on a small budget. We favour boring, well-documented structures, Canadian hosting, WCAG 2.2 AA accessibility and bilingual EN/FR support, and we avoid dependencies that would tie you to a single vendor or to us.

Franchises

Head office needs one system; each location needs its own data, menus, pricing or staff. A multi-tenant structure with clear ownership rules lets you onboard a new location in minutes and roll out a change to all of them at once without touching each site by hand.

Startups

You need to ship this quarter and survive due diligence next year. A modular monolith with tests, CI/CD and decision records gets you to market fast, satisfies technical reviewers, and keeps a clear path to split services when growth, not ambition, demands it.

FAQ

Architecture & Structure — questions we hear first.

Usually not. Microservices pay off when several teams must release independently or when one component has very different scaling or compliance needs. Below that point they add network failures, tracing, contract testing and on-call duty without adding product value. We start with a modular monolith whose boundaries are ready to become services, and we extract one only when a measured need appears.

It is one application deployed as one unit, but organised inside into modules that talk to each other only through defined interfaces. Billing cannot reach into the orders database directly; it calls the orders module. You get the simplicity of one process and one pipeline, while keeping the option to lift any module into its own service later without a rewrite.

We look at the shape of the traffic and the length of the work. Short, bursty or occasional tasks such as webhooks, image resizing and scheduled reports suit functions. Long-lived connections, steady traffic, heavy dependencies or strict latency needs suit containers. Many of our systems use both: a containerised core with functions around the edges, all defined in one infrastructure repository.

Handover starts on day one, not at the end. Every repository ships with a README that gets a new developer running locally, architecture decision records that explain why things are the way they are, C4 diagrams, a runbook for deployments and incidents, and CI that enforces tests and linting. You own all code, designs, accounts and IP, and we walk your team through it on recorded calls.

We follow the testing pyramid: many fast unit tests, a smaller layer of integration tests against real databases and queues using containers, and a few end-to-end browser tests for the critical paths. Every push runs the suite, every merge to the main branch deploys to a staging environment, and production releases are a reviewed, reversible step with health checks and automatic rollback.

Yes, and we prefer to. We map the current system, add tests and observability around the parts that matter, then move responsibilities out one seam at a time, often using the strangler pattern behind an API gateway. The business keeps shipping while the structure improves, and each step can be paused or reversed if priorities change.

Each significant choice gets an architecture decision record: the context, the options considered, the decision and its consequences, in a page or less, stored in the repository next to the code. Diagrams follow the C4 model so a newcomer can zoom from the system context down to a component. The record is updated when the decision changes, so the history is never lost.

Still have a question? Ask us when you request a quote

Let’s connect

Let’s scope your build.

Tell us what you’re building. We’ll reply within one business day with recommended platforms, structure and a tailored quote — no obligation.

We’ll only use your details to prepare your quote. No lists, no spam.

Call us Request a quote