TecnoStack
Start a projectالعربية
Flow: Billing, Orders interface, Orders data.
Product & strategy

Record five early decisions for a minimum viable product: module boundaries, data ownership, API contracts, observability and recovery. Use an original decision record and acceptance checks to keep the next release reviewable.

In this article

Silent video with on-screen text. The transcript below repeats every screen and describes what it shows.

Watch on the video page

  1. 0:00–0:05

    MVP architecture; Illustrative diagram; TecnoStack; 1 2 3 4 5 6; MVP architecture; Design costly-to-change boundaries early; Keep the initial system simple; Early decision; Easy reversal; Costly reversal

    Branching diagram: Early decision, Easy reversal, Costly reversal. Connections: Early decision to Easy reversal; Early decision to Costly reversal. Emphasis: Costly reversal.

  2. 0:05–0:10

    MVP architecture; Illustrative diagram; TecnoStack; 1 2 3 4 5 6; 01; Organize around business capabilities; Start with a modular application; One app; Orders; Billing; Accounts

    Network: One app, Orders, Billing, Accounts. Connections: One app to Orders; One app to Billing; One app to Accounts. Emphasis: One app.

  3. 0:10–0:15

    MVP architecture; Illustrative diagram; TecnoStack; 1 2 3 4 5 6; 02; Assign clear data ownership; Reach data through its owner; Billing; Orders interface; Orders data

    Flow: Billing, Orders interface, Orders data. Connections: Billing to Orders interface; Orders interface to Orders data. Emphasis: Orders interface.

  4. 0:15–0:20

    MVP architecture; Illustrative diagram; TecnoStack; 1 2 3 4 5 6; 03; Document interfaces and retries; Plan failures across boundaries; Clients; API contract; Modules; Provider adapters

    Layered diagram: Clients, API contract, Modules, Provider adapters. Connections: Clients to API contract; API contract to Modules; Modules to Provider adapters. Emphasis: API contract.

  5. 0:20–0:25

    MVP architecture; Illustrative diagram; TecnoStack; 1 2 3 4 5 6; 04; Observe each controlled rollout; Plan recovery for data too; Feature flag; Limited rollout; Observe; Recover / expand

    Sequence: Feature flag, Limited rollout, Observe, Recover / expand. Connections: Feature flag to Limited rollout; Limited rollout to Observe; Observe to Recover / expand. Emphasis: Observe.

  6. 0:25–0:30

    MVP architecture; Illustrative diagram; TecnoStack; 1 2 3 4 5 6; TECNOSTACK; Revisit decisions when evidence changes; Read the full guide; New evidence; Review choices; Extract if needed; tecnostack.com

    Flow: New evidence, Review choices, Extract if needed. Connections: New evidence to Review choices; Review choices to Extract if needed. Emphasis: Review choices.

For a minimum viable product (MVP), record five architecture decisions early: module boundaries, data ownership and tenancy, API contracts, production visibility and recovery. They affect how the team can change the next release. A modular application is a useful starting point when its boundaries fit the work and the team can operate it.

Here, MVP means a minimum viable product, not the Model-View-Presenter interface pattern. The defaults below are TecnoStack’s engineering guidance for small product teams in Saudi Arabia and the GCC. Check them against actual constraints rather than treating them as a universal architecture or a growth guarantee.

The hardest to reverse are the ones customers, partners and stored data come to depend on. You can usually swap a cache library or a logging tool in a contained change. Untangling modules that read each other’s tables, or changing tenant isolation, can affect existing integrations, stored records and recovery procedures.

Use reversibility as your test. A plan built around "what happens at 100,000 users" guesses at problems the product may never have.

DecisionGood-enough MVP defaultWhy it is costly to change laterRevisit when
Module boundariesOne deployable app, one module per business capabilityHidden cross-module calls and shared tables spread through the codeA module needs its own scaling, release schedule or team
Data ownership and tenancyOne owning module per table; tenancy model chosen before the first business customerEvery query, migration and export assumes the modelA tenant needs different isolation, residency or export terms
API and event contractsOpenAPI file, versioning policy, idempotent writesPartners and installed app versions depend on themBefore the first external integration ships
ObservabilityStructured logs with request IDs, journey metrics, symptom alertsWithout history you cannot compare before and after a changeIncidents take guesswork, or alerts fire with nothing to do
Rollout and rollbackPipeline deploys, feature flags, written rollback that covers dataIrreversible data changes turn a bad release into an incidentPeople start avoiding releases

