Local-first and cloud are not competing identities. They are data and authority boundaries. A developer tool should keep an operation local when the machine already has the required context and use the cloud when remote coordination or durable shared infrastructure creates clear value.
The quality of the product depends on where that line is drawn for each operation.
Classify the data before choosing the architecture
Developer tools handle unusually sensitive material:
- Unreleased source code
- Full repository history
- Diffs that reveal security fixes
- Environment configuration
- API requests and responses
- Database schemas and records
- Provider credentials
- Signing keys
- Customer information in logs
Classify each data type by confidentiality, integrity, retention, and collaboration need. Repository status requires no remote service. Pull-request discussion is inherently shared. A release artifact needs durable distribution, while its private signing key should remain tightly protected and separate.
Architecture should follow this classification, not a blanket promise that everything is local or everything is synchronized.
Keep deterministic inspection local
Operations derived entirely from the local repository should normally run locally:
- Status and branch inspection
- Commit graph and blame
- Working, staged, and commit diffs
- Partial staging
- Local conflict resolution
- Secret scanning
- Search and repository statistics
- Release range generation
- Local test and build orchestration
These operations gain little from uploading content. Local execution reduces latency, keeps working offline, avoids a new retention surface, and lets the tool operate on the exact worktree rather than a potentially stale remote copy.
The implementation must still be safe. Local software can leak data through analytics, logs, crash reports, temporary files, command arguments, or embedded browser storage.
Use cloud services for shared truth
Cloud infrastructure is appropriate for state that multiple actors must observe or that must survive a device:
- Account identity and subscriptions
- Shared issue and pull-request state
- Team policy
- Signed release manifests and artifacts
- Transactional email
- Consent-controlled product analytics
- Audit records for administrative actions
- Deployment orchestration
Store the smallest useful representation. Product analytics can record that a release check completed without recording the diff, command output, query, path, or credential involved.
Shared truth does not require unrestricted content access. Provider integrations should request narrow scopes and retrieve data only for the invoked workflow.
Treat AI as a separate boundary
AI-assisted review is not automatically local because the desktop interface is local. The model provider, prompt contents, retention, training policy, region, and account relationship define the actual boundary.
A trustworthy implementation should:
- Require explicit configuration or selection of a provider.
- Explain exactly which content will be sent.
- Minimize the selected diff or context.
- Remove credentials before transmission.
- Avoid storing prompts in product analytics.
- Offer a local or disabled path for core workflows.
- Keep AI suggestions visibly advisory.
Never send an entire repository by default to answer a question about one changed function. Context minimization improves privacy, cost, and often output quality.
Design authentication around the platform
Web and desktop clients need different session storage.
For the web, use a short-lived access credential in memory and a rotating refresh credential in a secure HttpOnly cookie. For desktop, store the rotating refresh credential in Windows Credential Manager, Secret Service, KWallet, or the platform-equivalent secure vault.
Do not store raw tokens in localStorage, ordinary JSON settings, SQLite application tables, logs, URLs, or process arguments. Encrypting a token with a key stored in the same application directory provides weak protection against local compromise.
Local-first does not mean trusting every local process. Desktop commands should validate paths, allowlist operations, and keep privileged capabilities narrow.
Preserve useful offline behavior
Account and subscription services will sometimes be unavailable. Paid desktop features need a bounded offline entitlement that can be verified locally without trusting editable client state.
A signed entitlement can include account, plan, feature set, issue time, and a short validity window. The desktop verifies it with a public key. The private signing key remains on the server. Refresh occurs when online.
This design balances customer continuity with revocation. An indefinite editable boolean does not. A permanent network requirement for every local action creates unnecessary fragility.
Lifetime entitlements should remain lifetime at the account layer. The offline token can still expire for revalidation without changing the underlying right.
Make telemetry consent and schema explicit
Cloud analytics is valuable when it answers product questions: which workflow reaches first value, where checkout fails, which release checks are used, and which articles produce qualified downloads.
Collect events only after appropriate consent, except a narrowly documented essential event where legally and product-appropriate. Use an event schema that rejects sensitive property names and bounds every field.
Good event:
{
"eventName": "arezgit_first_value_action_completed",
"source": "desktop",
"properties": {
"feature": "diff_review",
"durationBucket": "under_2_minutes"
}
}
Unsafe event properties would include file content, full paths, diffs, commands, API bodies, database queries, connection strings, or access tokens.
Retention should match the declared product decision. If events have no automatic TTL, provide access control, deletion or anonymization behavior, cost monitoring, and documented purpose.
Evaluate failure modes on both sides
For a local operation, consider device compromise, malicious repository content, filesystem permissions, unbounded resource use, and insecure credential storage.
For a cloud operation, consider outage, account takeover, cross-tenant access, provider breach, retention, jurisdiction, rate limits, and network interception.
Then design degraded behavior. A hosted outage should not block local diff inspection. An unavailable credential vault should not cause fallback to plaintext storage. A failed analytics request should not block the user action. A failed release upload should remain a visible incomplete draft rather than a published broken manifest.
Publish a data-flow table
Users should not need to reverse engineer the application to understand its boundary.
| Feature | Local processing | Remote destination | Stored remotely | | --- | --- | --- | --- | | Git status and diff | Yes | None | No | | Remote fetch and push | Git invokes remote | Configured Git host | Provider-defined | | Subscription | Client request | Product billing service | Account and billing metadata | | Transactional email | Server request | Product email service | Delivery metadata and operational logs | | Release download | Local install | Product storage | Download count and artifact | | Product analytics | Event construction | Product API | Consent-controlled bounded event |
Update this table when a feature changes. It is both user communication and an architecture review tool.
Choose per operation, not per brand
A credible local-first product can use cloud billing, releases, and shared integrations. A cloud collaboration product can still keep credentials and deterministic analysis local. The important question is whether each data flow is necessary, proportionate, secure, and visible.
Keep source-derived inspection near the source. Use remote infrastructure for shared state and durable distribution. Minimize what crosses the boundary, protect credentials with platform facilities, and make outages degrade gracefully. That boundary produces both a better security posture and a faster developer workflow.