How github/dev works
Project type & purpose (from README + file tree)
Type: Product/experience description (no source code in this repo snapshot; only README.md).
Purpose: github.dev is a browser-only, lightweight VS Code editing environment for GitHub repos and PRs. Users can:
• Browse repositories and files
• Edit multiple files with VS Code-like UX
• Commit changes back to GitHub
Entry points:
• Press . on a repo/PR page
• Replace github.com with github.dev in the URL
User + Browser
• User
• Browser (github.dev web app runtime)
github.dev Web Application (runs entirely in browser)
Model it as a container with subcomponents:
• UI Shell / Workbench (VS Code-like layout: explorer, editor, SCM view)
• Editor Engine (VS Code Web / Monaco-like editor core)
• Language Features (syntax highlighting, IntelliSense-like capabilities)
• Often implemented via Language Servers (web/remote) or in-browser providers
• Source Control Integration
• Diff/patch generation
• Staging model
• Commit message UI
• Filesystem Abstraction
• Virtual FS representing repo contents
• Caching layer (IndexedDB / in-memory)
• Auth / Session
• OAuth / GitHub session cookie / token management
• Networking Layer
• Calls to GitHub APIs (REST/GraphQL)
• Telemetry/Logging (optional but common in such products)
• Service Worker / Offline Cache (optional but common for web IDE performance)
GitHub Platform (external services)
• GitHub Web (github.com): the originating navigation context; redirects into github.dev
• GitHub Authentication: OAuth / SSO / session
• GitHub API
• GitHub REST API (contents, commits, trees, refs, PR endpoints)
• GitHub GraphQL API (repo/PR metadata, file trees, etc.)
• Git Data/Storage
• Repos, branches, commits, PR refs
• (Optional) Artifact/CDN hosting
• Static assets for github.dev served via CDN
On commit
• Create new blob/tree/commit through API, or use “create/update file” endpoints
• Update ref (branch) through API
Flow 4: PR context (if starting from PR)
• Fetch PR refs/patch context
• Possibly write commits to a branch/fork depending on permissions
• “HTTPS: REST/GraphQL”
• “OAuth redirect”
• “Static asset fetch”
Architectural patterns/design principles to highlight
Even conceptually, github.dev implies these patterns:
• Client-heavy SPA architecture: most UX and editing runs in-browser.
• API-driven backend: GitHub APIs are the system of record for repo data.
• Virtualized filesystem: repo content represented locally, synced via API calls.
• Separation of concerns inside the client:
• UI workbench vs editor engine vs SCM vs network/auth/caching.
• Performance/caching: local caching of file contents + lazy loading file trees.
• Security constraints: least-privilege auth, permission checks enforced by GitHub.
What you *cannot* claim from this repo snapshot (but can represent as assumptions)
• “Cache (e.g., IndexedDB)”
• “GitHub APIs (REST/GraphQL)”