Skip to content

Feature: Local Helper App Integration for Large Repository Processing #54

Description

@MekDrop

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

  1. User opens GitHub Pages UI
  2. App checks localhost for helper
  3. If missing → prompt download
  4. Helper starts and auto-opens browser
  5. UI connects to helper
  6. User selects repo + rules
  7. Job starts locally
  8. UI shows progress/logs
  9. User reviews result
  10. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions