To specify a mobile app's architecture, you don't start with a diagram. You start by writing down the constraints that will settle the big arguments before they happen: which platforms and minimum OS versions you must support, whether the app works offline, how sensitive its data is, and what your team can realistically build and maintain. From there you choose layers and boundaries, name the patterns and technologies, and write the rules that keep the design consistent. The architecture specification is a short, testable document — not a binder — and the condition that makes it useful is that every decision has a stated reason and an owner.

The rest of this guide gives you an ordered way to produce that document, with the trade-offs spelled out at each step and a concrete structure you can copy. The emphasis is on distinctions that actually change code: native versus cross-platform, local-first versus server-authoritative, and where state, security, and sync logic are allowed to live.

Start with constraints, not diagrams

Architecture is the set of decisions that are expensive to reverse. That framing tells you what belongs in the first pass. A color choice is cheap to change; a decision to store all user data locally with no server is not. So the opening move is to enumerate the forces that will pin those expensive decisions down.

Write these down before you draw anything:

Platforms and floor versions. iOS and Android, or one of them, plus the oldest OS version you'll support. This sets your language and UI-toolkit options. Android's official minimum SDK guidance, for example, has risen over the years; you need to record your actual floor, not assume a default. Connectivity reality. Does the app need to function with no network? This single question drives storage, sync, and conflict handling more than any other. Data sensitivity. Health records, payment data, or a personal to-do list? Security and regulatory obligations attach here. Team and skill set. A four-person team that knows Kotlin and Swift will build a native app faster than they'll build a cross-platform one, and vice versa. Size and lifespan. A throwaway prototype and a five-year product warrant different rigor. Non-functional budgets. Cold-start time, frame rate, battery use, app download size, and memory ceiling. State them as numbers you can test against.

That last item is where a lot of specs go soft. "Should be fast" is not a constraint. "Cold start under two seconds on a two-year-old mid-range Android device" is a constraint, because you can measure it and you can fail it. Vague constraints let the team skip the hard thinking; numeric ones force it.

A useful trick: for each constraint, write the one-sentence version of what it rules out. "Offline-first rules out a pure server-authoritative data model." "Minimum Android API level forces us to confirm which libraries still support it." Constraints become useful precisely when they eliminate options.

Choose the shape: native, cross-platform, or hybrid

This is usually the first decision the team argues about, and it should be made against the constraints above rather than on taste.

Native means writing separately in Swift/SwiftUI for iOS and Kotlin/Jetpack Compose (or the older XML views) for Android. You get the most direct access to platform APIs, the best handle on performance, and the platform's own UI conventions for free. You pay for it twice: two codebases, two skill sets, and duplicated feature work.

Cross-platform frameworks compile or render one codebase for both platforms. Flutter draws its own UI with its rendering engine; React Native and similar tools bridge to native components. You get one language and one feature implementation, faster on small teams, and consistent visuals. The cost shows up in native module gaps, framework upgrade churn, and occasionally in performance ceilings for heavy graphics.

Hybrid approaches wrap a web app in a native shell. They're the right answer mostly for content-heavy apps that don't need deep device integration, and the wrong one for anything animation- or sensor-heavy.

A fair way to compare them is against equivalent criteria — same app, same features, same team:

Criterion Native Cross-platform Hybrid (web in shell)
Codebases One per platform One shared One web codebase
Device API access Full Full for common features, bridging for edge cases Limited without plugins
UI consistency with platform Native by default Custom or approximated Web-like
Best fit Heavy graphics, deep integration Broad product, small team Content and simple forms
Main risk Duplicated effort Framework/version gaps Performance and feel

Two clarifications keep this table from misleading you. First, "cross-platform" is not one thing — Flutter and React Native have different performance profiles and different upgrade stories, so compare the specific framework you'd use, on the specific version, not the category. Second, the table describes typical conditions, not guarantees. A skilled native team will outrun a cross-platform team that's learning as it goes, because team fluency is a real constraint.

There's a middle path worth naming: shared business logic with native UI. You can keep networking, caching, and domain rules in a shared module (through Kotlin Multiplatform, shared C#, or a service layer) while building each platform's UI natively. That trades some duplication for UI quality and is often the right compromise for apps with heavy logic and demanding interface standards.

Whatever you pick, record it with its reason and the conditions that would make you revisit it. "We chose Flutter because the team already ships it and the app has no heavy 3D" is reviewable. "We chose Flutter because it's modern" is not.

Pick the structural pattern and write its rules

Patterns like Model-View-ViewModel (MVVM), Model-View-Intent (MVI), or layered clean architecture are not badges. They're agreements about where code lives and which code may call which code. The spec needs to name one and then define the rules that make it hold.

A workable common layering for a mobile app:

Presentation layer — screens, view models, UI state. It formats data for display and forwards user actions. It never talks to the network or database directly. Domain layer — use cases and business rules. It's where "apply discount," "validate transfer," or "schedule reminder" lives, independent of any framework. Data layer — repositories, remote API clients, local database access, and the mapping between them.

