Context
We previously attempted several approaches to let users generate architecture docs for any public GitHub repo (PRs #3, #5, #6 — all reverted/closed). Each had significant UX or security issues:
We need to start fresh with a well-designed approach.
Who does this well?
| Product |
Pattern |
Strengths |
Weaknesses |
| DeepWiki (Devin) |
URL swap: deepwiki.com/{owner}/{repo} |
Progressive loading, pre-indexed 50K repos, instant for cached |
Heavy backend, 30s-30min generation |
| pkg.go.dev |
Auto-index + "Request" button |
Clean UX, hybrid model |
Requires Go proxy infrastructure |
| docs.rs |
Auto-build on publish |
Zero user friction |
No on-demand generation, queue can be slow |
| GitIngest |
Paste URL / URL swap: gitingest.com/{owner}/{repo} |
Instant results, URL substitution |
Ephemeral (no caching/permalinks) |
Proposed Approach: URL-First Documentation (inspired by DeepWiki + pkg.go.dev)
Core Idea
The URL is the product. repos.supermodeltools.com/{owner}/{repo} either serves docs or tells you how to get them.
UX Flow
Scenario A — Docs exist (majority of traffic):
- User visits
repos.supermodeltools.com/facebook/react
- Docs load instantly (static HTML on GitHub Pages CDN)
- Done
Scenario B — Docs don't exist yet:
- User visits
repos.supermodeltools.com/facebook/react
- Custom 404 page detects the URL pattern and shows a branded "landing" page:
- Repo name + description (fetched client-side from GitHub API, no auth needed)
- "This repo hasn't been documented yet"
- "Generate Architecture Docs" button
- User clicks "Generate" → opens a pre-filled GitHub Issue in a new tab:
- Title:
[Generate] facebook/react
- Body: pre-filled with the repo URL
- One-click submit (user needs GitHub account — fine for a developer tool)
- Issue auto-triggers the
auto-add-repo workflow
- Workflow: validates repo → forks into org → sets up arch-docs → enables Pages → adds to
repos.yaml
- User gets notified on the GitHub Issue when complete (issue auto-closed with link)
- Same URL now serves real docs
Why This Approach
- Zero infrastructure — GitHub Pages + Actions only, no serverless functions, no tokens in client code
- Shareable URLs —
repos.supermodeltools.com/torvalds/linux works as a link whether docs exist or not
- No security concerns — no API tokens exposed, no proxy needed
- GitHub account required — acceptable for a developer-facing tool. This is actually a feature (prevents abuse)
- Automatic discovery —
sync-repos.yml cron finds org repos with arch-docs every 6 hours, so internal repos appear without anyone requesting them
- Progressive enhancement — the 404 landing page can show repo metadata (stars, language, description) fetched from the public GitHub API, making it feel like a real page even before docs exist
Technical Implementation
1. URL Routing via Custom 404
GitHub Pages serves 404.html for all unmatched routes. We make this smart:
<!-- 404.html -->
<script>
const path = window.location.pathname.split('/').filter(Boolean);
if (path.length === 2) {
// Looks like /{owner}/{repo} — show the "generate" landing page
showRepoLanding(path[0], path[1]);
} else {
// Actual 404
showNotFound();
}
</script>
The landing page fetches repo metadata from the public GitHub API (no auth needed for public repos) and renders a branded page with the "Generate" button.
2. Pre-filled Issue Link
The "Generate" button links to:
https://github.com/supermodeltools/supermodeltools.github.io/issues/new?
title=[Generate] {owner}/{repo}&
body=Repository: https://github.com/{owner}/{repo}&
labels=repo-request
No API calls, no tokens, no JavaScript fetch. Just a link.
3. Workflow: auto-add-repo.yml
Triggers on issues with repo-request label. Validates, forks, generates, deploys. (This was already built in PR #3 — we bring it back.)
4. Workflow: sync-repos.yml
Cron every 6 hours, discovers org repos with arch-docs that aren't on the homepage yet. (Also from PR #3.)
5. Homepage Search + Browse
The homepage at repos.supermodeltools.com/ keeps the existing search/browse UI for discovering documented repos. Add a prominent input field: "Paste any GitHub repo URL" → navigates to /{owner}/{repo} which either loads docs or shows the landing page.
Open Questions
-
Should the 404 landing page poll for completion? It could check every 30s if the docs URL returns 200, then auto-redirect. But generation takes 5-10 minutes, so this might be wasteful. Alternative: just say "Check back in a few minutes" and let the GitHub Issue notification handle it.
-
Rate limiting / abuse prevention: The GitHub Issue approach naturally limits abuse (requires account, visible in issue tracker). Should we add a cooldown check (e.g., don't show "Generate" if an open issue already exists for this repo)?
-
Should we pre-generate docs for the top N popular repos? DeepWiki pre-indexed 50K repos. We could batch-generate docs for popular repos to make the site immediately useful.
-
Per-repo pages architecture: Currently each repo's docs live on a separate GitHub Pages site (on the fork). Should we consolidate them under repos.supermodeltools.com/{owner}/{repo} using a build step, or keep them as separate sites linked from the index?
@claude please critique this plan. Consider: security implications, UX friction points, edge cases (private repos, archived repos, very large repos), scalability (what happens at 1000+ repos), and whether there's a simpler approach we're missing. Also evaluate whether the 404-based routing is the right pattern or if there's a better way to handle the "docs don't exist yet" state on GitHub Pages.
Context
We previously attempted several approaches to let users generate architecture docs for any public GitHub repo (PRs #3, #5, #6 — all reverted/closed). Each had significant UX or security issues:
We need to start fresh with a well-designed approach.
Who does this well?
deepwiki.com/{owner}/{repo}gitingest.com/{owner}/{repo}Proposed Approach: URL-First Documentation (inspired by DeepWiki + pkg.go.dev)
Core Idea
The URL is the product.
repos.supermodeltools.com/{owner}/{repo}either serves docs or tells you how to get them.UX Flow
Scenario A — Docs exist (majority of traffic):
repos.supermodeltools.com/facebook/reactScenario B — Docs don't exist yet:
repos.supermodeltools.com/facebook/react[Generate] facebook/reactauto-add-repoworkflowrepos.yamlWhy This Approach
repos.supermodeltools.com/torvalds/linuxworks as a link whether docs exist or notsync-repos.ymlcron finds org repos with arch-docs every 6 hours, so internal repos appear without anyone requesting themTechnical Implementation
1. URL Routing via Custom 404
GitHub Pages serves
404.htmlfor all unmatched routes. We make this smart:The landing page fetches repo metadata from the public GitHub API (no auth needed for public repos) and renders a branded page with the "Generate" button.
2. Pre-filled Issue Link
The "Generate" button links to:
No API calls, no tokens, no JavaScript fetch. Just a link.
3. Workflow:
auto-add-repo.ymlTriggers on
issueswithrepo-requestlabel. Validates, forks, generates, deploys. (This was already built in PR #3 — we bring it back.)4. Workflow:
sync-repos.ymlCron every 6 hours, discovers org repos with arch-docs that aren't on the homepage yet. (Also from PR #3.)
5. Homepage Search + Browse
The homepage at
repos.supermodeltools.com/keeps the existing search/browse UI for discovering documented repos. Add a prominent input field: "Paste any GitHub repo URL" → navigates to/{owner}/{repo}which either loads docs or shows the landing page.Open Questions
Should the 404 landing page poll for completion? It could check every 30s if the docs URL returns 200, then auto-redirect. But generation takes 5-10 minutes, so this might be wasteful. Alternative: just say "Check back in a few minutes" and let the GitHub Issue notification handle it.
Rate limiting / abuse prevention: The GitHub Issue approach naturally limits abuse (requires account, visible in issue tracker). Should we add a cooldown check (e.g., don't show "Generate" if an open issue already exists for this repo)?
Should we pre-generate docs for the top N popular repos? DeepWiki pre-indexed 50K repos. We could batch-generate docs for popular repos to make the site immediately useful.
Per-repo pages architecture: Currently each repo's docs live on a separate GitHub Pages site (on the fork). Should we consolidate them under
repos.supermodeltools.com/{owner}/{repo}using a build step, or keep them as separate sites linked from the index?@claude please critique this plan. Consider: security implications, UX friction points, edge cases (private repos, archived repos, very large repos), scalability (what happens at 1000+ repos), and whether there's a simpler approach we're missing. Also evaluate whether the 404-based routing is the right pattern or if there's a better way to handle the "docs don't exist yet" state on GitHub Pages.