OverviewFilesCommitsIssuesDocsReleasesPeers

holepunchto-kb commits / 30a9b1e

Initial commit: Holepunchto Ecosystem Analysis
This repository contains a comprehensive analysis of the holepunchto P2P ecosystem (529 repositories) with semantic mappings, skills documentation, and tools for building P2P applications. ## Contents ### Phase 1A: Repository Metadata Analysis - Analyzed all 529 repos via GitHub API - Built dependency graph with reverse dependencies - Extracted runtime classification (bare, pear, node, universal) - Generated maturity index (stars, activity, status) - Created skills.md for each repo (529 files) ### Phase 1B: Deep Code Analysis - Cloned and analyzed 12 core repos (Tier 1 & 2) - Extracted API surfaces from code - Detected P2P patterns - Enhanced skills.md with usage examples - Building blocks: hypercore, hyperbee, hyperdrive, autobase, hyperdht, hyperswarm - Helpers: corestore, localdrive, mirror-drive, compact-encoding, protomux, secret-stream ### Documentation - PEAR_DOCS_DEEP_DIVE.md - Official taxonomy analysis - PHASE_1A_REVIEW.md - Data quality review - PHASE_1A_FIXES_VALIDATION.md - Bug fixes validation - PHASE_1B_PLAN.md - Deep analysis implementation plan - PHASE_1B_PROGRESS.md - Progress report - CLEANUP.md - Post-completion cleanup tasks ### Data Files - dependency-graph.json - Full dependency map with reverse deps - tech-stack.json - Runtime and language classification - maturity-index.json - Repository maturity metrics - repo_map.json - All 529 repos with metadata - tiers.json - Analysis tier definitions ### Scripts - process_repos.js - Phase 1A automation - clone_and_analyze_tier.js - Phase 1B automation ### Git Submodules 12 repositories added as submodules (optional to clone): - repos/tier1/* - 6 core building blocks - repos/tier2/* - 6 helper libraries Users can clone this repo without submodules for just the knowledgebase, or selectively init submodules as needed. ## Architecture Based on official pear-docs taxonomy: - Building Blocks: Core P2P primitives - Helpers: Support libraries - Pear Modules: Application runtime - Bare Modules: JavaScript runtime standard library - Tools: CLI applications - Infrastructure: Supporting libraries ## Usage Clone without submodules (lightweight): git clone <url> Clone with all submodules: git clone --recurse-submodules <url> Init specific submodule: git submodule update --init repos/tier1/hypercore ## Statistics - Total repos analyzed: 529 - Skills.md files: 529 - Deep analysis: 12 repos - Patterns detected: 8 types - Runtime detection: 49.5% success rate - Disk usage (with submodules): ~11MB Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
30a9b1ecd556cc56b447cbe19b7a1863ca62dd7d
by plankatron <fleeky@gmail.com> · 2026-01-16T23:29:36.000Z

Changed files (3) +110 -0

analyze_pear_docs.js +26 -0
……@@ -0,0 +1,26 @@
1const fs = require('fs');
2const path = require('path');
3
4const docsPath = './pear-docs/pear-docs-repo';
5const categories = {};
6
7// Extract all markdown files and their categories
8const walkDir = (dir, category = '') => {
9 const files = fs.readdirSync(dir);
10 files.forEach(file => {
11 const filePath = path.join(dir, file);
12 const stat = fs.statSync(filePath);
13 if (stat.isDirectory() && !file.startsWith('.')) {
14 walkDir(filePath, file);
15 } else if (file.endsWith('.md')) {
16 if (!categories[category || 'root']) {
17 categories[category || 'root'] = [];
18 }
19 categories[category || 'root'].push(file.replace('.md', ''));
20 }
21 });
22};
23
24walkDir(docsPath);
25
26console.log(JSON.stringify(categories, null, 2));
convert_to_submodules.sh +83 -0
……@@ -0,0 +1,83 @@
1#!/bin/bash
2
3# Convert cloned repos to git submodules
4
5echo "🔄 Converting cloned repos to git submodules..."
6echo ""
7
8# Tier 1 repos
9TIER1_REPOS=(
10 "autobase"
11 "hyperbee"
12 "hypercore"
13 "hyperdht"
14 "hyperdrive"
15 "hyperswarm"
16)
17
18# Tier 2 repos
19TIER2_REPOS=(
20 "compact-encoding"
21 "corestore"
22 "hyperswarm-secret-stream"
23 "localdrive"
24 "mirror-drive"
25 "protomux"
26)
27
28# Process Tier 1
29echo "📦 Processing Tier 1 (Building Blocks)..."
30for repo in "${TIER1_REPOS[@]}"; do
31 echo " Converting $repo..."
32
33 # Remove the cloned directory
34 rm -rf "repos/tier1/$repo"
35
36 # Add as submodule
37 git submodule add "https://github.com/holepunchto/$repo.git" "repos/tier1/$repo" 2>/dev/null
38
39 if [ $? -eq 0 ]; then
40 echo " ✓ $repo added as submodule"
41 else
42 echo " ⚠ $repo may already be a submodule or failed"
43 fi
44done
45
46echo ""
47echo "📦 Processing Tier 2 (Helpers)..."
48for repo in "${TIER2_REPOS[@]}"; do
49 echo " Converting $repo..."
50
51 # Remove the cloned directory
52 rm -rf "repos/tier2/$repo"
53
54 # Add as submodule
55 git submodule add "https://github.com/holepunchto/$repo.git" "repos/tier2/$repo" 2>/dev/null
56
57 if [ $? -eq 0 ]; then
58 echo " ✓ $repo added as submodule"
59 else
60 echo " ⚠ $repo may already be a submodule or failed"
61 fi
62done
63
64echo ""
65echo "📦 Processing pear-docs..."
66# Also convert pear-docs/pear-docs-repo to a submodule at pear-docs/
67rm -rf pear-docs/pear-docs-repo
68if [ ! -d "pear-docs/.git" ]; then
69 git submodule add "https://github.com/holepunchto/pear-docs.git" "pear-docs" 2>/dev/null
70 if [ $? -eq 0 ]; then
71 echo " ✓ pear-docs added as submodule"
72 else
73 echo " ⚠ pear-docs may already be a submodule or failed"
74 fi
75else
76 echo " ✓ pear-docs already a submodule"
77fi
78
79echo ""
80echo "✅ Conversion complete!"
81echo ""
82echo "📋 Summary:"
83git submodule status
pear-docs +1 -0
……@@ -0,0 +1 @@
1Subproject commit facdea8fcb4031a75be363619b18b3360afa6a61