Then write the rules that keep those layers honest:

1: Dependency direction. Presentation depends on domain; domain depends on data abstractions. Nothing depends upward. The domain layer shouldn't import the UI framework or a specific database library. 2: State ownership. One source of truth for each piece of state. If the view model holds screen state, the view doesn't also cache it. If the repository owns cached data, the view model doesn't keep a second copy. 3: Framework isolation. Say explicitly where platform APIs are allowed. A common rule: no android.* or UIKit types below the presentation layer, so the domain can be tested on a plain JVM and reused if you later share logic. 4: Action flow. Define one direction of data flow — user action to view model to domain to repository, and results coming back as state. That single rule prevents the tangled callbacks that make mobile codebases hard to change.

On choosing among patterns: MVVM fits screen-heavy apps with a lot of UI state and pairs naturally with Jetpack Compose and SwiftUI. MVI adds explicit, unidirectional intents and is valuable when state transitions are complex and you want them traceable. Clean architecture's extra layers pay off in large codebases and long lifespans, and cost you boilerplate when the app is small.

The failure case to design against is the "god view model": one class holding a screen's network calls, formatting, navigation, and caching. It happens when no rule says otherwise, and it's the most common reason a mobile codebase becomes unmaintainable. The fix is a written boundary — view models orchestrate, use cases decide, repositories fetch — plus a code-review checklist that enforces it.

Decide where state and data live

This is the decision most likely to cause pain later, so it deserves its own pass in the spec.

Server-authoritative. The backend is the source of truth; the app fetches and displays. Simple to reason about, but it breaks the moment the network drops, and it puts latency in front of every action.

Local-first. The app's local database is the source of truth; changes sync to the server in the background. The app works offline and feels instant, but you now own sync complexity: conflicts, retries, and eventual consistency.

Hybrid. Some data is local-first (drafts, recent lists, user preferences), some is server-authoritative (prices, permissions, live inventory). Most real apps land here, and the spec's job is to say which data falls into which bucket, field by field or collection by collection.

If you go local-first, the spec must define conflict resolution. Two simple rules cover most cases: last-write-wins by timestamp for low-stakes data like a profile nickname, and per-field or per-record merge for anything users would notice losing. Say which one applies where. Also state the sync triggers — on launch, on connectivity regain, on a timer — and what happens when a sync conflicts, including what the user sees.

For storage, choose the local mechanism against the data's shape and size:

Key-value stores for small settings and flags. A relational database (SQLite via Room on Android, Core Data or SwiftData on iOS, or a cross-platform layer) for structured, queryable data. File or blob storage for images, video, and documents, with paths or keys held in the database.

The spec should say which option holds which data and why, and it should name the backup and migration rule. Local databases change schema; without a written migration policy, app updates will crash with old data. The rule "every schema change ships a tested migration path" is architecture, not implementation detail, because it determines how you store data now.

Make security, identity, and failure handling explicit

Security decisions are architectural because they're expensive to retrofit. The spec should state, at minimum:

Where credentials and tokens live. On both iOS and Android, the platform keychain/keystore equivalents are the standard home for secrets. Never in plain preferences files and never hard-coded in the app binary, which ships to every user. What's encrypted at rest and in transit. Data the app stores locally, especially sensitive data, should be encrypted; all network traffic should use TLS. A local database encryption option may be appropriate for regulated data — record the choice and the reason. Authentication model. Who authenticates, and how tokens are refreshed. Say whether sessions are short-lived with refresh tokens, and what happens on expiry. Authorization enforcement on the server. The app is untrusted. Any rule that must hold for security — who can see what — has to be enforced server-side, and the spec should say so plainly so no client-side check gets mistaken for a guarantee.

Then define the failure paths, which are architecture too:

What each screen shows when a request fails: cached data with a staleness note, an empty state, an error with retry, or a blocking message. What happens to in-progress user work when the app is backgrounded or killed. How the app behaves on slow networks, partial connectivity, and server errors.

Listing failures at design time is cheaper than discovering them one by one in bug reports. A good spec has a short table of "failure → expected behavior → who implements it."

Name the technologies and integrations with versions

Specifications that stay abstract ("we'll use a database") get resolved arbitrarily in code. The spec should name the concrete choices and the versions you're targeting, because versions change behavior and support windows.

For each choice, record:

Language and UI toolkit per platform (for example, Kotlin with Jetpack Compose on Android, Swift with SwiftUI on iOS, or your chosen cross-platform framework and version). Minimum OS versions, matching your earlier constraint decision. Local storage library and its version. Networking approach: an HTTP client and a serialization format (JSON is standard), plus how the API contract is defined and versioned. Dependency injection and navigation approach, if you use one. Third-party SDKs — analytics, payments, push, crash reporting — with the version and the reason for inclusion.

