Project Info
The inspiration for Shard came from observing two key problems in the modern computing landscape: Wasted Computing Power: Millions of high-performance Macs sit idle for hours each day, their powerful Apple Silicon chips underutilized while consuming electricity. Wasted Computing Power: Millions of high-performance Macs sit idle for hours each day, their powerful Apple Silicon chips underutilized while consuming electricity. Centralized AI Infrastructure: Running AI inference and compute-intensive tasks typically requires expensive cloud infrastructure or centralized services, creating bottlenecks and single points of failure. Centralized AI Infrastructure: Running AI inference and compute-intensive tasks typically requires expensive cloud infrastructure or centralized services, creating bottlenecks and single points of failure. I asked myself: What if I could create a decentralized marketplace where anyone could contribute their idle computing power and earn cryptocurrency, while others could access distributed compute resources at a fraction of traditional cloud costs? The name "Shard" reflects the core innovation—breaking large computational jobs into tiny micro-task fragments that can be processed independently across a distributed network, similar to how blockchain shards distribute data and computation. Shard is a decentralized compute network built on the Sui blockchain that transforms idle Mac computers into a distributed supercomputer. Here's how it works: For Job Submitters (via Web Interface) Submit Computational Tasks: Upload a CSV file with 100 sentences for AI content moderation or provide parameters for Monte Carlo simulations Automatic Fragmentation: The system breaks your job into tiny independent fragments (1 sentence per fragment) Privacy-First Encryption: Each fragment is encrypted using Sui Seal threshold encryption Decentralized Storage: Encrypted data is stored on Sui Walrus (decentralized blob storage) On-Chain Job Posting: The job and all fragments are published to the Sui blockchain with USDC bounties (0.01 USDC per fragment) Real-Time Progress: Watch as workers around the world claim and process your fragments Automatic Result Aggregation: Get your completed results delivered in the original order For Computing Providers (via macOS App) Beautiful System Monitor: Track CPU, GPU, and memory usage in a Robinhood-like interface One-Click Worker: Click "Start Worker" to begin earning USDC AI-Powered Chat: Built-in Gemma 3-4B chatbot for local AI assistance Auto-Discovery: The app polls the blockchain for available work Secure Processing: Downloads encrypted fragments, decrypts locally using Seal Local AI Inference: Runs Gemma AI model to classify content (safe/unsafe) Upload Results: Encrypts and uploads results to Walrus, submits completion on-chain Instant Payment: Receives 0.01 USDC per completed fragment (sponsored transaction—zero gas fees) Multi-Worker Support: Spawn multiple worker windows to process tasks in parallel Key Features Zero Gas Fees for Workers: All transactions are sponsored by job creators Privacy-Preserving: Workers never see raw sensitive data—only encrypted fragments Fault-Tolerant: Uncompleted fragments are automatically re-queued Native Performance: Leverages Apple Silicon's Metal acceleration for AI inference Real-Time Transparency: Both submitters and workers see live progress updates I built Shard solo over 15 hours during the hackathon, integrating cutting-edge blockchain technologies with native macOS development. Tech Stack Frontend (Next.js 14 + React + TypeScript) UI Framework: shadcn/ui components with Tailwind CSS for a minimalist, dark-mode-first design Animations: Framer Motion for smooth transitions and progress indicators Real-Time Updates: Polling-based live fragment status tracking Features: Job submission portal, AI inference configuration, Monte Carlo simulation setup Backend (Node.js + Express + TypeScript) API Server: RESTful endpoints for job management, fragment lifecycle, and wallet queries Sui Integration: @mysten/sui SDK for blockchain interactions and USDC transfers Walrus Client: Custom implementation for uploading/downloading encrypted blobs Seal Encryption: @mysten/seal SDK for threshold encryption with session keys Job Orchestration: Automatic fragmentation, encryption, and on-chain publishing macOS App (SwiftUI + Combine) System Monitoring: Real-time CPU/GPU/Memory tracking using IOKit and Mach APIs AI Integration: Embedded llama.cpp server running Gemma 3-4B-it-q4_0.gguf model Metal Acceleration: Native Apple Silicon GPU support for AI inference Worker Engine: Multi-threaded fragment discovery, claiming, processing, and completion Multi-Window Architecture: Spawn independent worker windows for parallel processing Live Dashboard: Beautiful glassmorphic UI with animated charts (inspired by Apple's design language) Blockchain (Sui + Move) Sui Network: Testnet deployment for job and fragment state management Smart Contracts: Move modules for access control policies (Seal) Walrus Storage: Decentralized blob storage with erasure coding Seal Encryption: Threshold encryption with programmable access control Sponsored Transactions: Job creators pay all gas fees for workers Development Highlights 1. Micro-Task Fragment Protocol I designed a novel fragmentation system where each sentence becomes an independent TaskFragment with: Unique fragment ID and job ID Encrypted data blob stored on Walrus USDC bounty (0.01 per fragment) Status lifecycle: pending → claimed → completed 2. Sui Seal Integration I implemented end-to-end encryption using Seal's threshold encryption: Generated session keys with TTL for time-limited access Created Move access policy contracts (seal_approve) Encrypted fragments using AES256GCM Workers decrypt using session keys without exposing raw data 3. llama.cpp Embedding I bundled the Gemma AI model and llama-server binary directly into the macOS app: Built static llama-server to avoid dynamic library issues Spawned server as subprocess with Metal GPU acceleration Implemented streaming HTTP client for real-time inference Created beautiful chat UI with gradient avatars and suggestion chips 4. Multi-Worker Architecture I built a sophisticated worker management system: @Environment(\.openWindow) for spawning new worker windows Shared WorkerService instances with independent worker IDs Competitive claiming (first worker to claim gets the fragment) Real-time USDC balance tracking across all workers 5. Production Deployment Frontend: Deployed to Vercel (https://shard-alpha.vercel.app) Backend: Deployed to Vercel with Cloudflare Tunnel for local testing CORS: Dynamic subdomain support for *.trycloudflare.com Config Management: Centralized API URLs for easy environment switching Blockchain & Cryptography Sui Blockchain: I dove deep into the Sui ecosystem, learning about Move smart contracts, sponsored transactions, and how to structure on-chain state for a compute marketplace. Sui Walrus: I implemented decentralized storage for both job inputs and results, learning how erasure coding provides redundancy without centralized servers. Sui Seal: I mastered threshold encryption and programmable access control, enabling workers to decrypt job data without ever exposing it to centralized parties. BCS Encoding: I learned about Sui's Binary Canonical Serialization for efficient data encoding. Native macOS Development I built a production-grade SwiftUI application with real-time system monitoring (CPU, GPU, Memory). I integrated llama.cpp and Gemma 3-4B for local AI inference using Apple Silicon's Metal acceleration. I learned advanced Swift concepts: Combine framework, @Published properties, URLSession streaming, and multi-window architecture. I mastered IOKit for low-level hardware metrics and Mach APIs for system-level monitoring. Distributed Systems Design I implemented a micro-task fragment protocol where jobs are broken into independent units that can be processed in parallel. I designed fault-tolerant execution with fragment re-queuing if workers go offline. I built a polling-based worker discovery system that scales to multiple simultaneous workers. I learned about eventual consistency and how to handle race conditions in distributed claiming. Full-Stack Integration I connected React/Next.js frontend → Express.js backend → Sui blockchain → macOS worker app in a seamless end-to-end flow. I implemented real-time progress tracking with polling-based live fragment status updates. I managed CORS, API design, environment configuration, and production deployment. I debugged complex multi-component issues (e.g., USDC transfers, fragment completion, UI state synchronization). Performance Optimization I optimized SwiftUI rendering by removing continuous animations and using .drawingGroup() for Metal acceleration. I reduced CPU usage from 50% to <5% by simplifying chart rendering and using efficient update intervals. I implemented smart batching for blockchain queries to minimize network overhead. Short-Term (Next 3 Months) Mainnet Launch: Deploy to Sui mainnet with real USDC incentives More Task Types: Support image processing, video transcoding, and scientific simulations Advanced Reputation System: Track worker reliability and completion rates with on-chain NFTs Mobile Support: Build iOS/Android worker apps to expand the provider network Job Verification: Implement cryptographic proofs of correct computation Long-Term Vision Cross-Chain Support: Integrate with Ethereum, Solana, and other L1s for broader adoption Specialized Hardware: Support GPU-intensive tasks (3D rendering, AI training) with CUDA/ROCm Enterprise Partnerships: Offer B2B solutions for companies needing distributed compute DAO Governance: Community-driven protocol upgrades and fee structures Carbon Credits: Reward providers for using renewable energy sources Technical Improvements WebSocket Real-Time Updates: Replace polling with push notifications for instant updates Smart Contract Upgrades: On-chain fragment verification and slashing for malicious workers Result Validation: Implement consensus mechanisms (multiple workers verify the same fragment) Benchmarking System: Automatically test worker capabilities and assign appropriate tasks Dynamic Pricing: Market-driven bounty pricing based on task complexity and demand Shard demonstrates that it's possible to build a fully functional decentralized compute network in a single weekend. By leveraging Sui's innovative blockchain architecture, Walrus's decentralized storage, and Seal's privacy-preserving encryption, I created a platform that turns idle Macs into a global supercomputer—while ensuring privacy, fault tolerance, and instant micropayments. This is just the beginning. The future of computing is decentralized, and Shard is proof that we can build it today.
This repository has no readme, or GitHub could not be reached.
Analysis
View
Metric
- 13
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- JavaScriptIn code
- Next.jsIn code
- ReactIn code
- SwiftIn code
- Tailwind CSSIn code
- TypeScriptIn code
8 of 8 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
251 KB
Source files
43
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
atharvalade/Shard
65 files · 514 KB · @ d7f50b4
Structure
Interface
19 files · 29%Screens, components and styles rendered to the user.
Application logic
28 files · 43%Domain rules, services and shared utilities.
Background jobs
1 file · 2%Work run outside a request: tasks, workers and schedules.
Data & schema
1 file · 2%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript49%
- Swift45%
- Markdown5%
- CSS1%
- JavaScript0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
Shard-Frontend/package.json
npm · 18- class-variance-authority
- clsx
- framer-motion
- lucide-react
- next
- react
- react-dom
- tailwind-merge
- tailwindcss-animate
- +9 more
Shard-Backend/package.json
npm · 17- @mysten/bcs
- @mysten/seal
- @mysten/sui
- @types/multer
- axios
- cors
- dotenv
- express
- form-data
- multer
- uuid
- +6 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
Built-in Gemma 3-4B chatbot / local AI inference via llama.cppVerified
Embedded llama.cpp server running Gemma 3-4B-it-q4_0.gguf with Metal acceleration
Claimed on Devposthigh confidenceShard/Shard/Services/LlamaServerManager.swift:18— Spawns bundled llama-server binary with gemma-3-4b-it-q4_0.gguf model and --n-gpu-layers 99Shard/Shard/Services/ChatService.swift:21— Streams chat completions from local llama-server at 127.0.0.1:8080
Competitive fragment claiming (first worker to claim gets it)Verified
Competitive claiming - first worker to claim gets the fragment
Claimed on Devpostmedium confidenceShard-Backend/src/server.ts:207— POST /fragments/:id/claim removes the fragment from the available pool on first claim, returning 404 for subsequent claim attempts
CORS support for dynamic *.trycloudflare.com subdomainsVerified
CORS: Dynamic subdomain support for *.trycloudflare.com
Claimed on Devposthigh confidenceShard-Backend/src/server.ts:22— CORS origin callback explicitly allows any origin ending in .trycloudflare.com
Frontend built with Next.js 14 + shadcn/ui + Tailwind + Framer MotionVerified
Frontend (Next.js 14 + React + TypeScript), shadcn/ui, Tailwind CSS, Framer Motion
Claimed on Devposthigh confidenceShard-Frontend/package.json:16— next ^14.2.0 and framer-motion ^11.0.0 declared as dependenciesShard-Frontend/components/ui/button.tsx:1— shadcn/ui-style component files present under components/uiShard-Frontend/tailwind.config.ts:1— Tailwind config present
Job submission via web interface (CSV/text upload, fragmentation into per-sentence tasks)Verified
Submit a CSV of sentences or text; system fragments into 1-sentence-per-fragment tasks
Claimed on Devposthigh confidenceShard-Frontend/app/submit/page.tsx:113— Parses uploaded CSV into per-line text items and POSTs to /api/jobsShard-Backend/src/fragmentation/fragmenter.ts:26— fragmentJSON creates one TaskFragment per data itemShard-Backend/src/server.ts:97— POST /api/jobs endpoint wires fragmentation, upload, and job storage
Local AI content classification (safe/unsafe) used to complete fragmentsVerified
Local AI inference runs Gemma model to classify content as safe/unsafe
Claimed on Devposthigh confidenceShard/Shard/Services/WorkerService.swift:325— processFragment sends classification prompt to chatService and parses safe/unsafe from the response before completing the fragment
macOS system monitor (CPU/GPU/Memory)Verified
Beautiful system monitor tracking CPU, GPU, and memory usage using IOKit and Mach APIs
Claimed on Devposthigh confidenceShard/Shard/Models/SystemMonitor.swift:57— updateCPU uses host_statistics/Mach APIs; updateGPU uses IOKit IOAccelerator; updateMemory uses host_statistics64
Move access-control smart contract for Seal (seal_approve)Verified
Created Move access policy contracts (seal_approve)
Claimed on Devposthigh confidenceShard-Backend/move/sources/public_access.move:9— seal_approve function implemented as a public-access policy, and referenced by seal.ts's moveCall targetShard-Backend/src/encryption/seal.ts:163— decrypt() builds a moveCall to packageId::public_access::seal_approve for the Seal session-key flow
Multi-worker architecture (spawn independent worker windows)Verified
Multi-Window Architecture: Spawn independent worker windows to process tasks in parallel
Claimed on Devposthigh confidenceShard/Shard/ShardApp.swift:20— Defines a separate WindowGroup(id: "worker") scene for spawning worker windowsShard/Shard/Views/JobsView.swift:104— openWindow(id: "worker", ...) is called to spawn new worker windows, each with a distinct workerId
One-click worker start earning USDCVerified
Click Start Worker to begin earning USDC
Claimed on Devposthigh confidenceShard/Shard/Services/WorkerService.swift:79— startWorker() begins polling for fragments, auto-claims, and processes them
Auto-discovery / polling for available workCode-supported
The app polls the blockchain for available work
Claimed on Devpostmedium confidenceShard/Shard/Services/WorkerService.swift:85— Worker polls a REST endpoint (apiBaseURL/fragments/available) every 5s, not the blockchain directly; fragment/job state lives in the backend's in-memory store, not on-chain
Encrypted fragment storage on Sui WalrusCode-supported
Encrypted data is stored on Sui Walrus (decentralized blob storage)
Claimed on Devpostmedium confidenceShard-Backend/src/storage/walrus.ts:22— Real HTTP PUT to Walrus publisher/aggregator implementing upload/downloadShard-Backend/src/server.ts:123— Fragment data is uploaded to Walrus via walrusClient.upload, but the data uploaded is the raw plaintext fragment, not Seal-encrypted output (see encryption finding below)
Frontend + backend deployed to Vercel / tunneled via CloudflareCode-supported
Frontend deployed to Vercel (shard-alpha.vercel.app); backend via Cloudflare Tunnel
Claimed on Devpostmedium confidenceShard-Frontend/lib/config.ts:6— API_BASE_URL is hardcoded to a trycloudflare.com tunnel URL, consistent with the claimed Cloudflare Tunnel backend, but no deployment config/CI in this clone confirms actual Vercel deployment
Monte Carlo simulation job typeCode-supported
Provide parameters for Monte Carlo simulations as a job type
Claimed on Devpostmedium confidenceShard-Backend/src/server.ts:105— 'monte-carlo-simulation' is accepted as a valid jobType string in job validationShard-Backend/src/fragmentation/fragmenter.ts:81— validateFragmentData has a monte-carlo-simulation case checking trials/parameters fieldsShard-Frontend/app/submit/page.tsx:712— The submission UI's Tabs only render a single 'AI Moderation' tab; there is no Monte Carlo submission form or worker-side simulation execution code found anywhere
On-chain job/fragment posting to Sui blockchainCode-supported
The job and all fragments are published to the Sui blockchain with USDC bounties
Claimed on Devposthigh confidenceShard-Backend/move/sources/shard_jobs.move:92— Move module defines create_job/create_fragment/claim_fragment/complete_fragment on-chain logicShard-Backend/src/server.ts:53— Backend actually stores jobs/fragments in an in-memory Map, not on-chain; no moveCall to the shard_jobs module was found anywhere in the backend source
Sui Seal threshold encryption of fragmentsCode-supported
Each fragment is encrypted using Sui Seal threshold encryption before storage
Claimed on Devposthigh confidenceShard-Backend/src/encryption/seal.ts:34— Full ShardSealClient implementing Seal encrypt/decrypt with SessionKey and testnet KeyServersShard-Backend/src/server.ts:132— Job creation endpoint never calls the Seal client; it only generates a placeholder encryptionId string ('in production, this would be from Seal'), so encryption is not actually applied to fragment data end-to-endShard-Backend/src/test-seal.ts:1— Seal encryption is only exercised in a standalone test script, not the production job flow
USDC bounty payment to workers on fragment completionCode-supported
Instant payment of 0.01 USDC per completed fragment via sponsored (zero gas) transaction
Claimed on Devpostmedium confidenceShard-Backend/src/server.ts:276— On fragment completion, backend calls suiClient.transferUSDC to pay the bounty from Wallet A to Wallet BShard-Backend/src/blockchain/sui-client.ts:99— transferUSDC supports an optional gasSponsor param, but server.ts calls it without gasSponsor, so it is a plain wallet-to-wallet transfer, not a demonstrated sponsored transaction; also payment always goes to Wallet B, never to the actual worker's own address
$10/day passive side-income from idle Mac computeClaimed only
Potentially earning at least $10/day side income by contributing idle laptop compute
Claimed on Devposthigh confidenceFault-tolerant re-queueing of uncompleted fragmentsClaimed only
Uncompleted fragments are automatically re-queued
Claimed on Devpostmedium confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.