Build a full-featured, production-ready web application called "RepoGraph" β a Code Dependency Visualizer & Repository Explorer. NO login, NO real database. 100% browser-based. Quality bar: Figma + Linear + Vercel + GitHub combined.
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 1 β INPUT MODES ββββββββββββββββββββββββββββββββββββββββββββββ
MODE A β GITHUB URL
- Paste any public GitHub repo URL
- Auto-extract: owner, repo, branch, subfolder
- Supported formats: β https://github.com/owner/repo β https://github.com/owner/repo/tree/branch β https://github.com/owner/repo/tree/branch/subfolder
- If branch missing β try "main" then "master" then ask user
- Fetch file tree: GET /repos/{owner}/{repo}/git/trees/{branch}?recursive=1
- Fetch file content lazily (only when opened in code view)
- Fetch repo metadata: GET /repos/{owner}/{repo}
- After URL pasted β repo link + owner appear in HEADER immediately
- BRANCH SELECTOR dropdown in header: switch branches without re-entering URL. List branches from GET /repos/{owner}/{repo}/branches
- TAG / RELEASE selector: view repo at a specific tag/release from GET /repos/{owner}/{repo}/tags
- MONOREPO DETECTION: if package.json has "workspaces" field or repo has multiple package.json files β detect sub-packages and show them as grouped cluster nodes in graph
- SUBMODULE SUPPORT: detect .gitmodules, show submodules as special external cluster nodes with link to their repo
MODE B β LOCAL FOLDER UPLOAD (100% offline)
- Drag & drop OR browse folder
- + FileReader API
- Zero server, zero internet needed
- Real-time progress: "Reading file 47 of 312..."
- Auto-skip binary files in parsing but still list in sidebar
- Large folder warning (500+ files) with progress bar
- FILE SYSTEM ACCESS API (if browser supports it): watch for file changes β auto-refresh graph when file saved Show "π File changed: Button.tsx β click to refresh" toast
- Multi-select files/folders to load only part of project
MODE C β PASTE CODE SNIPPET (bonus)
- Small code editor input where user can paste a snippet
- Parse imports from just that snippet
- Show a mini-graph of what it would connect to
- Good for quick one-off checks
RECENTLY LOADED (localStorage, no DB):
- Last 10 repos/folders shown on landing page
- Click to re-load instantly
- Each entry shows: owner/repo, language badges, file count, last loaded date, [Remove] button
- "Clear history" option
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 2 β URL VALIDATION & ERROR HANDLING ββββββββββββββββββββββββββββββββββββββββββββββ
Validate instantly on paste (before fetch): β Not GitHub URL β "Please paste a GitHub repository URL" β Single file URL β "That's a file link. Use repo root URL." β Gist β "Gists not supported. Use a repository URL." β PR/Issue URL β "That's a PR/issue link, not a repo."
After fetch errors:
β 403 Private repo β
β 404 Not found β "Repository not found. Check the URL." β Rate limit (60 req/hr unauthenticated) β "GitHub rate limit reached. Resets in: [MM:SS live countdown timer] Or use folder upload β no limit." β Empty repo β "No files found. Check branch name." β Network offline β "No internet. Folder upload works fully offline β" β File > 1MB β "File too large to preview (X MB)" β Binary file β "Binary file β no preview available" Show: name, size, type, path as info card instead β Gitignore collision β Warning badge on import line: "Target is in .gitignore" β Circular dependency β Red edge highlight + sidebar warning β Submodule file β "File lives in a Git submodule" with link
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 3 β DEPENDENCY PARSING ENGINE ββββββββββββββββββββββββββββββββββββββββββββββ
Run ALL parsing in a Web Worker. UI never freezes.
Languages & patterns:
JavaScript / TypeScript / React / Vue / Svelte: import X from './file' import { X, Y } from '../utils' import type { T } from './types' require('./something') import('./lazy') export { X } from './re-export'
HTML:
<script src="app.js">CSS / SCSS / LESS / Sass: @import './variables' @use './mixins' @forward './helpers'
Python: from utils import helper (local only, skip stdlib) import localmodule
PHP: require_once './file.php' include './template.php'
Go: import "./localpackage"
Rust: mod localmodule; use crate::module;
For every dependency record:
- Source file + line number
- Target file (resolved relative path)
- Import type: named | default | namespace | side-effect | dynamic
- Exactly what is imported: e.g. { useState, useEffect }
- Where it's used: which lines in source file use the import
- Resolved? (target exists) | External? | Unresolved?
SPECIAL FILE PARSING (beyond imports): package.json β Read name, version, description, scripts, dependencies, devDependencies, peerDependencies requirements.txt β list all Python packages .env / .env.example β List all environment variable keys (NOT values β privacy) Show in sidebar: "ENV Variables: X declared" tsconfig.json β Read path aliases (@/ β src/) and apply to import resolution so aliased imports resolve correctly in graph README.md β Render as formatted markdown in a dedicated panel Dockerfile β parse FROM, COPY, ADD, EXPOSE .github/workflows/*.yml β detect CI/CD pipelines, list them
SPECIAL DETECTIONS:
π΄ Circular dependency: A β B β C β A
Detect with DFS, highlight entire cycle in red
β« Orphan/Dead files: files with 0 imports AND 0 used-by
(not entry points) β shown grayed out with "β« Orphan" badge
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 4 β HEADER ββββββββββββββββββββββββββββββββββββββββββββββ
Height: ~52px, sticky, always visible.
LEFT: [RepoGraph logo + wordmark]
CENTER (when repo loaded): [owner-avatar 24px] [owner / repo-name] [β GitHub link] Badges: β 1.2k π΄ 234 ποΈ 89 π 12 issues [branch-selector dropdown] [tag-selector dropdown] Pasted URL shown as subtle chip: "github.com/owner/repo"
RIGHT: [π Search] [β¬ Download] [π€ Export] [π₯οΈ Present] [π/βοΈ theme] [β¨οΈ shortcuts]
If local folder: [π folder-name] [branch/tag selectors hidden]
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 5 β LEFT SIDEBAR ββββββββββββββββββββββββββββββββββββββββββββββ
Resizable width (drag divider). Collapsible. Scrollable. Has multiple collapsible sections with headers.
ββββββββββββββββββββββββββββββ 5A. REPO SUMMARY CARD ββββββββββββββββββββββββββββββ Owner avatar (large) + username (clickable) Repo full name (bold, large) Description text Homepage URL (if set) Topics as colored badge pills [β Star on GitHub] button (opens github.com) Stats row: Stars | Forks | Watchers | Issues | Size License | Created date | Last updated [View on GitHub β] [Open Repo Info Page] (GitHub mode only)
ββββββββββββββββββββββββββββββ 5B. PROJECT STATISTICS ββββββββββββββββββββββββββββββ Total files: X Total folders: X Total lines of code: X Total dependencies: X Entry points: X (click to list them) Unresolved imports: X (red if > 0) Circular dependencies: X (red if > 0) External packages used: X Orphan/dead files: X (amber if > 0) Test files: X Config files: X TODO comments: X FIXME: X
ββββββββββββββββββββββββββββββ 5C. LANGUAGE BREAKDOWN ββββββββββββββββββββββββββββββ Horizontal stacked color bar Table: βββββββββββββββ¬ββββββββ¬βββββββ¬ββββββββββ β Language β Files β Linesβ % β βββββββββββββββΌββββββββΌβββββββΌββββββββββ€ β π‘ JS β 12 β 840 β 40.0% β β π΅ TS β 8 β 620 β 26.7% β β π HTML β 5 β 310 β 16.7% β β π΅ CSS β 5 β 240 β 16.7% β βββββββββββββββ΄ββββββββ΄βββββββ΄ββββββββββ
ββββββββββββββββββββββββββββββ 5D. FILE TYPE BREAKDOWN ββββββββββββββββββββββββββββββ ββββββββββββ¬ββββββββ¬βββββββββββ β Ext. β Count β Total KB β ββββββββββββΌββββββββΌβββββββββββ€ β .tsx β 10 β 48 KB β β .ts β 8 β 32 KB β β .css β 5 β 12 KB β β .json β 2 β 4 KB β ββββββββββββ΄ββββββββ΄βββββββββββ
ββββββββββββββββββββββββββββββ 5E. FOLDER STRUCTURE TREE ββββββββββββββββββββββββββββββ Full VS Code-style collapsible tree: π src/ (14 files) π components/ (6 files) π #3 Button.tsx 2.1 KB π #4 Modal.tsx 3.4 KB π utils/ (3 files) π #5 helpers.ts 1.2 KB π #1 main.tsx 0.8 KB β‘ π #2 App.tsx 4.2 KB π public/ (2 files) π index.html 1.1 KB β‘ π package.json 0.6 KB βοΈ π .gitignore 0.2 KB π README.md 3.1 KB
- Each file has: icon | #number | name | size | badges
- Badges: β‘ entry | π§ͺ test | βοΈ config | β« orphan
β οΈ circular | π has TODOs |β οΈ duplicate - Click file β open in code view
- Click folder β collapse/expand
- Right-click file β context menu: Open in Code View Locate in Graph (pan to node) Copy Path Copy Full URL Download as ZIP Show all that import this Show all this imports
- Folder shows badge count of files inside
- Sort options: Name A-Z | Name Z-A | Size ββ | Most imports | Most used | Alphabetical
ββββββββββββββββββββββββββββββ 5F. GITIGNORE VIEWER ββββββββββββββββββββββββββββββ Title: "π .gitignore β X patterns" ββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β Pattern β What it ignores β ββββββββββββββββββββΌββββββββββββββββββββββββββββββββ€ β node_modules/ β npm dependency folder β β .env β Environment secrets β β dist/ β Production build output β β .DS_Store β macOS system metadata file β β *.log β All log files (any name) β β coverage/ β Test coverage reports β ββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββ Total count: "X files/patterns ignored" Note shown: "These exist locally but are not in the repo" Warning if any import in code points to gitignored path
ββββββββββββββββββββββββββββββ 5G. ENTRY POINTS ββββββββββββββββββββββββββββββ β‘ index.html (HTML root) β‘ src/main.tsx (React root) Click any β pan graph to node + open code view
ββββββββββββββββββββββββββββββ 5H. EXTERNAL PACKAGES ββββββββββββββββββββββββββββββ Tabs: [dependencies] [devDependencies] [peerDependencies] ββββββββββββββββββ¬βββββββββββ¬βββββββββββ¬ββββββββββββ β Package β Version β Used in β Category β ββββββββββββββββββΌβββββββββββΌβββββββββββΌββββββββββββ€ β react β ^18.2.0 β 8 files β UI β β react-flow β ^11.0.0 β 2 files β Graph β β zustand β ^4.0.0 β 3 files β State β ββββββββββββββββββ΄βββββββββββ΄βββββββββββ΄ββββββββββββ Click package name β open npmjs.com in new tab
ββββββββββββββββββββββββββββββ 5I. PACKAGE.JSON SCRIPTS ββββββββββββββββββββββββββββββ If package.json found, list all scripts: ββββββββββββββ¬βββββββββββββββββββββββββββββββ β Script β Command β ββββββββββββββΌβββββββββββββββββββββββββββββββ€ β dev β vite β β build β tsc && vite build β β preview β vite preview β β test β vitest β ββββββββββββββ΄βββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββ 5J. ENV VARIABLES ββββββββββββββββββββββββββββββ If .env or .env.example found: List variable names ONLY (never values β privacy): β VITE_API_URL β VITE_SUPABASE_KEY β DATABASE_URL Note: "Values hidden for security"
ββββββββββββββββββββββββββββββ
5K. TODO / FIXME NOTES
ββββββββββββββββββββββββββββββ
All TODO/FIXME/HACK/NOTE comments across all files:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π TODO utils/helpers.ts:14 "Refactor this" β
β π΄ FIXME App.tsx:89 "Memory leak here" β
β
ββββββββββββββββββββββββββββββ 5L. COMPLEXITY REPORT ββββββββββββββββββββββββββββββ Files ranked by complexity score: π΄ Critical src/api/client.ts score: 94 π High src/utils/parser.ts score: 71 π‘ Medium src/App.tsx score: 45 π’ Low src/Button.tsx score: 12 Click any β open code view + highlight complex lines
ββββββββββββββββββββββββββββββ 5M. README VIEWER ββββββββββββββββββββββββββββββ If README.md found: render it as formatted markdown (headers, bold, code blocks, lists, links) Inline in sidebar or opens as full panel [View Full README] button β full-page markdown viewer
ββββββββββββββββββββββββββββββ 5N. CI/CD PIPELINES ββββββββββββββββββββββββββββββ If .github/workflows/ found: List workflow files with names and trigger events: βοΈ ci.yml β triggers: push, pull_request βοΈ deploy.yml β triggers: push to main Click any β open file in code view
ββββββββββββββββββββββββββββββ
5O. CIRCULAR DEPENDENCIES
ββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββ 5P. ORPHAN / DEAD FILES ββββββββββββββββββββββββββββββ β« 3 files have no connections: β« src/oldComponent.tsx (never imported, imports nothing) β« utils/deprecated.ts Click any β pan to node in graph + open code view
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 6 β MAIN GRAPH VIEW ββββββββββββββββββββββββββββββββββββββββββββββ
Engine: React Flow (reactflow.dev) Custom node components. Custom edge components.
FILE NODES show:
-
File type icon (colored inline SVG per extension): .html/.htm β π orange globe .css β π΅ blue paint bucket .scss/.sass β π©· pink Sass diamond .less β π΅ dark blue Less icon .js β π‘ yellow "JS" badge .mjs/.cjs β π‘ yellow JS (module variant) .ts β π΅ blue "TS" badge .jsx β π©΅ cyan β React .tsx β π©΅ cyan β + "TSX" .vue β π’ green Vue β² .svelte β π orange Svelte .py β π’ green snake π .php β π£ indigo "PHP" .go β π©΅ cyan gopher .rs β π orange βοΈ Rust .json β βͺ gray { } .yaml/.yml β βͺ gray YAML .toml β βͺ gray TOML .md β βͺ white document π .env β π‘ yellow π key .png/.jpg β π£ purple πΌοΈ .svg β π£ purple vector icon .mp4/.webm β π΅ blue π¬ .lock β π gray lock (no parse) .sh/.bash β π’ green terminal $ .dockerfile β π΅ blue π³ Docker whale .gitignore β βͺ gray git icon package.json β π’ green π¦ npm
-
File name (bold)
-
Folder path (small, dimmed): src/components/
-
#3 chain number badge (order from root)
-
File size badge
-
β‘ entry badge | π§ͺ test | βοΈ config | β« orphan
-
β2 imports badge (how many this imports)
-
β1 used-by badge (how many import this)
-
Complexity border color: π’ Low | π‘ Medium | π High | π΄ Critical
NODE HOVER (tooltip popup on hover): First 5 lines of code as preview (syntax highlighted) File size | Line count | Last modified (if available) β imports X files: [list filenames] β used by X files: [list filenames] [Double-click to open]
EDGE TYPES (colored by relationship): import/require β purple html link/script β orange css @import β blue dynamic import β purple dashed re-export β purple dotted unknown β gray
GRAPH INTERACTIONS: Drag node β connections never break Scroll β zoom Click canvas + drag β pan Single click node β select, highlight connections, dim unrelated to 30% Double-click node β open CODE VIEW Right-click node β context menu: Open in Code View Locate in File Tree (sidebar highlights) Focus: show only this node's chain Highlight Dependencies Highlight Dependents Show full chain from root (#1 β ... β this) Pin/Unpin node (pinned nodes don't move on auto-layout) Copy Path | Copy Full URL Download this file as ZIP Collapse to folder group
Mini-map: bottom-right, clickable to pan graph Fit to screen button Auto-layout button (re-arrange) Ctrl+Z / Ctrl+Y: undo/redo node movements
COLOR BY MODE (dropdown in toolbar): π¨ Color by: File Type (default) π¨ Color by: Folder (all files in same folder = same hue) π¨ Color by: Dependency Depth (deeper = darker) π¨ Color by: Connection Count (more connections = brighter) π¨ Color by: Complexity Score (green β red) π¨ Color by: File Size (small=light, large=bright)
FILTER BAR (above graph): Filter nodes by: [All] [JS/TS] [CSS] [HTML] [Config] [Tests] [Orphans] [Has TODOs] [Circular] [Entry Points] [External] Unselected file types get dimmed but not removed
DEPTH FILTER slider: "Show dependencies up to N levels deep from entry point" Slider: 1 β 2 β 3 β All Nodes beyond selected depth fade out
FOLDER GROUPING MODE (toggle): Group files by folder as collapsible cluster nodes π components/ (6 files) [expand] When collapsed: one big node representing the folder When expanded: individual file nodes inside a rounded border Edges between folders shown as thick grouped edges
NODE SEARCH (Ctrl+F): Floating search bar over graph Type β matching nodes pulse + highlight in yellow If multiple matches: [β 1/3 β] cycle through them Camera smoothly pans to each match
BOOKMARKS: Right-click node β "Bookmark this file" Bookmarked nodes get a β icon Bookmarks panel in sidebar shows all bookmarked files Persisted in localStorage
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 7 β GRAPH LAYOUT ALGORITHMS ββββββββββββββββββββββββββββββββββββββββββββββ
STANDARD LAYOUTS: Force-directed (default) β organic spread, physics simulation Hierarchical top-down β entry at top, deps cascade down as tree Hierarchical left-right β entry at left, cascade rightward Circular β all nodes on circle, entry at top Grid β uniform rows/columns, alphabetical Radial β entry at center, rings expand outward by depth
PRESET SHAPE LAYOUTS: (arrange all nodes into recognizable visual silhouette) (connections always maintained, edges follow nodes) (animated transition when switching β nodes glide smoothly) (user can still drag nodes after; "Reset Shape" button snaps back)
π§ Human Figure Nodes form stick-figure / human silhouette Entry point = head (top center) Main imports = torso/body Sub-imports = arms (left/right branches) Leaf nodes = hands and feet Calculate using parametric human body outline curves distributed evenly by connection count
π± Cat Face / Animal Nodes form cat face + body from above Entry = nose/center face Main deps = cheeks (wide nodes) Leaf nodes = whisker tips (radiating outward) Two top clusters = ears (triangle shapes) Small circular ring = collar
π³ Tree with Leaves Nodes form natural organic tree silhouette Root file = trunk base (bottom center, large node) Main modules = thick primary branches (forking upward) Sub-modules = secondary branches Leaf files (no further imports) = rendered as small rounded leaf shapes at branch tips Animation: leaves gently sway when hovering Crown of tree fills based on number of files
π Diamond / Crystal Lattice Nodes in diamond/gem shape arrangement Multiple facet rows, entry at top point
π Golden Spiral Nodes arranged in Archimedean/Fibonacci spiral Entry at center, wrapping outward
π· Hexagonal Grid Nodes in honeycomb hex-grid pattern Connected nodes placed in adjacent hexes
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 8 β CODE VIEW PANEL ββββββββββββββββββββββββββββββββββββββββββββββ
Monaco Editor (@monaco-editor/react) Slides in from right. Resizable. Fullscreen toggle.
SPLIT VIEW MODE: Button to split panel into two side-by-side code editors Navigate different files in each pane independently Useful to compare two related files simultaneously
PANEL HEADER: [β] [β] history nav | breadcrumb trail (clickable) [Split View] [Fullscreen] [Close β] [Download β] [Copy path]
FILE INFO BAR: #3 | Button.tsx | TypeScript React | 2.4 KB | 47 lines π src/components/ | Complexity: π’ Low (score: 12)
CHAIN POSITION BAR: "Chain: main.tsx #1 β App.tsx #2 β Button.tsx #3" Each file in chain is clickable β navigate to it Visual chain: [#1]ββ[#2]ββ[#3β] (current highlighted)
IMPORT DETAILS TABLE (collapsible): "β 2 Imports β what this file brings in:" βββββ¬βββββββββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ β # β Imported From β What is Imported β Used on Lines / Purpose β βββββΌβββββββββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ€ β 1 β ./styles.css β (side-effect only) β Applies component styles β β 2 β ../utils/helpers β { formatDate, β Line 12: format display date β β β β truncate } β Line 18: truncate long strings β β β β β Line 24: format again β βββββ΄βββββββββββββββββββββ΄ββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ Click filename β navigate to that file
"β Used by 1 file β who imports this file:" βββββ¬βββββββββββββββββββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββββββββββββββ β # β File That Imports This β What They Import β Where (line) β βββββΌβββββββββββββββββββββββββββΌβββββββββββββββββββββββΌβββββββββββββββββββββββββ€ β 1 β src/App.tsx β default as Button β Line 5 β βββββ΄βββββββββββββββββββββββββββ΄βββββββββββββββββββββββ΄βββββββββββββββββββββββββ Click β navigate to App.tsx, scroll to line 5, highlight import line
LINE-LEVEL DEPENDENCY TRACKING (Monaco decorations): Every import line:
-
Colored left-gutter dot (color = edge type color)
-
Hover β rich inline tooltip: ββββββββββββββββββββββββββββββββββββββββββββ β π β ../utils/helpers.ts β β Imports: { formatDate, truncate } β β Used on lines: 12, 18, 24 β β [Follow Location β] [View in Graph β] β ββββββββββββββββββββββββββββββββββββββββββββ
-
Click [Follow Location β]: Open target file Scroll to relevant line Pulse highlight animation Toast: "π Button.tsx β helpers.ts" Push to nav history
-
Click [View in Graph β]: Code panel shrinks / graph pans to edge between the two nodes and highlights it
Unresolved imports tooltip: "
β οΈ Not found in repo β external package or gitignored"
NAVIGATION HISTORY: Max 30 items. Back β Forward β buttons. Full breadcrumb: fileA.js β fileB.ts β utils.js Clicking any item jumps directly to it
CODE ACTIONS (top-right of code panel): [π Copy code] [π Copy path] [β¬ Download file] [π Find in code] (Ctrl+F within Monaco) [π Show in Graph] (pan graph to this node)
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 9 β REPO INFO PAGE ββββββββββββββββββββββββββββββββββββββββββββββ
Dedicated page/route. Link from header or sidebar.
HERO: Owner avatar (large) + username (clickable β github.com/owner) Repo full name (large, bold) Description Homepage URL Topics as colored badge pills [β Star on GitHub β] button
STATS GRID (card layout): β Stars π΄ Forks ποΈ Watchers π Open Issues π¦ Size π Created π Updated πΏ Branch π License π Fork? (if yes β link to parent repo)
LANGUAGE BREAKDOWN: Stacked horizontal bar (fetched from /languages API) Table: Language | Color | Files | Lines | %
DOWNLOAD SECTION: [β¬ Download Full Repo as ZIP] button Shows: "~4.2 MB" estimated size Clicking β navigates to internal /download page
CONTRIBUTOR INFO (if accessible via API): Top contributors list with avatars + commit counts
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 10 β UI CUSTOMIZATION PANEL ββββββββββββββββββββββββββββββββββββββββββββββ
TAB 1 β CONNECTIONS (Edge Styles): Visual style previews (mini animated preview per option):
Bezier Curve β smooth S-curve [default] Straight Line β direct path Elbow/Step β right-angle bends
βοΈ Chain Links β actual interlocking chain link SVG drawn along path. Each link is a rounded rectangle with two semicircle ends. Links connect to each other. Slowly animate (gentle shimmer/movement). Color of chain = selected edge color.
Animated Dots β small circles flow along path (like data packets traveling between nodes)
Electric / Lightning β jagged animated line with glow/bloom color effect at kinks
Dashed Marching Ants β classic dashed line with animated dash-offset (ants marching)
Fiber Optic β glowing thin line with bright moving light pulse along it
Color settings: Per-type color pickers: import/require edge color HTML link/script edge color CSS @import edge color dynamic import color unknown edge color Rainbow mode toggle (each edge unique hue) Gradient edge toggle (source β target blend) Edge opacity slider: 20%β100% Edge thickness slider: 1pxβ8px Arrow head: Arrow | Dot | Diamond | None Edge label: show/hide import type label on edges
TAB 2 β NODES: Shape: Card | Pill | Hexagon | Circle | Minimal Size slider: XSmall β Small β Medium β Large β XLarge Show/hide toggles: File size | Folder path | Chain # badge Import count β | Used-by count β Complexity border color | Badge icons Shadow: None | Soft | Strong | Neon glow | Drop Border: None | Subtle | Bold | Glow | Gradient Corner radius slider Icon size slider
TAB 3 β THEME:
CONTROL A β App UI Theme (sidebar, header, panels, text): π Dark UI (default) βοΈ Light UI
CONTROL B β Graph Canvas Theme (ONLY affects the graph canvas area β nodes, edges, background) (Does NOT affect sidebar/header/panels)
π Dark Canvas β dark bg, colored nodes, purple edges
βοΈ Light Canvas β white bg, light nodes, clean minimal
β‘ Neon Canvas β pitch black, neon glowing edges, dark nodes
π Blueprint Canvas β dark navy bg, white/cyan lines,
engineering drawing look, grid overlay
πΈ Pastel Canvas β soft cream bg, muted colors, gentle style
π₯ Heatmap Canvas β edges glow intensity by connection count
Both controls are visible simultaneously. Example: Dark UI + Neon Canvas = dark sidebar, neon graph β Light UI + Blueprint Canvas = light sidebar, blueprint graph β
TAB 4 β BACKGROUND (Graph Canvas only): Dot grid (default) | Line grid | Solid | Subtle noise texture | Blueprint paper | Hexagon grid | Circuit board pattern | Starfield (dark themes) | Graph paper
TAB 5 β ANIMATION: Edge animation speed: Off | Slow | Medium | Fast | Turbo Node hover effect: Glow | Lift | Scale | Shake | None Layout transition: Instant | Smooth | Bouncy | Elastic Reduce motion toggle (for accessibility)
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 11 β GUIDE / LEGEND PANEL ββββββββββββββββββββββββββββββββββββββββββββββ
Toggled by "?" button. Styled as interactive in-app manual.
PART A β SYMBOLS:
β‘ Entry Point β root/main file
#1 #2 #3 β chain order from entry point
β Edge β file A imports file B
βοΈ Chain edge β dependency chain visual style
β Selected β currently focused node
β Dimmed β not related to selection
π΄ Gutter dot β this code line links to another file
[Follow β] β jump to connected file + line
π¦ External β third-party package
PART B β FILE ICONS: Full grid: every icon + extension + color + what it is Beginners can identify any file type at a glance
PART C β HOW CHAIN NUMBERS WORK: Clear visual explanation with mini example: "#1 is your entry point (where your app starts). Every file it directly imports becomes #2, #3... Files those import become #4, #5... Higher number = further from app start. This shows the ORDER your project loads." Mini inline diagram showing #1β#2β#3 chain
PART D β KEYBOARD SHORTCUTS TABLE: Ctrl+F β search/find file in graph Ctrl+Shift+F β fit all nodes to screen Ctrl+E β open export modal Ctrl+Z / Ctrl+Y β undo/redo node moves Ctrl+B β toggle sidebar Escape β deselect / close panels β β β navigate code history (in code panel) G β open guide/legend P β presentation mode Space β pan mode (hold)
- / - β zoom in / zoom out
PART E β HOW IMPORTS WORK (for beginners): Plain English explanation with examples: "When a file says import X from './other', it means 'I need something from that other file to work.' RepoGraph draws a line between them to show this." Show examples for JS, CSS, HTML visually.
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 12 β SPECIAL GRAPH MODES ββββββββββββββββββββββββββββββββββββββββββββββ
NODE FOCUS MODE: Right-click β "Focus on this file" Shows ONLY: selected node + direct imports + direct dependents Everything else hidden with smooth fade [Exit Focus Mode] button top-center restores full graph
CHAIN TRACE MODE: Right-click β "Trace full chain from root to here" Highlights ONLY the path from #1 entry to this node All other nodes and edges dim to 15% Shows: #1 β #2 β #4 β #7 (current) in glowing chain
DEPENDENCY DEPTH MODE: Slider: show only N levels deep from selected node N=1: show only direct connections N=2: show connections of connections etc.
PRESENTATION MODE (P key or header button): Full-screen graph, no UI chrome (no sidebar, no panels) Graph fills entire viewport Subtle watermark: "RepoGraph" bottom-right ESC to exit Perfect for screen sharing / walkthroughs
STATS OVERLAY MODE: Toggle button: show stats badges floating on graph Each node shows its complexity score as floating badge Each edge shows import count floating label Overall: "Most connected: App.tsx (12 connections)"
DEPENDENCY MATRIX VIEW: Alternative to graph β show dependencies as a grid: Rows = source files | Columns = target files Cell = colored dot if dependency exists Hover cell = show exact import details Good for seeing all dependencies at a glance
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 13 β DOWNLOAD SYSTEM ββββββββββββββββββββββββββββββββββββββββββββββ
Use JSZip library for creating ZIPs in browser.
ACCESS POINTS: Header [β¬ Download] button β full repo Sidebar file right-click β single file ZIP Code panel [β¬] button β current file ZIP Repo Info page β full download section Multi-select files in sidebar β batch ZIP
/download PAGE (internal route): ββββββββββββββββββββββββββββββββββββββββββββββββ β [RepoGraph logo] β β β β Downloading from: β β [owner-avatar] owner / repo-name β β β β π¦ repo-name-main.zip β β Estimated size: ~4.2 MB β β β β [ββββββββββββββββ] Preparing... β β β β Download will start automatically. β β If not: [Click here to download manually] β β β β Also available: β β [Download as ZIP] β β [Download specific files β] β β β β [β Return to Graph] [Load another repo] β ββββββββββββββββββββββββββββββββββββββββββββββββ
For full repo (GitHub mode): β Redirect to: github.com/{owner}/{repo}/archive/{branch}.zip β Show size from repo metadata
For single/specific files (any mode): β Build ZIP in browser using JSZip β Show exact file size before download β Filename: filename.ext.zip or batch-files.zip
For local folder mode: β Re-zip selected files from memory using JSZip β Multi-select files in sidebar tree for batch download
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 14 β EXPORT OPTIONS ββββββββββββββββββββββββββββββββββββββββββββββ
Modal opened by Ctrl+E or toolbar button.
-
PNG Image Current view OR fit-all modes Resolution: 1x | 2x | 3x With/without background Library: html-to-image
-
PDF Page 1: Graph visualization Page 2: File list + dependency table Page 3: Language stats + sidebar summary Library: jsPDF
-
SVG Vector format, infinitely scalable Embeddable in docs and presentations
-
JSON (Graph Data) Full nodes + edges + metadata + positions Re-importable to restore session
-
Markdown Report Auto-generated structured analysis:
-
CSV (Dependency Table) Rows: source_file, target_file, line_number, import_type, what_imported For import into Excel / Google Sheets
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 15 β LANDING SCREEN ββββββββββββββββββββββββββββββββββββββββββββββ
Shown when no repo is loaded. Beautiful, welcoming.
Hero: Large heading + short tagline "RepoGraph β See your codebase, not just your code."
Two input cards side by side: ββββββββββββββββββββββββββ ββββββββββββββββββββββββββ β π GitHub URL β β π Local Folder β β β β β β [paste URL here ] β β [drag & drop or β β [Load Repo β] β β click to browse] β β β β β β Works with public β β 100% offline. β β GitHub repos β β No internet needed. β ββββββββββββββββββββββββββ ββββββββββββββββββββββββββ
[β¨ Try Demo] button β loads hardcoded sample React project (~10 files, showcasing ALL features)
Recently Loaded section: Last 10 repos as clickable cards Each shows: avatar, owner/repo, language badges, file count, date loaded, [Remove β]
3-step visual explainer: 1οΈβ£ Paste a GitHub URL or upload your folder 2οΈβ£ RepoGraph maps every file and connection 3οΈβ£ Explore, navigate, understand, export
Feature highlights row (icons + short descriptions): β Any language | π Follow imports | βοΈ Visual chains π Sidebar stats | π³ Shape layouts | π€ Export all
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 16 β ONBOARDING TOUR ββββββββββββββββββββββββββββββββββββββββββββββ
First time a user loads a repo β show optional guided tour. Spotlight overlay highlighting each UI area in sequence:
Step 1: "This is your graph. Each box = one file." Step 2: "Lines show which files import each other." Step 3: "Click a node to highlight its connections." Step 4: "Double-click to read the file's code." Step 5: "This sidebar shows all project details." Step 6: "Customize the look with the π¨ panel." Step 7: "Export your graph anytime with π€."
Skip/dismiss option. Don't show again checkbox. "Restart Tour" option in help/guide panel.
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 17 β PERFORMANCE ββββββββββββββββββββββββββββββββββββββββββββββ
Web Worker for ALL file parsing (zero UI freeze) Lazy file content loading (fetch/read only on open) 200+ files: LOD (level-of-detail) rendering
- Far/small nodes: simplified colored dot
- Full detail only when zoomed in Debounce layout recalculation (300ms) Virtual scroll in sidebar for huge repos (1000+ files) Cancel in-flight GitHub requests on URL change requestAnimationFrame for all graph animations IndexedDB for caching parsed results of recently visited repos (avoid re-parsing same repo twice)
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 18 β TOAST NOTIFICATIONS ββββββββββββββββββββββββββββββββββββββββββββββ
Top-right. Auto-dismiss 4s. Stackable. Swipe to dismiss.
Types and examples:
β
Success (green): "Loaded 47 files, 123 dependencies found"
π Navigate (blue): "Following: Button.tsx β helpers.ts (line 14)"
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 19 β ACCESSIBILITY ββββββββββββββββββββββββββββββββββββββββββββββ
Full keyboard navigation (Tab through all elements) Proper aria-labels on every button/input/region Focus rings visible at all times Skip-to-main-content link (screen readers) Color blind safe: use shape + label not color alone Respects prefers-reduced-motion (disable all animations) Respects prefers-color-scheme (auto dark/light) Minimum text contrast ratio: 4.5:1 (WCAG AA) All icons have descriptive aria-label Graph nodes keyboard navigable with arrow keys
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 20 β MOBILE ββββββββββββββββββββββββββββββββββββββββββββββ
Banner: "RepoGraph works best on desktop (1024px+)" Show: sidebar + file tree fully functional Code viewer works fine (Monaco responsive) Graph: simplified static layout (no drag, no pan) Download and export work fine on mobile Touch-friendly buttons (min 44px tap targets)
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 21 β TECH STACK ββββββββββββββββββββββββββββββββββββββββββββββ
Frontend: React 18 + TypeScript + Vite Styling: Tailwind CSS + CSS custom properties JetBrains Mono (code) + Syne (UI headings) Graph: React Flow (reactflow.dev) Custom node + edge components per type Custom chain link SVG edge component Code View: Monaco Editor (@monaco-editor/react) Programmatic gutter decorations Custom hover providers Inline diff (for future compare mode) Icons: Inline SVG icon map (no external library) Export: html-to-image (PNG/SVG) + jsPDF (PDF) ZIP: JSZip (client-side ZIP creation) State: Zustand (global, no boilerplate) Routing: React Router v6 (/download + /repo-info routes) Parsing: Custom regex engine in Web Worker (worker.ts) Path alias resolution (tsconfig paths) Caching: IndexedDB (cache parsed repo data) Storage: localStorage (recent repos, bookmarks, customization preferences, tour dismissed) GitHub API: Native fetch() only, no SDK Markdown: react-markdown (README rendering)
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 22 β FUTURE ARCHITECTURE (Do NOT build now β keep code extensible for these) ββββββββββββββββββββββββββββββββββββββββββββββ
Supabase auth + user accounts Private GitHub repo via OAuth token Save and share graph via unique URL Annotate/comment nodes (team notes) Repo version diff (compare two branches/commits) AI explanation of each file's role Team collaboration with live cursors on graph Git commit history per file (blame view) VS Code extension version of RepoGraph NPM package: repograph-cli for terminal analysis
ββββββββββββββββββββββββββββββββββββββββββββββ SECTION 23 β QUALITY & DESIGN STANDARDS ββββββββββββββββββββββββββββββββββββββββββββββ
VISUAL QUALITY: Figma + Linear + Vercel + GitHub combined quality Premium dev-tool aesthetic throughout Every pixel intentional. No default browser styles. Micro-animations on every interaction Skeleton loading screens (not spinners alone) Empty states for every panel (never blank) Loading states everywhere
BEGINNER FRIENDLINESS: Any non-developer should understand the graph within 60 seconds of loading a repo Plain English explanations everywhere in Guide Tooltips on every icon and technical term Onboarding tour for first-time users Demo mode shows a pre-loaded example instantly
DEVELOPER EXPERIENCE: Every button works β zero placeholder/dummy UI No console errors in production build All async operations cancellable Graceful degradation for all edge cases Every error has a friendly message + next action
CODE ARCHITECTURE: Clean component separation for future features All parsing logic isolated in worker.ts All GitHub API calls isolated in github.ts Theme system via CSS custom properties only Zustand stores clearly separated by domain: repoStore, graphStore, uiStore, codeStore
