GitHub Repo Metadata Rewriter — Architecture & Developer Guide
github-repo-metadata-rewriter). It details concrete service topology, sandboxed Git workspaces, commit graph manipulation pipelines, AI timestamp models, and Go + Templ UI runbooks.1. System Topology
┌─────────────────────────────────────────────────────────────┐
│ Go + Templ Web Dashboard │
│ (Compiled Type-Safe SSR Frontend /web) │
└───────────────┬─────────────────────────────┬───────────────┘
│ Form Submission / Job Trigger│ Live Telemetry Polling
▼ ▼
┌─────────────────────────────────────────────────────────────┐
│ Go Backend REST Server │
│ (HTTP API · Job Store · Preview Diff Service) │
└───────────────┬─────────────────────────────────────────────┘
│ Work Queue / Context Dispatch
▼
┌─────────────────────────────────────────────────────────────┐
│ Rewriter Worker Engine │
│ (Sandboxed Git Executor · Graph Parser · LLM Client) │
└───────┬──────────────────────┬──────────────────────┬───────┘
│ Bare Clone / Fetch │ AI Distribution API │ Filter-Branch
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Sandboxed /tmp │ │ OpenRouter / │ │ Target Git │
│ Workspace │ │ Gemini APIs │ │ Remote (SSH) │
└──────────────────┘ └──────────────────┘ └──────────────────┘2. Microservice Topology & Pipeline Stages
Backend API (backend/)
8080 (configurable via PORT). - GET / — Serves the compiled templ Git Telemetry Dashboard.
- GET /health — Service readiness & liveness probe.
- POST /api/jobs — Submits a new metadata rewriting job.
- GET /api/jobs — Lists active and archived rewriting jobs.
- GET /api/jobs/:id — Real-time telemetry, stage logs, and status.
- POST /api/jobs/:id/preview — Generates a diff of rewritten commits before remote push.
- POST /api/jobs/:id/push — Authorizes remote push with force-with-lease safety.
Rewriter Worker Engine (rewriter-worker/)
/tmp/rewriter-workspaces/<job-id> with reflog backup.git log --reverse --format="%H|%an|%ae|%ad|%s").git filter-branch / git-filter-repo re-anchoring GIT_AUTHOR_DATE and GIT_COMMITTER_DATE.git fsck --full to guarantee zero object graph corruption.Templ Web Frontend (web/)
.templ).3. Development Runbook
# Generate Go code from Templ files
make templ
# Build backend and worker binaries
make build
# Run application locally
make run
# Run Docker Compose stack
docker compose up -d --build4. Proprietary Licensing & Closed-Source Governance
This codebase is PROPRIETARY AND CLOSED SOURCE owned by Shardendu Mishra.