Skip to main content

GitHub Repository Interconnect

A full-stack application that ingests open-source GitHub repositories, statically analyses their exposed endpoints (REST APIs, CLIs, libraries, data files, schemas, ML models), classifies license compatibility for safe chaining, visualises module interconnections on an interactive canvas, and uses a local LLM (via LM Studio) to infer hidden endpoints and generate architecture reports.


๐ŸŒŸ Key Features

1. GitHub Repository Ingestion & Analysis

  • Accepts any public GitHub repository URL or owner/repo identifier.
  • Streams live analysis progress over WebSockets so you see results as they arrive.
  • Detects endpoint categories via static heuristic analysis:
    • โšก REST API โ€” FastAPI, Flask, Express, OpenAPI / Swagger definitions
    • โŒจ๏ธ CLI Tool โ€” console entry points, bin/ scripts, click / typer / argparse
    • ๐Ÿ“ฆ Library / Package โ€” pip (pyproject.toml / setup.py), npm, Cargo
    • ๐Ÿ—„๏ธ Data Files โ€” CSV, Parquet, HDF5, SQLite, Arrow
    • ๐Ÿงฉ Data Structures โ€” Pydantic models, Protobuf, JSON Schema, TypedDict
    • ๐Ÿณ Docker Container โ€” Dockerfile, docker-compose.yml
    • ๐Ÿค– ML Model โ€” model weights, PyTorch, Hugging Face Transformers
    • โ—ˆ GraphQL & gRPC Services

2. License Compatibility & Caution Banners

  • Classifies SPDX licenses into Permissive (MIT, Apache-2.0, BSD-), Weak Copyleft (LGPL, MPL-2.0), Strong Copyleft (GPL-, AGPL-*), Proprietary, or Unknown.
  • Shows caution banners on module cards for copyleft and proprietary licenses.
  • Displays a per-connection license compatibility warning inside the Connection Inspector panel when incompatible modules are wired together.

3. Interactive Data-Flow Canvas

  • Powered by React Flow with fully custom module node cards.
  • Left (purple) handles = input endpoints (data consumer).
  • Right (green) handles = output endpoints (data producer).
  • Drag from any output handle to an input handle to create a directed data-flow edge.
  • Click any edge to open the Connection Inspector slide-up panel showing the full endpoint pair and license compatibility status.
  • Auto-layout, fit-to-view, and mini-map controls built in.

4. โœจ AI Features (LM Studio)

