GitHub Remote File Editor
A portable, mobile-first GitHub file editor that removes git, terminal, and IDE from the loop entirely —> open a file, edit it, commit it, straight from the browser on any device.
Overview
Why this project mattered.
Context
What problem it's solving.
A portable, mobile-first GitHub file editor that removes git, terminal, and IDE from the loop entirely —> open a file, edit it, commit it, straight from the browser on any device.
Deciding file editability correctly without relying on filename/extension, which GitHub itself doesn't use as the real signal.
Architecture
How the system was structured.
The implementation prioritized simplicity, maintainability, and predictable performance over unnecessary complexity.
Interface
User interactions and presentation.
Application
Business logic and orchestration.
Services
Processing and integrations.
Storage
Persistence and retrieval.
Engineering
Key decisions.
Replaced extension-based editability with a strict UTF-8 decode of actual file bytes at open time, using the extension blocklist only as a non-authoritative UI hint.
Tied every commit to the file's last-read SHA and surfaced any mismatch as an explicit SHA_MISMATCH state rather than auto-merging or overwriting.
Routed 100% of GitHub API access through Server Actions and a single GitHubClient class, keeping the access token in an encrypted server-only session cookie at all times.
Designed the file tree, row density, and options menu mobile-first from the start — dropdown-based context menus, swipe-friendly rows, safe-area-aware headers — rather than adapting a desktop layout down.
Process
Challenges and trade-offs.
Challenge
Deciding file editability correctly without relying on filename/extension, which GitHub itself doesn't use as the real signal.
Resolution
Replaced extension-based editability with a strict UTF-8 decode of actual file bytes at open time, using the extension blocklist only as a non-authoritative UI hint.
Challenge
Preventing silent overwrites when a file changes upstream between open and commit.
Resolution
Tied every commit to the file's last-read SHA and surfaced any mismatch as an explicit SHA_MISMATCH state rather than auto-merging or overwriting.
Challenge
Keeping the entire GitHub access token path server-only with zero exposure to client JS or storage.
Resolution
Routed 100% of GitHub API access through Server Actions and a single GitHubClient class, keeping the access token in an encrypted server-only session cookie at all times.
Challenge
Building a genuinely mobile-first git tool when almost every comparable tool assumes a desktop IDE context.
Resolution
Designed the file tree, row density, and options menu mobile-first from the start — dropdown-based context menus, swipe-friendly rows, safe-area-aware headers — rather than adapting a desktop layout down.
Reflection
Lessons learned.
- 01
Deciding "is this file editable" by content, not filename, is a small rule that removes an entire category of edge-case bugs.
- 02
SHA-based optimistic concurrency is far simpler to reason about than any merge/conflict-resolution UI, as long as failures are surfaced explicitly rather than hidden.
- 03
A narrow, well-defined scope (edit and commit — nothing else) makes a tool easier to trust than a broader one trying to do everything a real IDE does.
- 04
Server Actions make a "no client-side API calls" architecture nearly free to enforce, rather than a discipline that has to be manually maintained.
Interested in similar work?
I enjoy building thoughtful, maintainable products and solving problems through engineering.