K2 Network Logo

K2 Network

K2 Network is a decentralized peer-to-peer marketplace that connects buyers and sellers directly, without intermediaries. Powered by AI agents for intent classification and built on the Iroh P2P protocol, K2 enables secure, private, and censorship-resistant commerce across desktop and mobile platforms.

Key Features

AI-Powered Marketplace

Intent classification via Tambo AI and Groq LLM APIs automatically matches buyer requests with relevant seller offerings.

P2P Communication

Direct messaging between peers using the Iroh Gossip protocol. No central servers required.

Contact Management

P2P-synchronized contact book powered by iroh-docs. Your contacts follow you across devices.

File Sharing

Send and receive files directly via iroh-blobs with QR code sharing and ticket-based downloads.

Topic-Based Discovery

Join topics to find relevant buyers and sellers. Tracker-based peer discovery ensures you connect to the right network.

Cross-Platform

Native applications for Windows, macOS, Linux, and Android built with Tauri 2.

Folder Sync

Syncthing-style folder synchronization powered by iroh-docs. Keep files in sync across all your devices.

Decentralized Identity

Cryptographic identity with OS secure store integration (Windows) and encrypted backup keys.

Tech Stack

LayerTechnologiesVersion
FrontendReact, TypeScript, Tailwind CSS, shadcn/uiReact 19.2.3
Desktop / MobileTauri 2, RustTauri 2.x
P2P NetworkIroh (gossip, blobs, docs)iroh 1.0.0
AITambo AI, Groq API-
Build ToolVite6.0.3

Workspace Structure

k2/
├── k2-core/              # Rust P2P library (Iroh, gossip, blobs, docs)
│   └── src/
│       ├── lib.rs        # Main K2Node implementation
│       ├── identity.rs   # Secret key management
│       ├── docs.rs       # iroh-docs wrapper
│       ├── blobs.rs      # iroh-blobs file sharing
│       ├── profile.rs    # User profile storage
│       └── sync.rs       # Folder synchronization

├── k2-app-tauri/         # Tauri 2 + React 19 frontend
│   ├── src-tauri/
│   │   └── src/
│   │       └── lib.rs    # 36 Tauri commands
│   ├── src/              # React frontend source
│   └── package.json

└── k2-docs/              # This documentation site

Quick Start

Prerequisites

  • Rust (latest stable) - Install via rustup
  • Node.js 18+ and npm
  • Tauri CLI - cargo install tauri-cli

Clone and Run

git clone https://github.com/k2-network/k2-network.git
cd k2-app-tauri
npm install
npm run tauri dev

Configure Environment

Create a .env file in k2-app-tauri/:
VITE_GROQ_API_KEY=your_groq_api_key
VITE_GROQ_BASE_URL=https://api.groq.com/openai/v1
VITE_GROQ_SMALL_MODEL=llama-3.3-70b-versatile
VITE_TAMBO_API_KEY=your_tambo_api_key
You will need API keys from Groq and Tambo AI for full marketplace functionality.

Architecture Overview

K2 is built as a Rust workspace with two main crates:
  1. k2-core - The P2P networking library that wraps Iroh protocols (Endpoint, Gossip, Blobs, Docs) with high-level APIs for contacts, chat, file sharing, marketplace, and sync.
  2. k2-app-tauri - The cross-platform frontend application exposing 36 Tauri commands that bridge the React UI to the Rust P2P core.
Read more about the system architecture in the Architecture section.

Next Steps

Architecture

Deep dive into K2’s system design, data flows, and network topology.

Development

Set up your development environment, run tests, and understand the build process.

CLI Commands

Reference for all 36 Tauri commands organized by category.

Deployment

Build Windows installers, Android APKs, and release processes.