Repository: https://github.com/vespo92/ChicagoForest.net
This is an AI-generated theoretical framework for educational and research purposes.
This repository contains:
- P2P Wireless Mesh Packages - TypeScript packages for building decentralized wireless networks
- Theoretical Energy Framework - Conceptual documentation inspired by Tesla's research
None of this is operational infrastructure. It's a vision of what community-owned networks could look like.
This is a Turborepo monorepo containing multiple packages for building the Chicago Forest P2P network.
chicago-forest-network/
βββ apps/
β βββ web/ # Next.js documentation website
βββ packages/
β β
β β === MYCELIUM ECOSYSTEM (NEW) ===
β βββ mycelium-core/ # π Neural network substrate - hyphal pathways, signal propagation
β βββ spore-propagation/ # π± Network growth - bootstrap, distribution, germination
β βββ nutrient-exchange/ # π Resource sharing - bandwidth, storage, compute credits
β βββ symbiosis/ # π€ Inter-forest federation - gateways, bridges
β βββ hive-mind/ # π§ Collective governance - consensus, proposals, voting
β βββ forest-registry/ # π Global discovery - decentralized DNS for forests
β βββ canopy-api/ # πΏ Public API - REST, WebSocket, SDK
β β
β β === FOUNDATION LAYER ===
β βββ p2p-core/ # Core P2P networking primitives
β βββ routing/ # Unified routing layer
β βββ wireless-mesh/ # WiFi Direct, ad-hoc, mesh routing
β βββ sdwan-bridge/ # SD-WAN virtual bridge & tunneling
β βββ firewall/ # Chicago Forest Firewall (CFW)
β βββ node-deploy/ # Docker/K8s/VM deployment configs
β βββ ipv7-adapter/ # IPV7 protocol integration
β βββ anon-routing/ # Anonymous onion routing
β βββ hardware-hal/ # Hardware abstraction (radios, antennas)
β βββ cli/ # Command-line interface
β βββ shared-types/ # Shared TypeScript types
βββ turbo.json # Turborepo configuration
βββ pnpm-workspace.yaml # Workspace configuration
The Chicago Forest Network is evolving from a branch architecture to a mycelium network - a self-organizing, resilient global ecosystem like the fungal networks that connect trees underground.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MYCELIUM ECOSYSTEM β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β CANOPY LAYER @chicago-forest/canopy-api β
β External API, SDKs, Documentation β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GOVERNANCE LAYER β
β hive-mind (Consensus) | forest-registry (DNS) | symbiosis (Federation) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RESOURCE LAYER β
β nutrient-exchange (Credits) | spore-propagation (Growth) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MYCELIUM CORE @chicago-forest/mycelium-core β
β Hyphal Networks | Signal Propagation | Emergent Topology β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FOUNDATION LAYER β
β p2p-core | routing | mesh | firewall | sdwan | anon-routing | hardware β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
See MYCELIUM_ECOSYSTEM.md for the complete vision.
This project supports parallel development through 10 specialized AI agents, each with exclusive file ownership to enable conflict-free collaboration.
| Agent | Codename | Domain | Focus Area |
|---|---|---|---|
| 1 | Mycelia | Neural Network Core | Hyphal pathways, signal propagation |
| 2 | Rhizome | Network Propagation | Bootstrap, growth, self-healing |
| 3 | Symbiont | Federation | Cross-network bridges |
| 4 | Sentinel | Security | Anonymous routing, privacy |
| 5 | Archivist | Research | Historical documentation |
| 6 | Beacon | Hardware | Deployment, infrastructure |
| 7 | Nexus | API/SDK | Developer tools |
| 8 | Delegate | Governance | Voting, proposals |
| 9 | Weaver | Testing | Quality assurance |
| 10 | Oracle | Documentation | UX, web portal |
Integration with companion repositories:
- NPCPU - Cognitive AI agent framework
- ConstitutionalShrinkage - Decentralized governance
See AGENTS_DEPLOYMENT.md for detailed agent specifications and ECOSYSTEM_ANALYSIS.md for integration architecture.
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run development mode
pnpm dev
# Run the CLI
pnpm --filter @chicago-forest/cli build
npx forest --helpCore P2P networking primitives including:
- Node Identity: Ed25519 keypairs, peer ID derivation
- Peer Discovery: Kademlia DHT for decentralized discovery
- Connection Manager: Peer connection lifecycle and messaging
- Event System: Type-safe network event handling
import { createNodeIdentity, KademliaDHT, ConnectionManager } from '@chicago-forest/p2p-core';
const identity = await createNodeIdentity();
const dht = new KademliaDHT(identity.nodeId);Wireless mesh networking layer:
- WiFi Direct: P2P connections without infrastructure
- Ad-hoc Mode: Decentralized wireless networks
- Mesh Routing: BATMAN-adv, OLSR, Babel protocol support
- Link Quality: Signal monitoring and neighbor discovery
import { WirelessMeshManager } from '@chicago-forest/wireless-mesh';
const mesh = new WirelessMeshManager({
protocol: 'batman-adv',
interface: 'wlan0',
channel: 6,
});
await mesh.start();SD-WAN virtual bridge for the UNAbridged network:
- WireGuard Tunnels: Encrypted point-to-point connections
- VXLAN Overlay: Virtual network segments
- Traffic Classification: Application-aware routing
- Path Selection: Latency, bandwidth, cost-based policies
import { SDWANBridge } from '@chicago-forest/sdwan-bridge';
const bridge = new SDWANBridge({
nodeIdentity: myIdentity,
forestInterface: 'eth1',
pathSelection: 'lowest-latency',
});Chicago Forest Firewall (CFW):
- Two-Port Configuration: WAN + FOREST interfaces
- Rule DSL: Fluent API for firewall rules
- OPNsense Export: Generate OPNsense-compatible configs
- nftables/iptables: Native Linux firewall support
import { ChicagoForestFirewall, RuleBuilder, generateOPNsenseConfig } from '@chicago-forest/firewall';
const firewall = new ChicagoForestFirewall();
firewall.addRule(
RuleBuilder.create('allow-forest')
.name('Allow Forest Traffic')
.fromZone('forest')
.allow()
.build()
);Deployment configurations:
- Docker: docker-compose for containerized nodes
- Kubernetes: Deployments with NIC passthrough, SR-IOV
- VMs: cloud-init for OPNsense/custom VMs
- Helm Charts: Kubernetes package manager support
import { generateDockerCompose, generateKubernetesManifest } from '@chicago-forest/node-deploy';
const compose = generateDockerCompose({
nodeName: 'forest-node-1',
forestInterface: 'eth1',
enableFirewall: true,
});Anonymous routing layer:
- Onion Routing: Multi-hop encrypted circuits
- Hidden Services: Anonymous hosting (like .onion)
- Traffic Padding: Timing attack resistance
- Circuit Building: Tor-inspired path selection
Hardware Abstraction Layer:
- WiFi Adapters: 2.4GHz, 5GHz, 6GHz support
- LoRa Radios: Long-range mesh (SX1262/SX1276)
- 60GHz Backhaul: High-speed point-to-point
- DIY Equipment: Support for custom radios
Command-line interface:
forest init # Initialize a new node
forest start # Start the node
forest status # Show node status
forest peers # List connected peers
forest mesh --neighbors # Show mesh neighbors
forest tunnel --create # Create SD-WAN tunnel
forest firewall --rules # List firewall rules
forest deploy --docker # Generate Docker configβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CHICAGO FOREST NETWORK STACK β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β USER DEPLOYMENT (Docker / Kubernetes / VM / Bare Metal) β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β @chicago-forest/cli β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ β
β β @chicago-forest/node-deploy β β
β βββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ€
β SECURITY LAYER β β
β βββββββββββββββββββββββ ββββββββ΄βββββββββββββββββββββββββββββββ β
β β @chicago-forest/ β β @chicago-forest/anon-routing β β
β β firewall ββββββ Onion/Anonymous Routing β β
β βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β NETWORK LAYER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β @chicago-forest/sdwan-bridge β β
β β SD-WAN Overlay | Virtual Tunnels | Traffic Engineering β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ β
β β @chicago-forest/ β β @chicago-forest/p2p-core β β
β β ipv7-adapter ββββββ Node Identity | Peer Discovery β β
β βββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β TRANSPORT LAYER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β @chicago-forest/wireless-mesh β β
β β WiFi Direct | Ad-hoc | Mesh Routing (BATMAN/OLSR) β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β PHYSICAL LAYER β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β @chicago-forest/hardware-hal β β
β β Custom Radios | UISP Equipment | LoRa | DIY Antennas β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Node.js 18+
- pnpm 9.0+
- TypeScript 5+
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Build specific package
pnpm --filter @chicago-forest/p2p-core build
# Run tests
pnpm test
# Type checking
pnpm typecheckEach package follows the same structure:
packages/[name]/
βββ src/
β βββ index.ts # Main entry point
βββ package.json # Package configuration
βββ tsconfig.json # TypeScript config
βββ tsup.config.ts # Build configuration (optional)
# Generate docker-compose
forest deploy --target docker --output docker-compose.yml
# Run
docker-compose up -d# Generate K8s manifests
forest deploy --target kubernetes --output forest-node.yaml
# Apply
kubectl apply -f forest-node.yamlUsers connect with:
- Port 1 (WAN): Traditional internet (optional)
- Port 2 (FOREST): Chicago Forest Network
Supports:
- OPNsense
- pfSense
- Custom Chicago Forest Firewall
- VMs with NIC passthrough
- Docker with host networking
- Kubernetes with Multus CNI
- Mycelium Ecosystem - NEW The global network vision
- Implementation Plan - Full architecture and task breakdown
- Mesh Network Spec - Technical mesh networking details
- Protocol Whitepaper - Theoretical protocol specification
- Project Guidelines - Development principles
This project is inspired by real community mesh networks:
| Network | Location | Nodes | Status |
|---|---|---|---|
| NYC Mesh | New York | 1,000+ | Active |
| Freifunk | Germany | 40,000+ | Active |
| Guifi.net | Spain | 37,000+ | Active |
| Toronto Mesh | Canada | 50+ | Active |
MIT License - See LICENSE
This is a theoretical framework and educational project.
- No working free energy devices exist in this codebase
- No operational P2P network is deployed
- All code is for research and educational purposes
- Sources are documented in BIBLIOGRAPHY.md
Together, we preserve historical research and envision what could be possible.
Chicago Forest Network - Energy Democracy for All π²