See your software, not your folders.
Turn a public GitHub repository into an interactive architecture graph β pages, API routes, services, databases and external services, connected and explorable in the browser.
Quick start Β· Features Β· Screenshots Β· CLI Β· How it works Β· Security Β· Testing Β· Contributing
Repositories are usually consumed as files and folders. AppGraph adds another representation:
repository β semantic software graph.
Paste a public GitHub URL and AppGraph statically analyzes the codebase, then renders an interactive map that answers:
- What are the important parts of this application?
- How are pages connected to components and APIs?
- Which API routes call which services?
- Which modules read or write to the database?
- Where do environment variables enter?
- What depends on this module, and what breaks if it changes?
No GitHub login is required for public repositories. Analysis is deterministic static analysis β
no LLM, no code execution, no npm install of the analyzed repository.
- Entities: pages, components, hooks, API routes, services, middleware, state, config, databases, external services, modules.
- Typed relationships with confidence scores:
renders,routes_to,calls,reads,writes,uses,imports,depends_on. - Four granularities: Product β Architecture β Modules β Files.
- Every relationship carries provenance: source file, line range, analyzer id, rule id and
how it was established (
exact/resolved/inferred) with a human-readable reason. - The Inspector Evidence panel links each record to the exact GitHub line pinned to the analyzed commit, so you can always answer "why are these two connected?".
- No invented links: unsupported constructs stay unsupported and are reported honestly in Insights β Analysis coverage (what the analyzer actually understood).
- Graph schema and rule ids are documented in docs/graph-schema.md.
- Trace flows (
T) β animated, step-by-step playback of what a page/API/service leads to, with a camera that follows each hop. - Impact analysis (
I) β reverse reachability: what depends on this entity if it changes. - Path finder (
P) β shortest relationship path between any two entities. - Detected flows + guided tour β automatic end-to-end chains such as
Dashboard β /api/projects β Project Service β Db β Prisma β PostgreSQL. - Circular dependency detection with replayable cycles.
- Hover cards β instant relationship context on every entity.
- Health metrics: average links, orphans, hubs, cycles, confidence, density.
- Charts: entities by type, relationships by type, per-layer traffic (in/out).
- Export the graph as Mermaid, JSON or a Markdown architecture report.
- Deterministic schema parsers for Prisma, Drizzle and SQL DDL (fields, keys, relations, enums, indexes β all with source evidence).
- Data workspace: model cards with field tables, PK/FK/UQ badges, relation chips, search, hide-join-tables, per-model impact analysis.
- Codeβmodel edges:
prisma.model.findManybecomes areadsedge to the actual model; Drizzle.from(table)links code to the parsed table. - Mermaid ER export and schema JSON export.
- Railway-inspired dark UI, deterministic lane layout (Frontend β Backend β Data β
Configuration β External): ELK for small graphs, a fast layered layout for large ones,
smoothstep edges, animated traces, minimap, command palette (
βK), legend (L), right-click context menu, keyboard-first navigation.
- Next.js App Router and Pages Router (routes, layouts, route handlers, middleware).
- React components and hooks, Node.js services.
- Recognized SDKs become explicit nodes: Stripe, Prisma, Drizzle, Supabase, Firebase, Clerk, Auth.js, pg, MongoDB, Redis, AWS S3, OpenAI, Anthropic, Resend, PostHog, Sentry and more.
- Detects npm / yarn / pnpm workspaces, Turborepo and Nx from real config files.
- Per-package framework detection with a Packages workspace view and its own canvas lane.
- Dependency edges only for workspace packages, each carrying the declaring line in
package.jsonas evidence. - Cross-package imports resolve through package
exportsmaps, including subpaths (@acme/ui/button), conditions and wildcards.
- Per-file parse cache keyed by content SHA + parser version, so unchanged files are never reparsed across commits.
- Precomputed graph indexes for hover/selection hot paths and React Flow viewport culling for large graphs.
- Bounded analysis with explicit warnings; a synthetic 420-file fixture guards budgets and determinism in CI.
| Flow tracing | Insights & detected flows |
|---|---|
![]() |
![]() |
| Analytics | Inspector |
|---|---|
![]() |
![]() |
| Hover context | Landing |
|---|---|
![]() |
![]() |
git clone https://github.com/hi77x/appgraph.git
cd appgraph
npm install
npm run devOpen http://localhost:3000 and paste a public GitHub repository URL.
Production:
npm run build
npm startCopy .env.example to .env and adjust as needed:
| Variable | Required | Purpose |
|---|---|---|
GITHUB_TOKEN |
no | Server-side GitHub token (read-only). Without it AppGraph still works for public repos, but shares the unauthenticated 60 req/h limit. Never sent to the browser. |
APPGRAPH_CACHE_DIR |
no | Filesystem cache directory (default <project>/.appgraph-cache). |
APPGRAPH_ANALYSIS_VERSION |
no | Bump to invalidate cached analyses after analyzer changes. |
APPGRAPH_ANALYZE_RATE_LIMIT |
no | Analyses per 5 minutes per client (default 12). |
APPGRAPH_MAX_CONCURRENT_ANALYSES |
no | In-process analysis concurrency (default 3). |
Analyze a repository without the UI β useful for scripts and CI:
# Summary + progress in the terminal
npm run analyze -- nextjs/saas-starter
# Machine-readable summary (health, flows, cycles)
npm run analyze -- nextjs/saas-starter --json
# Full graph document + Mermaid diagram + Markdown report
npm run analyze -- nextjs/saas-starter \
--out graph.json \
--report architecture.md \
--mermaidInput accepts owner/repo or a full https://github.com/owner/repo URL.
GitHub URL
β strict URL validation (github.com only, SSRF-safe)
Repository Provider (official GitHub REST API)
β metadata Β· commit SHA Β· recursive tree
File selection & classification (limits, ignored dirs, budgets)
β raw.githubusercontent.com (no API rate-limit cost)
TypeScript AST parsing + import resolution (tsconfig paths, index files, workspaces)
β
Framework adapters (Next.js, React, Node) + integration detection
β
Semantic graph builder (entities, typed edges, confidence, groups)
β
Layered layout per granularity: ELK worker with hard timeout (small graphs),
fast deterministic lane layout (large graphs)
β
Graph JSON β interactive canvas
- 3 GitHub API requests per analysis (metadata, commit, tree); file contents come from
raw.githubusercontent.com. - Results are cached by
github:{owner}:{repo}:{commitSha}:{analysisVersion}β re-analyzing the same commit is instant and does not touch GitHub again. - Large repositories degrade to a partial graph with explicit warnings instead of failing.
src/
app/ Next.js App Router (landing, workspace, API routes)
components/ Canvas, explorer, inspector, search, workspace shell, landing
features/workspace/ Client state, trace/path/flow algorithms, analytics
lib/
github/ URL parsing, provider abstraction, limits, fixture provider
analysis/ Pipeline, classifier, TS parser, resolvers, frameworks, graph builder
graph/ Graph model + ELK layout engine
cache/ Filesystem/in-memory JSON cache
tests/
unit/ integration/ e2e/ Vitest + Playwright suites with a fixture repository
scripts/analyze.ts CLI entry point
Repository analysis is static analysis only.
- Repository code is never executed, installed, imported or written to disk.
- Strict GitHub URL parsing β no arbitrary URL fetching, no generic proxy (SSRF-safe).
- Request timeouts, response/byte limits, bounded concurrency, node/edge caps.
- Environment variable names may be surfaced; values are never read or stored.
- No secrets in server logs or the client bundle.
| Status | |
|---|---|
| Public GitHub repositories | β |
TypeScript / JavaScript (.ts .tsx .js .jsx .mjs .cjs .mts .cts) |
β |
| Next.js (App Router + Pages Router), React, Node.js | β |
| Private repositories, GitLab, Bitbucket, uploaded archives | π via RepositoryProvider |
| Other languages | π via framework adapters |
npm run typecheck # TypeScript project check
npm test # 71 unit + integration tests (Vitest, fixture-based, no network)
npm run build # production build
npm run test:e2e # Playwright E2E (build first; uses installed Edge by default)- Unit: URL parsing, classifier, import resolver, TS parser, integrations, trace/path algorithms, analytics (health, cycles, Mermaid).
- Integration: full pipeline against
tests/fixtures/sample-nextjs(pages, APIs, services, Prisma/Postgres, Stripe, env vars, layouts, cache). - E2E: landing, workspace interactions, tracing/impact/path/tour, analytics & exports, hover cards, legend, context menu, mobile sheets.
- Live GitHub check (opt-in):
APPGRAPH_LIVE_TEST=1 npx vitest run tests/manual/live-github.test.ts.
The Dockerfile builds with Next.js standalone output and runs as a non-root user:
docker build -t appgraph .
docker run -p 3000:3000 -e GITHUB_TOKEN=... appgraph| Key | Action |
|---|---|
β/Ctrl + K |
Command palette |
T / I / P |
Trace flow / Impact / Find path |
F / R |
Fit graph / Reset layout |
L |
Toggle legend |
Space |
Play/pause the active trace |
Esc |
Stop trace / clear selection |
1β5 |
Product / Architecture / Modules / Files / Symbols |
- Public repositories only (no OAuth yet).
- TS/JS ecosystems only; other languages need new adapters.
- Heuristic relationships are scored with confidence and marked as inferred in the inspector.
- Extremely large repositories are bounded and produce a partial graph with warnings.
- Job state and cache are per-process; multi-instance deployments should add a shared store.
Contributions are welcome! Ideas that fit the roadmap:
- New framework adapters (
Vue,Svelte,Nuxt,Nest,Expresspatterns). - Language adapters behind the existing parser interface (
parsers/). - More integration detectors in
src/lib/analysis/integrations.ts. - Graph layouts, canvas interactions and accessibility improvements.
Before opening a PR:
npm run typecheck && npm test && npm run buildPlease keep pull requests focused and include tests for analyzer changes
(tests/fixtures/sample-nextjs is a good place to extend fixtures).
- GitHub OAuth and private repositories.
- Graph diff between commits and PR architecture review.
- Change-impact analysis and architecture history.
- AI natural-language queries over the graph (optional layer on top of deterministic analysis).
- GitLab / Bitbucket providers.
MIT Β© 2026 Itmsx-v






