ComputeBNB/GPUbnb is a hackathon marketplace for routing lightweight AI and batch jobs onto spare provider machines.
The project now has one clear web story:
- the stylized marketplace web app is the main product surface
- the Mongo-backed backend is the source of truth for machines, jobs, payouts, and event history
- the desktop/Tauri provider runtime and Docker sandbox runner are wired in as provider-side execution surfaces
This repo intentionally does not try to claim production-grade sandboxing, decentralized verification, or a global GPU cloud. It focuses on a truthful, legible marketplace loop:
submit text job
-> consumer chooses a machine
-> backend creates queued job pinned to that machine
-> machine polls its own queue, starts, and reports progress
-> backend records stdout, stderr, exit code, payout, fee, and events
-> stylized web dashboard reflects the result
- Stylized landing page and marketplace-themed dashboard
- Backend-driven marketplace dashboard at
/dashboard - Backend-driven providers view at
/providers - Backend-driven jobs board at
/jobs - Styled job submission flow at
/jobs/new - Styled results/ledger view at
/jobs/[id]/results - Temporary frontend-only demo session shortcut with
Ctrl+K
- Mongo/Mongoose models for machines, jobs, job events, and ledger entries
- Machine inventory plus provider-compatible registration and heartbeat APIs
- Job creation and lookup APIs
- Machine poll/start/progress/complete/fail APIs
- Runtime-based pricing with budget cap
- 80/20 machine payout / platform fee split
- Basic trust signals:
- machine completed jobs
- machine failed jobs
- machine success rate
- last heartbeat
- raw stdout / stderr / exit code
- job runtime
- event timeline
- Mocked bearer tokens preserved for worker heartbeat, poll, start, progress, complete, and fail routes
- Tauri desktop shell for provider controls and runtime status
- Node worker CLI for provider registration, heartbeat, polling, and mocked execution
worker-runnerDocker sandbox service for approved demo workloads- Sandbox runner controls exposed through the Tauri command layer
This pass is intentionally limited to:
- text-first inputs and outputs, plus approved Docker demo workloads
- consumer-selected machines with no backend scheduler
- backend truth for marketplace pages
- lightweight provider token auth for worker routes
Out of scope for now:
- real user auth
- production user authentication and authorization
- object/file storage
- heavy artifact processing
- hostile-code sandboxing guarantees
- production infra hardening
app/: Next.js App Router pages and API routesapp/_components/: stylized marketplace UI primitives and shell componentslib/models/: Mongo/Mongoose schemaslib/marketplace.ts: shared formatting and dashboard/machine/job query helperslib/scheduling.ts: compatibility helpers for machine polling and stale-heartbeat cleanupsrc/: provider desktop UI components, hooks, reducers, and Tauri clientssrc-tauri/: Tauri v2 provider desktop shell and worker managerworker/: lightweight CLI worker used for the current execution loopworker-runner/: Docker sandbox execution service
Create .env.local from .env.example.
Important values:
MONGODB_URI=...
MONGODB_DB_NAME=gpubnb
GPUBNB_API_URL=http://localhost:3000
GPUBNB_PROVIDER_ID=
GPUBNB_PROVIDER_TOKEN=
COMPUTEBNB_MASTER_WALLET_SECRET_KEY=
COMPUTEBNB_CONSUMER_DEMO_TARGET_SOL=1The app now builds cleanly even when Mongo is not configured, but backend-powered marketplace pages and APIs will show database-unavailable behavior until MONGODB_URI is set.
Install dependencies:
npm installRun the web app:
npm run devThis starts the main consumer web app and backend on http://localhost:3000.
Run the Tauri desktop app:
npm run tauriIn development, Tauri serves its embedded webview from http://localhost:3001, while its worker/API calls target the main app on http://localhost:3000.
Optional: run the lightweight worker loop in another terminal:
npm run workerOptional: run the Tauri provider app:
npm run tauriOptional: run the Docker sandbox runner from worker-runner/:
npm install
cp .env.example .env
docker build -t computebnb/python-runner:local samples/images/python-runner
npm run devThe runner listens on http://localhost:4317. See worker-runner/README.md for endpoint and payload examples.
Create a devnet master wallet and save it to .env.local:
npm run solana:master:create -- --write-envThe script prints the wallet address and secret key, then requests a devnet airdrop. Set COMPUTEBNB_MASTER_AIRDROP_SOL to change the airdrop amount; it defaults to 5.
Top up every consumer wallet to the demo target balance:
npm run solana:consumers:fundSet COMPUTEBNB_CONSUMER_DEMO_TARGET_SOL to control the target balance per consumer wallet; it defaults to 1. The script skips wallets that already have at least the target balance and prints each transfer signature.
- Start the web app.
- Register or heartbeat at least one machine through the Tauri or worker flow.
- Open
/dashboardto show live marketplace summary. - Submit a Python job pinned to a machine.
- Let that machine pick it up and complete it.
- Open
/jobs/[id]/resultsto show:- selected machine
- raw stdout / stderr / exit code
- runtime
- final job cost
- machine payout
- platform fee
- event trail
npm run lintnpm run build
Both should pass before demoing.