Mobile and Client System Design
Priority: P1 (HIGH)
Classify the work mode independently from its surface: new design, review existing, or interview practice can each target mobile/client, SDK/library, backend, or full stack. Focus on user-visible authority, lifecycle, synchronization, platform constraints, and host compatibility—not UI/framework implementation.
Design decisions
- Name the server-authoritative state and any local display, pending, cached, or derived state. Never present optimistic/pending state as durable server success.
- For each critical client flow, link the canonical critical-flow contract; do not duplicate its field checklist. Add only material client-specific lifecycle, auth, freshness, retry, conflict, and deletion decisions.
- Decide explicitly whether offline use is required. If correctness depends on a live authorization or current server state, choose online-only behavior and define unavailable/error UX; do not add a local database by default.
- If offline writes are allowed, define pending/confirmed/failed outcomes, stable operation identity, retry and deduplication, conflict resolution, freshness, account-switch/logout handling, and deletion of local and server copies.
- Bound device work: memory, disk, network, battery-sensitive work, queue growth, payload size, and resource release. Estimate only quantities relevant to the stated workload.
- Treat secure storage and authentication as trust-boundary choices: limit token and sensitive-data persistence, bind queued work to its account, and prevent replay after logout or account change.
- Select a dataflow, sequence, state, or deployment view only when it answers a named decision; prose or a table is sufficient otherwise.
For client authority, sync, authentication changes, or deletion decisions, load the client authority and lifecycle contract. For a reusable client library, cover its public contract, compatibility, cancellation, concurrency ownership, bounded resource use, host integration, lifecycle, and failure results; see SDK contract. For OS scheduling and persistence constraints, consult platform constraints. Framework-specific coding recipes are out of scope.
Practice
Run the design → adverse timeline → mechanism revision → changed constraint → evidence-based debrief sequence. Use the four synthetic base/variant pairs in practice cases; assumptions are not deployment evidence.
1---2name: system-design-mobile-client3description: "Design mobile/client and SDK/library systems where offline behavior, client authority, lifecycle, device constraints, or host compatibility affect correctness. Use for mobile-client system design, offline sync, client lifecycle, device resource limits, or SDK contracts; not framework coding or backend-only sharding."4metadata:5 source: https://skillmd.com/skills/hoangnguyen0403/system-design-mobile-client6 triggers:7 keywords:8 - mobile client system design9 - offline sync10 - client authority11 - client lifecycle12 - SDK system design13 - SDK compatibility14 - device resource constraints15---1617# Mobile and Client System Design18## **Priority: P1 (HIGH)**192021Classify the work mode independently from its surface: new design, review existing, or interview practice can each target mobile/client, SDK/library, backend, or full stack. Focus on user-visible authority, lifecycle, synchronization, platform constraints, and host compatibility—not UI/framework implementation.2223## Design decisions2425- Name the server-authoritative state and any local display, pending, cached, or derived state. Never present optimistic/pending state as durable server success.26- For each critical client flow, link the canonical [critical-flow contract](../system-design-data-architecture/references/flow-contracts.md); do not duplicate its field checklist. Add only material client-specific lifecycle, auth, freshness, retry, conflict, and deletion decisions.27- Decide explicitly whether offline use is required. If correctness depends on a live authorization or current server state, choose online-only behavior and define unavailable/error UX; do not add a local database by default.28- If offline writes are allowed, define pending/confirmed/failed outcomes, stable operation identity, retry and deduplication, conflict resolution, freshness, account-switch/logout handling, and deletion of local and server copies.29- Bound device work: memory, disk, network, battery-sensitive work, queue growth, payload size, and resource release. Estimate only quantities relevant to the stated workload.30- Treat secure storage and authentication as trust-boundary choices: limit token and sensitive-data persistence, bind queued work to its account, and prevent replay after logout or account change.31- Select a dataflow, sequence, state, or deployment view only when it answers a named decision; prose or a table is sufficient otherwise.3233For client authority, sync, authentication changes, or deletion decisions, load the [client authority and lifecycle contract](references/client-contract.md). For a reusable client library, cover its public contract, compatibility, cancellation, concurrency ownership, bounded resource use, host integration, lifecycle, and failure results; see [SDK contract](references/sdk-contract.md). For OS scheduling and persistence constraints, consult [platform constraints](references/platform-constraints.md). Framework-specific coding recipes are out of scope.3435## Practice3637Run the design → adverse timeline → mechanism revision → changed constraint → evidence-based debrief sequence. Use the four synthetic base/variant pairs in [practice cases](references/practice-cases.md); assumptions are not deployment evidence.