Start with a modular monolith: one deployable application divided into modules named after business capabilities, such as catalogue, orders, billing and accounts. Martin Fowler’s “Monolith First” essay explains the operating overhead of early microservices and the difficulty of finding stable boundaries. It also acknowledges limited evidence and exceptions; use that reasoning to assess your context, not as proof that every product must follow one route.

A modular monolith only works if the boundaries are real:

  • Modules call each other through small public interfaces, never by reaching into another module's classes or tables.
  • Shared code holds generic utilities and no business rules.
  • A dependency check in the build fails when code crosses a boundary, so the rule survives a deadline week.

If a module later needs to scale, deploy or change on its own, its boundary is already drawn. Extraction still means redesigning transactions, latency and failure handling for a network call, so a clean boundary shortens that work without removing it.

The pattern works in any mainstream framework. Choosing a backend stack is a separate decision, best made on your team's skills and each framework's support window.

Diagram: One app, Orders, Billing, Accounts. Connections: One app to Orders; One app to Billing; One app to Accounts.

Figure 1: Organize around business capabilities. Start with a modular application.

Give every business table one owning module, and choose your tenancy model before the first business customer signs. The model shapes every query, migration, backup and security review that follows.

One owner per table means only that module writes to it. Other modules ask through its interface or react to its events. Shared workflows still need explicit design, but nobody discovers six months later that three modules update the same orders row.

Tenancy modelIsolationOperating costUsually fits
Shared tables with a tenant_id columnRequires complete application and database access controlsShared schema simplifies some operations; tenant restores need designTenants with compatible requirements
Schema per tenantSeparation depends on credentials, grants and shared infrastructureMigrations and lifecycle operations cover every schemaCases where schema-level organisation helps operations
Database per tenantSeparate database access; host, identity and service isolation still matterAutomation, backups and monitoring must cover each databaseRequirements that justify separate database lifecycles

Enforce the tenant filter in one place

In shared tables, one forgotten WHERE tenant_id = … is a data leak. Put the filter where every query passes: a repository layer, database policies, or both. In PostgreSQL 18, enabling row-level security without an applicable policy gives default-deny behaviour for normal row access. Superusers and roles with BYPASSRLS bypass it; table owners normally do too unless FORCE ROW LEVEL SECURITY applies. Whole-table operations such as TRUNCATE are outside row-security policies. Connect the application with a role that cannot bypass the policies.

Whichever model you pick, write tests that try unauthorised cross-tenant reads and writes through the API, caches, background jobs, search indexes and exports.

Plan migrations and restores before launch

Ship schema changes as backward-compatible steps: add the new column, backfill it, switch reads, and drop the old column in a later release. Define and test how writes keep both representations consistent during the overlap, including changes made while the backfill runs, before switching reads or removing the old field. Old and new code can then run side by side during a deployment or a rollback. Before launch, restore a backup into a scratch environment on purpose, on a quiet day, so the first restore is not during an outage.

Write down every interface that something outside a module depends on: external APIs, events and third-party integrations. Contracts let a mobile app, a partner or a future service keep working while the code behind them changes.

  • External APIs. Describe them in an OpenAPI file (3.2.1 is the published specification checked on 24 October 2026; confirm your tooling supports the chosen version) and decide your versioning policy before the first partner integrates. If you are building your MVP as an app, treat the API as public from the first release, because older app versions stay on people's phones long after you ship a new one.
  • Idempotent writes. Define how retries avoid a second order or payment. Stripe’s API v1 records the first result after execution begins and returns it for matching retries, subject to its documented key lifetime and concurrency rules. Its API v2 has different retry semantics. For local writes, keep the deduplication decision and outcome consistent with the transaction; external payments or messages also need provider-aware retries and reconciliation. A database transaction cannot atomically include an unrelated external service.
  • Events. Give each event a documented schema and an owner, and treat changes like API changes. Consumers must handle duplicates and follow a stated ordering policy.
  • Third-party providers. Wrap payment, messaging and similar services behind your own adapter, so provider-specific code lives in one place. Switching providers can still mean data migration, token replacement and end-to-end testing, while downstream workflows still need review; the adapter contains provider-specific code, not every consequence of the switch.

Enough to answer two questions without guessing: what is broken, and why. Google's SRE book frames monitoring around exactly those two questions, and they are a fair bar for a first production release.

  • Structured logs with a request ID that follows each request across modules and background jobs. The W3C Trace Context traceparent header standardises propagation of tracing context between services; relate it to your application’s request identifiers rather than assuming they are the same field.
  • Metrics for the few journeys that pay the bills, such as sign-up, checkout or booking, using the SRE book's four golden signals: latency, traffic, errors and saturation.
  • Traces for slow or failing requests, so you can see which step took the time.
  • Alerts on symptoms users would notice. The SRE book advises putting far more effort into catching symptoms than causes; page someone for failed checkouts and leave internal warnings on a dashboard.