Powered by any OpenAI-compatible local model running in LM Studio (http://localhost:1234).

Feature How to trigger What it does
Endpoint Inference Click โœจ AI on a module card Streams AI-inferred endpoints from the repo README & file tree โ€” useful when static analysis is incomplete
Description Enrichment Available inside the AI Infer modal Rewrites terse auto-detected descriptions into readable natural language
Architecture Report Click โœจ AI Report in the toolbar Generates a 5-section Markdown report covering pipeline overview, data-flow analysis, endpoint contract mapping, license assessment, and optimisation recommendations

The report modal supports:

  • ๐Ÿ“„ Open / Print PDF โ€” opens a clean printable window and triggers the print dialog (Save as PDF).
  • โฌ‡๏ธ .md โ€” downloads the raw Markdown file.
  • ๐Ÿ“‹ Copy โ€” copies to clipboard.
  • ๐Ÿ”„ Regenerate โ€” streams a fresh report.

5. Import & Export

  • Export the full graph state (modules + connections) as a JSON file.
  • Import a previously exported JSON file to restore a saved topology.
  • GitHub PAT is stored in localStorage โ€” never sent anywhere except the backend proxy.

๐Ÿ—๏ธ Architecture

GitHub Repository Interconnect
โ”œโ”€โ”€ backend/                        # FastAPI application (Python โ‰ฅ 3.10)
โ”‚   โ”œโ”€โ”€ main.py                    # Server entry point, REST routes & WebSocket handlers
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ””โ”€โ”€ module.py              # Pydantic schemas: Module, Endpoint, Connection
โ”‚   โ”œโ”€โ”€ analyzer/
โ”‚   โ”‚   โ”œโ”€โ”€ github_client.py       # Async GitHub REST API client (PAT-aware)
โ”‚   โ”‚   โ”œโ”€โ”€ repo_analyzer.py       # Analysis orchestrator (WebSocket streaming generator)
โ”‚   โ”‚   โ”œโ”€โ”€ endpoint_extractor.py  # Heuristic static detectors for all endpoint types
โ”‚   โ”‚   โ””โ”€โ”€ license_checker.py     # SPDX license classifier & compatibility matrix
โ”‚   โ””โ”€โ”€ llm/
โ”‚       โ”œโ”€โ”€ lm_studio_client.py    # OpenAI-compatible async streaming client for LM Studio
โ”‚       โ”œโ”€โ”€ endpoint_inferrer.py   # AI endpoint inference from README + file tree
โ”‚       โ”œโ”€โ”€ enricher.py            # AI description enrichment for terse auto-detected endpoints
โ”‚       โ””โ”€โ”€ flow_reporter.py       # AI architecture & pipeline report generator
โ”‚
โ””โ”€โ”€ frontend/                       # React + Vite application (Node โ‰ฅ 18)
    โ”œโ”€โ”€ src/
    โ”‚   โ”œโ”€โ”€ App.jsx                # Root: React Flow canvas, toolbar, modal mounts
    โ”‚   โ”œโ”€โ”€ store/
    โ”‚   โ”‚   โ””โ”€โ”€ useModuleStore.js  # Zustand state: modules, connections, AI settings
    โ”‚   โ”œโ”€โ”€ api/
    โ”‚   โ”‚   โ””โ”€โ”€ client.js          # Axios HTTP client + WebSocket helpers
    โ”‚   โ”œโ”€โ”€ components/
    โ”‚   โ”‚   โ”œโ”€โ”€ ModuleNode.jsx      # Custom React Flow node card with endpoint handles
    โ”‚   โ”‚   โ”œโ”€โ”€ AddRepoPanel.jsx    # Sidebar: repo ingestion form + AI settings toggle
    โ”‚   โ”‚   โ”œโ”€โ”€ AISettingsPanel.jsx # LM Studio URL, model picker, connection tester
    โ”‚   โ”‚   โ”œโ”€โ”€ AIInferPanel.jsx    # Per-module AI inference & enrichment modal
    โ”‚   โ”‚   โ”œโ”€โ”€ FlowReportPanel.jsx # Full canvas AI architecture report modal
    โ”‚   โ”‚   โ”œโ”€โ”€ ConnectionPanel.jsx # Edge inspector slide-up panel
    โ”‚   โ”‚   โ”œโ”€โ”€ ModuleListPanel.jsx # Module list sidebar (collapsible)
    โ”‚   โ”‚   โ”œโ”€โ”€ EndpointBadge.jsx   # Endpoint type icon + label badge
    โ”‚   โ”‚   โ””โ”€โ”€ LicenseBadge.jsx    # License tier colour badge
    โ”‚   โ””โ”€โ”€ index.css              # Dark-mode design system (CSS custom properties)
    โ”œโ”€โ”€ index.html
    โ”œโ”€โ”€ vite.config.js             # API & WebSocket proxy โ†’ http://localhost:8000
    โ””โ”€โ”€ package.json

๐Ÿš€ Quick Start

Option A โ€” pip install (end-user, no Node required)

The pre-built React frontend is bundled inside the Python wheel, so only Python is needed at runtime.

pip install repo-conn

# Optional: set a GitHub PAT to raise the API rate limit
export GITHUB_TOKEN=ghp_...

# Launch โ€” starts the server and opens the browser automatically
repo-conn

Custom host/port:

repo-conn --port 9000
repo-conn --host 0.0.0.0 --port 8080   # expose on LAN
repo-conn --no-browser                  # skip auto-open
repo-conn --reload                      # enable hot-reload (dev)

The server runs at http://127.0.0.1:8000. Swagger docs at /docs.


Option B โ€” development (frontend hot-reload)

Use this if you are modifying the frontend source and want Vite's HMR.

Prerequisites

  • Python โ‰ฅ 3.10
  • Node.js โ‰ฅ 18 and npm
  • (Optional) LM Studio running on http://localhost:1234 for AI features
# 1. Clone
git clone https://github.com/<you>/github-repository-interconnect.git
cd github-repository-interconnect

# 2. Configure environment
cp .env.example .env
# Edit .env โ€” add GITHUB_TOKEN and optionally LM_STUDIO_URL

# 3. Backend
pip install -e .
python -m uvicorn backend.main:app --host 127.0.0.1 --port 8000 --reload

# 4. Frontend (separate terminal)
cd frontend
npm install
npm run dev       # http://localhost:5173

(Optional) LM Studio setup

  1. Download LM Studio and load any GGUF model (e.g. google/gemma-3, mistral-7b-instruct, llama-3).
  2. Start the local server on port 1234 (default).
  3. In the app sidebar, expand โœจ AI Settings, enter http://localhost:1234, and click Test.
  4. Select your loaded model from the dropdown.

๐Ÿ”Œ Backend API Reference

Method Path Description
GET /api/state Returns persisted modules and connections
DELETE /api/modules/{id} Removes a module
POST /api/connections Creates a new endpoint connection
DELETE /api/connections/{id} Removes a connection
POST /api/export Returns full graph state as JSON
POST /api/import Loads graph state from uploaded JSON
GET /api/llm/health Tests LM Studio connectivity and lists available models
POST /api/llm/enrich/{module_id} Enriches module endpoint descriptions with AI
WS /ws/analyze Streams repo analysis events (progress, endpoints, done/error)
WS /ws/llm/infer/{module_id} Streams AI-inferred endpoints for a module
WS /ws/llm/report Streams full AI architecture report for current graph

๐Ÿงฉ Multi-Repository Pipeline Examples

REST API & Validation Pipeline

pallets/click  โ”€โ”€CLI Toolโ”€โ”€โ–บ  pydantic/pydantic  โ”€โ”€Data Structuresโ”€โ”€โ–บ  fastapi/fastapi
 (CLI ingestion)               (schema validation)                       (REST API service)

All MIT/BSD โ€” โœ… Freely chainable in open-source and commercial projects.

ML Inference Pipeline

encode/httpx  โ”€โ”€HTTP Clientโ”€โ”€โ–บ  fastapi/fastapi  โ”€โ”€REST APIโ”€โ”€โ–บ  huggingface/transformers
(async HTTP)                    (inference server)              (tokenizer + model)

โš™๏ธ Environment Variables

Variable Default Description
GITHUB_TOKEN (empty) GitHub PAT โ€” raises rate limit from 60 to 5,000 req/hr
HOST 127.0.0.1 Uvicorn bind host
PORT 8000 Uvicorn bind port

๐Ÿ“„ License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

repo_conn-1.1.0.tar.gz (23.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_conn-1.1.0-py3-none-any.whl (222.5 kB view details)

Uploaded Python 3

File details

Details for the file repo_conn-1.1.0.tar.gz.

File metadata

  • Download URL: repo_conn-1.1.0.tar.gz
  • Upload date:
  • Size: 23.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for repo_conn-1.1.0.tar.gz
Algorithm Hash digest
SHA256 ad9fb1707fbb3bebd99c9f9743a1e434f9177c3e5c52b3d0c62047fcc35f4432
MD5 01d5f85533c6afdc95b46fdcea31241e
BLAKE2b-256 2c08d8d9d574d32dd6d391708683ecbcbc8ae6ba64d952c3036aeb6f4579ac8a

See more details on using hashes here.

File details

Details for the file repo_conn-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: repo_conn-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 222.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.11

File hashes

Hashes for repo_conn-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bbfeeb343a5f23c4793e0dc67bd189906bbdfab453f66e30124173f276c2456
MD5 6e5579d5e001d21ae3de535c537302ce
BLAKE2b-256 8626d6c50e0c92adc5b7df07c97373ca36c30ae8b9989b923a439d22259e42bc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page