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/repoidentifier. - 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:1234for 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
- Download LM Studio and load any GGUF model (e.g.
google/gemma-3,mistral-7b-instruct,llama-3). - Start the local server on port
1234(default). - In the app sidebar, expand โจ AI Settings, enter
http://localhost:1234, and click Test. - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad9fb1707fbb3bebd99c9f9743a1e434f9177c3e5c52b3d0c62047fcc35f4432
|
|
| MD5 |
01d5f85533c6afdc95b46fdcea31241e
|
|
| BLAKE2b-256 |
2c08d8d9d574d32dd6d391708683ecbcbc8ae6ba64d952c3036aeb6f4579ac8a
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bbfeeb343a5f23c4793e0dc67bd189906bbdfab453f66e30124173f276c2456
|
|
| MD5 |
6e5579d5e001d21ae3de535c537302ce
|
|
| BLAKE2b-256 |
8626d6c50e0c92adc5b7df07c97373ca36c30ae8b9989b923a439d22259e42bc
|