OpenTelemetry gives you one vendor-neutral way to emit traces, metrics and logs, which reduces dependence on one monitoring backend; exporter configuration and compatibility still need review when changing tools. Keep personal data out of logs or mask it, and set retention limits. If you would rather not run this yourself, server operations and monitoring can sit in a managed set-up, with monitoring, backups and response procedures written down for your team.

Ship small changes through an automated pipeline, separate deploying code from releasing features, and write down how each release rolls back, including the data it writes.

  1. Run automated tests and deploy through a pipeline, never by hand from a laptop.
  2. Use feature flags, so you can switch a feature off without redeploying.
  3. Release gradually where you can: internal users first, then a small share of traffic.
  4. Write the rollback before the release, and say what happens to records the new version created.

Redeploying the old version does not undo database writes, payments or messages already sent. Keep schemas compatible with the versions that must remain usable, plan reconciliation or compensating actions, and delay destructive clean-up until you have verified recovery. The same thinking scales up to a full migration, which our guide to cutover and rollback planning walks through.

Diagram: Feature flag, Limited rollout, Observe, Recover / expand. Connections: Feature flag to Limited rollout; Limited rollout to Observe; Observe to Recover / expand.

Figure 2: Observe each controlled rollout. Plan recovery for data too.

Revisit the five decisions at fixed points, such as before a major launch or a funding round, and whenever the evidence changes. Signals worth acting on:

  • A module needs to scale or deploy on a different schedule from the rest.
  • Two teams keep colliding in the same part of the codebase.
  • A tenant's data, isolation or compliance needs differ from everyone else's.
  • One journey's latency or error rate dominates your dashboards.

For the review itself, the six pillars of the AWS Well-Architected Framework (operational excellence, security, reliability, performance efficiency, cost optimization and sustainability) make a useful checklist even if you never use an AWS service. When a module does need to leave, the strangler fig pattern puts a proxy in front of the system and moves traffic to the new component one route at a time. AWS's guidance adds a caveat: for a small application, a complete rewrite can be more efficient than incremental migration.

A decision record for the next release

Use this original example for a hypothetical visit-request product. The team needs assignment and completion, has one delivery team and has not demonstrated a need for independent deployment. Those are example assumptions, not findings about your organisation.

Decision-record fieldIllustrative entry
Decision and boundaryKeep visit assignment in one deployable application with a named owning module
Alternative consideredSeparate assignment service with its own network and release boundary
Reason for this releaseOne team needs a complete workflow; independent release needs are unproven
Consequence acceptedThe application deploys together; module access rules must be enforced
Acceptance evidenceRepeated assignment requests, forbidden cross-tenant access and a recovery rehearsal
Revisit triggerObserved release conflicts or measured workload isolation needs, with an owner to investigate

The evidence should test the decision’s consequences. Retry the same intended assignment and inspect the final record. Attempt an unauthorised tenant read through an export and a background job, not only the web screen. Rehearse recovery after the new version writes data, using an isolated environment with external side effects controlled.

A failing test identifies work to resolve; it does not automatically justify splitting the application. Record the failure, cause, proposed change and trade-off. If a separate service becomes justified, add its network failure, data consistency, deployment and operating responsibilities to the next decision record. Link these checks to the software requirements brief so the architectural choice supports an accepted task.

Two decisions come before architecture: whether to build at all, and who builds it.

  • Modules named after business capabilities, with a boundary check in the build.
  • One owning module per table, a written tenancy model and cross-tenant tests in CI.
  • Backward-compatible migrations, and one backup restored on purpose.
  • An OpenAPI file, a versioning policy and idempotent writes before the first integration.
  • Request IDs across modules, golden-signal metrics for key journeys and symptom-based alerts.
  • Pipeline deploys, feature flags and a written rollback that covers data.
  • A review date in the calendar.

TecnoStack’s custom software service can scope a first release and its operating handover. Bring the workflow, dependencies and known constraints. For the delivery process itself, use the CI/CD guide and deployment recovery plan to agree evidence and ownership.

We checked these sources on 24 October 2026. The five decisions and their defaults are TecnoStack's engineering guidance, not requirements from AWS, Google or any other vendor.

Discuss your website, store, app or AI project in Arabic or English. We agree the scope before work starts.

Book a free scoping callCompare services and prices