Keep this list short and put a rule around it: new third-party dependencies need a stated reason and an owner. Dependency sprawl is how mobile apps acquire size, privacy, and upgrade debt. Naming versions also gives you an upgrade policy — say how often dependencies get reviewed and how you decide when to adopt a new OS version's APIs.

Write the specification document itself

Now assemble everything into a short document a new engineer can read in half an hour and a reviewer can argue with. This is the ordered procedure:

Prerequisites: the constraints list from the first section, a feature-level understanding of the app's main flows, and the names of the people who own each area.

1: Title and status block. App name, version of the spec, date, author, and status (draft, approved, superseded). A spec without a date becomes folklore. 2: Context and constraints. Platforms, floor versions, connectivity needs, data sensitivity, team, non-functional targets, and product lifespan. Include the one-line "what each constraint rules out." 3: Scope. What's in and out. A two-sentence system context — who uses the app and what external systems it talks to at a high level — is enough here. 4: Platform strategy. Native, cross-platform, or shared-logic-with-native-UI, with the reason tied to constraints and the revisit trigger. 5: Layering and patterns. The layers, the dependency rules, state ownership, and framework-isolation rules. This is the section that will actually be enforced in code review. 6: Data ownership and sync. The server-authoritative versus local-first map per data area, the local storage choices, conflict-resolution rules, and the migration policy. 7: Security and identity. Token storage, encryption decisions, authentication and refresh flow, and the server-enforcement rule. 8: Failure behavior. The failure → expected behavior table. 9: Technology inventory and versions. Every named library, framework, and SDK, with its version and reason. 10: Cross-cutting conventions. Logging, error reporting, analytics events and their naming, feature flags, and accessibility requirements — enough to keep teams consistent without dictating code. 11: Decisions and open questions. The decision log (see below) and anything still unresolved, with who owns it and when it's due. 12: Review and change procedure. Who approves changes and how the spec gets updated when reality diverges.

A one-page diagram is worth including — the layers and the data flow — but it shouldn't be the whole spec. Diagrams explain structure; the written rules explain behavior. If a rule only exists in a picture, nobody enforces it.

Success check: the test of a finished spec is not that you like it. Give it to an engineer who hasn't worked on the app and ask them to answer three questions from it: Where does the code for a new screen go? Where does cached data live? What happens when a request fails? If they can answer all three without asking you, the spec does its job. If not, the missing answer is a gap to fill.

Stop condition: this procedure takes you to a decision-complete spec. It does not take you to a running app, and it should not pretend to. If your team lacks anyone who can own the architecture decisions — or if the spec keeps expanding to cover implementation detail — bring in a senior mobile engineer or architect to review before you build. Getting a second opinion on a document costs days; discovering a wrong storage or sync decision costs months.

Use an architecture decision record for each hard choice

The main spec holds the current design. The decision log holds the why, because future engineers will ask. The lightweight standard is the Architecture Decision Record (ADR): a short file per decision.

Each ADR contains: a title, a date, a status (proposed, accepted, superseded), the context that forced the decision, the decision itself, and the consequences — both the benefits and what you're giving up. One page is plenty.

Here's an illustrative example, written to show the shape (the numbers are yours to fill in, and the choice depends on your constraints):

The value of the ADR isn't ceremony. It's that it records the conditions under which the decision was correct, so the next team knows when to question it rather than re-litigating it or blindly following it. When a decision is reversed, mark the old ADR superseded and write a new one; the trail stays readable.

Validate the spec before you build

A specification earns trust by being testable, and the cheapest tests happen before code exists.

Walk the main flows. Take your three or four most important user journeys — sign in, create the core object, go offline and return — and trace each through the layers on paper. Where does state change? Where does a failure occur? If the trace requires a rule the spec doesn't have, add it. Check the rules for consistency. If the spec says the domain layer is framework-free, confirm no section quietly puts a platform call there. Contradictions between sections are the most common defect in a first draft. Assign an owner per section. A section without an owner rots. Set a review date. Specs and OS requirements drift; a six-month review keeps the floor versions and dependency list honest.

The honest limit of all this: no spec predicts every problem. Mobile development deals with OS updates, store review policies, device fragmentation, and the occasional library that stops being maintained. The spec's job isn't omniscience — it's making the big decisions deliberate and their reasons recoverable. When the OS update lands, the team can check the constraint list and the decision log and know which choices are affected. That's what specification buys you: not certainty, but a map you can correct.

One more discipline worth keeping: distinguish architecture from implementation. The spec decides that data is local-first and conflicts resolve by last-write-wins; it doesn't decide the exact SQL statement or the retry backoff in the sync code. When implementation details creep into the spec, the document becomes stale on contact with code. Keep the spec at the level where decisions are expensive to reverse, and let the code and its tests own the rest.

Finally, write the spec in plain language. The best architecture documents are ones a product manager can read and understand, because the constraints they bring — offline expectations, data sensitivity, performance targets — are the product. If the spec is only legible to the architecture's author, it will only ever have one reviewer, and it will drift the first time that person is on vacation.