Summary
Introduce a local companion application (“Helper”) that performs heavy Git operations (e.g., BFG cleanup) on the user’s machine while the GitHub Pages UI acts as a control panel and progress viewer.
Problem
Current approaches (GitHub Actions) break down for large repositories due to:
- Disk and RAM limits on GitHub-hosted runners
- Repository size and artifact limits
- Browser storage/memory constraints
- Cost and complexity of maintaining backend infrastructure
Proposed Solution
Split responsibilities:
Frontend (GitHub Pages - git-extract.github.io):
- UI for selecting repository and cleanup rules
- Detect and connect to local helper via
localhost
- Display progress/logs in real time
- Provide final instructions (force-push, download, etc.)
Local Helper App (user machine):
- Runs Git + BFG (or equivalent)
- Exposes local HTTP API (e.g.,
http://127.0.0.1:<port>)
- Streams progress/events to frontend (SSE preferred)
- Handles authentication using user’s existing Git setup (SSH, tokens)
Architecture
Browser (GitHub Pages)
↓ HTTP/SSE
Local Helper (127.0.0.1)
↓
git clone --mirror
↓
BFG / cleanup logic
↓
git gc / rewrite
↓
(optional) push
Communication
Endpoint examples (local helper):
POST /start → starts job
GET /status → returns current state
GET /events → SSE stream of logs/progress
POST /cancel → abort job
CORS
Helper must allow:
Access-Control-Allow-Origin: https://git-extract.github.io
Progress Streaming
Use Server-Sent Events (SSE):
- Simpler than WebSockets
- One-way streaming fits logs/progress
- Native browser support
UX Flow
- User opens GitHub Pages UI
- App checks
localhost for helper
- If missing → prompt download
- Helper starts and auto-opens browser
- UI connects to helper
- User selects repo + rules
- Job starts locally
- UI shows progress/logs
- User reviews result
- User confirms manual force-push (or optional assisted push)
Benefits
- Works with very large repositories
- No backend/server costs
- No GitHub Actions limitations
- No repo pollution
- Uses user’s local resources (disk, credentials)
- More secure (no repo upload to third-party servers)
Trade-offs
- Requires user to install helper app
- Localhost communication requires CORS handling
- Slightly more complex onboarding
Optional Enhancements
- Bundle Java + BFG inside helper
- Provide Docker-based fallback instead of native app
- Add auto-detection of repo size → recommend local mode
- Add “dry-run” preview before rewrite
- Add log export / sharing
Alternatives Considered
- GitHub Actions (fails on large repos)
- v86 browser Linux (too heavy/unreliable)
- External cloud workers (cost + complexity)
- WebSocket backend (unnecessary for this use case)
Acceptance Criteria
- UI detects helper availability
- Helper exposes stable API on localhost
- Large repo (>5GB) can be processed without failure
- Real-time progress visible in UI
- No writes to git-extract repository required
- Works without any paid infrastructure
Summary
Introduce a local companion application (“Helper”) that performs heavy Git operations (e.g., BFG cleanup) on the user’s machine while the GitHub Pages UI acts as a control panel and progress viewer.
Problem
Current approaches (GitHub Actions) break down for large repositories due to:
Proposed Solution
Split responsibilities:
Frontend (GitHub Pages - git-extract.github.io):
localhostLocal Helper App (user machine):
http://127.0.0.1:<port>)Architecture
Communication
Endpoint examples (local helper):
POST /start→ starts jobGET /status→ returns current stateGET /events→ SSE stream of logs/progressPOST /cancel→ abort jobCORS
Helper must allow:
Progress Streaming
Use Server-Sent Events (SSE):
UX Flow
localhostfor helperBenefits
Trade-offs
Optional Enhancements
Alternatives Considered
Acceptance Criteria