refactor: remove website directory - migrate to separate repository
Some checks failed
CLI Tests / test-cli (push) Failing after 3s
Cross-Node Transaction Testing / transaction-test (push) Successful in 2s
Deploy to Testnet / deploy-testnet (push) Successful in 1m14s
Integration Tests / test-service-integration (push) Successful in 1m24s
Multi-Node Stress Testing / stress-test (push) Successful in 2s
Python Tests / test-python (push) Failing after 33s
Security Scanning / security-scan (push) Successful in 36s

- Deleted website/ directory containing static site, docs, and dashboards
- Removed 16 HTML documentation pages (index, clients, miners, developers, API reference, etc.)
- Removed browser wallet redirect page and agent endpoints (.htaccess)
- Deleted nginx proxy config example and README
- Removed admin, client, and miner dashboard HTML files
- Cleaned up static assets (CSS, JS, SVG, fonts)
- Website content moved to dedicated repository for
This commit is contained in:
aitbc
2026-05-19 18:23:14 +02:00
parent 5b044696f6
commit ee22bba246
34 changed files with 3576 additions and 8504 deletions

3256
cli/aitbc_cli.legacy.py Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,47 @@
groups:
- name: chain_isolation_alerts
interval: 30s
rules:
# Alert on chain isolation violations
- alert: ChainIsolationViolationDetected
expr: chain_isolation_violations_total > 0
for: 0s
labels:
severity: critical
component: blockchain
annotations:
summary: "Chain isolation violation detected"
description: "Chain isolation violation of type {{ $labels.violation_type }} detected on node {{ $labels.node }}"
# Alert on cross-chain transaction attempts
- alert: CrossChainTransactionAttempt
expr: rate(cross_chain_transaction_attempts_total[5m]) > 0
for: 1m
labels:
severity: warning
component: blockchain
annotations:
summary: "Cross-chain transaction attempts detected"
description: "{{ $value }} cross-chain transaction attempts per second from {{ $labels.source_chain }} to {{ $labels.target_chain }} on node {{ $labels.node }}"
# Alert on chain_id validation failures
- alert: ChainIdValidationFailure
expr: rate(chain_id_validation_failures_total[5m]) > 0
for: 1m
labels:
severity: warning
component: blockchain
annotations:
summary: "Chain ID validation failures detected"
description: "{{ $value }} chain_id validation failures per second (expected: {{ $labels.expected_chain }}, actual: {{ $labels.actual_chain }}) on node {{ $labels.node }}"
# Alert on bridge request chain mismatches
- alert: BridgeRequestChainMismatch
expr: rate(bridge_request_chain_mismatches_total[5m]) > 0
for: 1m
labels:
severity: warning
component: coordinator-api
annotations:
summary: "Bridge request chain mismatches detected"
description: "{{ $value }} bridge request chain mismatches per second from {{ $labels.source_chain }} to {{ $labels.target_chain }} on node {{ $labels.node }}"

View File

@@ -1,59 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Browser Wallet - Redirecting...</title>
<script>
// Immediate redirect
window.location.replace('/docs/browser-wallet.html');
</script>
<noscript>
<meta http-equiv="refresh" content="0; url=/docs/browser-wallet.html">
</noscript>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
color: white;
}
.redirect-message {
text-align: center;
padding: 40px;
background: rgba(255, 255, 255, 0.1);
border-radius: 16px;
backdrop-filter: blur(10px);
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid rgba(255, 255, 255, 0.3);
border-top: 4px solid white;
border-radius: 50%;
animation: spin 1s linear infinite;
margin: 0 auto 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
a {
color: white;
text-decoration: underline;
}
</style>
</head>
<body>
<div class="redirect-message">
<div class="spinner"></div>
<h1>AITBC Browser Wallet</h1>
<p>Redirecting to the installation page...</p>
<p>If you're not redirected automatically, <a href="/docs/browser-wallet.html">click here</a>.</p>
</div>
</body>
</html>

View File

@@ -1,54 +0,0 @@
# AITBC Website
Production website for the AITBC platform.
## File Structure
```
website/
├── index.html # Homepage — platform overview & achievements
├── 404.html # Custom error page
├── aitbc-proxy.conf # Nginx reverse proxy configuration
├── favicon.svg
├── font-awesome-local.css
├── docs/ # All documentation (16 pages)
│ ├── index.html # Docs landing — search, reader-level cards
│ ├── clients.html # Client guide — jobs, wallet, pricing, API
│ ├── miners.html # Miner guide — GPU setup, earnings, Ollama
│ ├── developers.html # Developer guide — SDKs, contributing, bounties
│ ├── full-documentation.html # Complete technical reference
│ ├── components.html # Architecture & components overview
│ ├── flowchart.html # End-to-end system flow diagram
│ ├── api.html # REST API reference
│ ├── blockchain-node.html
│ ├── coordinator-api.html
│ ├── explorer-web.html
│ ├── marketplace-web.html
│ ├── wallet-daemon.html
│ ├── trade-exchange.html
│ ├── pool-hub.html
│ ├── browser-wallet.html # Redirect → /wallet/
│ ├── css/docs.css # Shared stylesheet
│ └── js/theme.js # Dark/light theme toggle
└── wallet/
└── index.html # Browser wallet landing page
```
## Deployment
Copy the website files to your web server's document root:
```bash
# Example using scp (replace with your server details)
scp -r website/* your-server:/var/www/html/
```
## Key Features
- **Unified header/nav** across all 15 doc pages with theme toggle
- **Live search** on docs index (client-side, 15-page index)
- **Shared CSS** — zero inline `<style>` blocks, one `docs.css`
- **Shared JS** — theme persistence via `theme.js`
- **Zero dead links** — all `href="#"` replaced with real targets
- **Font Awesome 6** consistently across all pages
- **Dark/light mode** with localStorage persistence

View File

@@ -1,44 +0,0 @@
# Apache configuration for agent endpoints
# Enable CORS for agent access
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, OPTIONS"
Header always set Access-Control-Allow-Headers "Content-Type, Accept"
# Set JSON content type for .json files
<FilesMatch "\.json$">
ForceType application/json
Header always set Content-Type "application/json"
</FilesMatch>
# Cache control - short cache for dynamic content
<FilesMatch "discovery\.json$">
Header always set Cache-Control "max-age=60, must-revalidate"
</FilesMatch>
<FilesMatch "islands\.json$">
Header always set Cache-Control "max-age=30, must-revalidate"
</FilesMatch>
<FilesMatch "chains\.json$">
Header always set Cache-Control "max-age=60, must-revalidate"
</FilesMatch>
# Longer cache for static content
<FilesMatch "openapi\.json$">
Header always set Cache-Control "max-age=3600"
</FilesMatch>
<FilesMatch "join/.*\.json$">
Header always set Cache-Control "max-age=3600"
</FilesMatch>
# Disable caching for health endpoint
<FilesMatch "health$">
Header always set Cache-Control "no-cache, no-store, must-revalidate"
</FilesMatch>
# Enable rewrite engine for clean URLs
RewriteEngine On
# Redirect /agent to /agent/ (add trailing slash)
RewriteRule ^/agent$ /agent/ [R=301,L]

View File

@@ -1,60 +0,0 @@
# AITBC Nginx Reverse Proxy Configuration
# Copy to aitbc-proxy.conf and replace YOUR_CONTAINER_IP and YOUR_DOMAIN
server {
listen 80;
listen [::]:80;
server_name YOUR_DOMAIN localhost;
# Forward all requests to the AITBC container
location / {
proxy_pass http://YOUR_CONTAINER_IP;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
# Buffer settings
proxy_buffering on;
proxy_buffer_size 4k;
proxy_buffers 8 4k;
}
# Health check endpoint
location /health {
proxy_pass http://YOUR_CONTAINER_IP/health;
access_log off;
}
# Logging
access_log /var/log/nginx/aitbc-proxy.access.log;
error_log /var/log/nginx/aitbc-proxy.error.log;
}
# HTTPS configuration (uncomment and configure for production)
# server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
# server_name YOUR_DOMAIN;
#
# ssl_certificate /etc/ssl/certs/YOUR_DOMAIN.crt;
# ssl_certificate_key /etc/ssl/private/YOUR_DOMAIN.key;
#
# location / {
# proxy_pass http://YOUR_CONTAINER_IP;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# }
# }

View File

@@ -1,253 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Admin Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<style>
.card {
transition: all 0.3s ease;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.stat-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-sm border-b">
<div class="container mx-auto px-4 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<i data-lucide="shield-check" class="w-8 h-8 text-purple-600"></i>
<h1 class="text-2xl font-bold">AITBC Admin Dashboard</h1>
</div>
<div class="flex items-center space-x-4">
<span class="text-sm text-gray-500">Last updated: <span id="lastUpdate">Just now</span></span>
<button onclick="refreshData()" class="bg-purple-600 text-white px-4 py-2 rounded-lg hover:bg-purple-700 transition flex items-center">
<i data-lucide="refresh-cw" class="w-4 h-4 mr-2"></i>Refresh
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-8">
<!-- Stats Overview -->
<section class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Total Jobs</p>
<p class="text-3xl font-bold" id="totalJobs">0</p>
</div>
<i data-lucide="briefcase" class="w-10 h-10 text-white/50"></i>
</div>
</div>
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Active Jobs</p>
<p class="text-3xl font-bold" id="activeJobs">0</p>
</div>
<i data-lucide="activity" class="w-10 h-10 text-white/50"></i>
</div>
</div>
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Online Miners</p>
<p class="text-3xl font-bold" id="onlineMiners">0</p>
</div>
<i data-lucide="cpu" class="w-10 h-10 text-white/50"></i>
</div>
</div>
<div class="stat-card text-white rounded-lg p-6 card">
<div class="flex items-center justify-between">
<div>
<p class="text-white/80 text-sm">Avg Duration</p>
<p class="text-3xl font-bold" id="avgDuration">0ms</p>
</div>
<i data-lucide="clock" class="w-10 h-10 text-white/50"></i>
</div>
</div>
</section>
<!-- Quick Actions -->
<section class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8">
<div class="bg-white rounded-lg shadow-lg p-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="zap" class="w-5 h-5 mr-2 text-yellow-500"></i>
Quick Actions
</h2>
<div class="grid grid-cols-2 gap-4">
<button onclick="syncOffers()" class="bg-blue-600 text-white px-4 py-3 rounded-lg hover:bg-blue-700 transition flex items-center justify-center">
<i data-lucide="refresh-cw" class="w-4 h-4 mr-2"></i>Sync Offers
</button>
<button onclick="viewMiners()" class="bg-green-600 text-white px-4 py-3 rounded-lg hover:bg-green-700 transition flex items-center justify-center">
<i data-lucide="users" class="w-4 h-4 mr-2"></i>View Miners
</button>
<button onclick="viewJobs()" class="bg-purple-600 text-white px-4 py-3 rounded-lg hover:bg-purple-700 transition flex items-center justify-center">
<i data-lucide="list" class="w-4 h-4 mr-2"></i>View Jobs
</button>
<button onclick="viewMarketplace()" class="bg-orange-600 text-white px-4 py-3 rounded-lg hover:bg-orange-700 transition flex items-center justify-center">
<i data-lucide="store" class="w-4 h-4 mr-2"></i>Marketplace
</button>
</div>
</div>
<div class="bg-white rounded-lg shadow-lg p-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="link" class="w-5 h-5 mr-2 text-blue-500"></i>
Quick Links
</h2>
<div class="space-y-3">
<a href="/Marketplace" target="_blank" class="block bg-gray-50 p-3 rounded-lg hover:bg-gray-100 transition">
<div class="flex items-center justify-between">
<span class="font-medium">Marketplace UI</span>
<i data-lucide="external-link" class="w-4 h-4 text-gray-400"></i>
</div>
</a>
<a href="/Exchange" target="_blank" class="block bg-gray-50 p-3 rounded-lg hover:bg-gray-100 transition">
<div class="flex items-center justify-between">
<span class="font-medium">Trade Exchange</span>
<i data-lucide="external-link" class="w-4 h-4 text-gray-400"></i>
</div>
</a>
<a href="/api/docs" target="_blank" class="block bg-gray-50 p-3 rounded-lg hover:bg-gray-100 transition">
<div class="flex items-center justify-between">
<span class="font-medium">API Documentation</span>
<i data-lucide="external-link" class="w-4 h-4 text-gray-400"></i>
</div>
</a>
</div>
</div>
</section>
<!-- Recent Activity -->
<section class="bg-white rounded-lg shadow-lg p-6">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="activity" class="w-5 h-5 mr-2 text-green-500"></i>
System Status
</h2>
<div id="systemStatus" class="space-y-4">
<div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
<div class="flex items-center">
<i data-lucide="check-circle" class="w-5 h-5 text-green-600 mr-3"></i>
<span>Coordinator API</span>
</div>
<span class="text-green-600 font-medium">Online</span>
</div>
<div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
<div class="flex items-center">
<i data-lucide="check-circle" class="w-5 h-5 text-green-600 mr-3"></i>
<span>Blockchain Node</span>
</div>
<span class="text-green-600 font-medium">Online</span>
</div>
<div class="flex items-center justify-between p-3 bg-green-50 rounded-lg">
<div class="flex items-center">
<i data-lucide="check-circle" class="w-5 h-5 text-green-600 mr-3"></i>
<span>Marketplace</span>
</div>
<span class="text-green-600 font-medium">Active</span>
</div>
</div>
</section>
</main>
<!-- Toast Notification -->
<div id="toast" class="fixed bottom-4 right-4 bg-green-500 text-white px-6 py-3 rounded-lg shadow-lg transform translate-y-full transition-transform duration-300">
<span id="toastMessage"></span>
</div>
<script>
const API_BASE = '/api';
const ADMIN_API_KEY = '${ADMIN_API_KEY}';
const headers = { 'X-Api-Key': ADMIN_API_KEY };
// Initialize
document.addEventListener('DOMContentLoaded', () => {
lucide.createIcons();
refreshData();
// Auto-refresh every 30 seconds
setInterval(refreshData, 30000);
});
// Refresh data
async function refreshData() {
try {
// Get stats
const response = await axios.get(`${API_BASE}/admin/stats`, { headers });
const stats = response.data;
document.getElementById('totalJobs').textContent = stats.total_jobs || 0;
document.getElementById('activeJobs').textContent = stats.active_jobs || 0;
document.getElementById('onlineMiners').textContent = stats.online_miners || 0;
document.getElementById('avgDuration').textContent = (stats.avg_miner_job_duration_ms || 0) + 'ms';
document.getElementById('lastUpdate').textContent = new Date().toLocaleTimeString();
} catch (error) {
console.error('Failed to fetch stats:', error);
showToast('Failed to fetch stats', 'error');
}
}
// Sync offers
async function syncOffers() {
try {
showToast('Syncing offers...');
const response = await axios.post(`${API_BASE}/marketplace/sync-offers`, {}, { headers });
showToast(`Synced ${response.data.created_offers} offers`);
refreshData();
} catch (error) {
console.error('Failed to sync offers:', error);
showToast('Failed to sync offers', 'error');
}
}
// View miners
async function viewMiners() {
window.open('/admin/miners', '_blank');
}
// View jobs
async function viewJobs() {
window.open('/admin/jobs', '_blank');
}
// View marketplace
function viewMarketplace() {
window.open('/Marketplace', '_blank');
}
// Show toast notification
function showToast(message, type = 'success') {
const toast = document.getElementById('toast');
const toastMessage = document.getElementById('toastMessage');
toastMessage.textContent = message;
toast.className = `fixed bottom-4 right-4 px-6 py-3 rounded-lg shadow-lg transform transition-transform duration-300 ${
type === 'error' ? 'bg-red-500' : 'bg-green-500'
} text-white`;
toast.style.transform = 'translateY(0)';
setTimeout(() => {
toast.style.transform = 'translateY(100%)';
}, 3000);
}
</script>
</body>
</html>

View File

@@ -1,312 +0,0 @@
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Metrics Dashboard</title>
<link rel="stylesheet" href="/assets/css/site-header.css">
<link rel="stylesheet" href="/assets/css/dashboards.css">
<link rel="preload" href="/assets/css/font-awesome.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
</head>
<body>
<div data-global-header></div>
<main>
<div class="container">
<!-- Header -->
<div class="dashboard-header">
<h1><i class="fas fa-chart-line"></i> System Metrics Dashboard</h1>
<p>Real-time monitoring of AITBC system performance and health</p>
<div class="last-updated">
<span>Last Updated: <span id="last-updated">Loading...</span></span>
<button onclick="refreshMetrics()" class="btn btn-primary">
<i class="fas fa-sync-alt"></i> Refresh
</button>
</div>
</div>
<!-- Metrics Grid -->
<div class="metrics-grid">
<!-- API Metrics -->
<div class="metric-card">
<div class="metric-header">
<h3><i class="fas fa-server"></i> API Metrics</h3>
</div>
<div class="metric-body">
<div class="metric-item">
<span class="metric-label">Total Requests</span>
<span class="metric-value" id="api-requests">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Errors</span>
<span class="metric-value error" id="api-errors">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Error Rate</span>
<span class="metric-value" id="error-rate">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Avg Response Time</span>
<span class="metric-value" id="avg-response-time">-</span>
</div>
</div>
</div>
<!-- Database Metrics -->
<div class="metric-card">
<div class="metric-header">
<h3><i class="fas fa-database"></i> Database Metrics</h3>
</div>
<div class="metric-body">
<div class="metric-item">
<span class="metric-label">Queries</span>
<span class="metric-value" id="db-queries">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Errors</span>
<span class="metric-value error" id="db-errors">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Active Connections</span>
<span class="metric-value" id="active-connections">-</span>
</div>
</div>
</div>
<!-- Cache Metrics -->
<div class="metric-card">
<div class="metric-header">
<h3><i class="fas fa-memory"></i> Cache Metrics</h3>
</div>
<div class="metric-body">
<div class="metric-item">
<span class="metric-label">Cache Hits</span>
<span class="metric-value success" id="cache-hits">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Cache Misses</span>
<span class="metric-value warning" id="cache-misses">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Hit Rate</span>
<span class="metric-value" id="cache-hit-rate">-</span>
</div>
</div>
</div>
<!-- System Metrics -->
<div class="metric-card">
<div class="metric-header">
<h3><i class="fas fa-microchip"></i> System Metrics</h3>
</div>
<div class="metric-body">
<div class="metric-item">
<span class="metric-label">Memory Usage</span>
<span class="metric-value" id="memory-usage">-</span>
</div>
<div class="metric-item">
<span class="metric-label">CPU Usage</span>
<span class="metric-value" id="cpu-usage">-</span>
</div>
<div class="metric-item">
<span class="metric-label">Uptime</span>
<span class="metric-value" id="uptime">-</span>
</div>
</div>
</div>
</div>
<!-- Status Indicators -->
<div class="status-section">
<h2>System Status</h2>
<div class="status-indicators">
<div class="status-item" id="status-api">
<span class="status-label">API Service</span>
<span class="status-badge">Checking...</span>
</div>
<div class="status-item" id="status-database">
<span class="status-label">Database</span>
<span class="status-badge">Checking...</span>
</div>
<div class="status-item" id="status-cache">
<span class="status-label">Cache</span>
<span class="status-badge">Checking...</span>
</div>
<div class="status-item" id="status-blockchain">
<span class="status-label">Blockchain</span>
<span class="status-badge">Checking...</span>
</div>
</div>
</div>
<div class="status-section">
<h2>Active Alerts</h2>
<div class="status-indicators" id="alert-indicators">
<div class="status-item">
<span class="status-label">Alert State</span>
<span class="status-badge">Loading...</span>
</div>
</div>
</div>
</div>
</main>
<script>
// Auto-refresh metrics every 30 seconds
let refreshInterval;
const METRICS_ENDPOINT = '/v1/metrics';
const HEALTH_ENDPOINT = '/v1/health';
function refreshMetrics() {
// Update timestamp
document.getElementById('last-updated').textContent = new Date().toLocaleTimeString();
fetchMetrics();
checkServiceStatus();
}
async function fetchMetrics() {
try {
const response = await fetch(METRICS_ENDPOINT, { method: 'GET', cache: 'no-cache' });
if (!response.ok) {
throw new Error(`Metrics request failed with status ${response.status}`);
}
const metrics = await response.json();
// Update UI
document.getElementById('api-requests').textContent = metrics.api_requests.toLocaleString();
document.getElementById('api-errors').textContent = metrics.api_errors.toLocaleString();
document.getElementById('error-rate').textContent = Number(metrics.error_rate_percent).toFixed(2) + '%';
document.getElementById('avg-response-time').textContent = Number(metrics.avg_response_time_ms).toFixed(2) + 'ms';
document.getElementById('db-queries').textContent = metrics.database_queries.toLocaleString();
document.getElementById('db-errors').textContent = metrics.database_errors.toLocaleString();
document.getElementById('active-connections').textContent = metrics.active_connections;
document.getElementById('cache-hits').textContent = metrics.cache_hits.toLocaleString();
document.getElementById('cache-misses').textContent = metrics.cache_misses.toLocaleString();
document.getElementById('cache-hit-rate').textContent = Number(metrics.cache_hit_rate_percent).toFixed(2) + '%';
document.getElementById('memory-usage').textContent = Number(metrics.memory_usage_mb).toFixed(2) + ' MB';
document.getElementById('cpu-usage').textContent = Number(metrics.cpu_usage_percent).toFixed(2) + '%';
document.getElementById('uptime').textContent = metrics.uptime_formatted;
resetMetricClasses();
setMetricColor('error-rate', metrics.error_rate_percent, 1, 5);
setMetricColor('avg-response-time', metrics.avg_response_time_ms, 500, 1000);
setMetricColor('cache-hit-rate', metrics.cache_hit_rate_percent, 70, 85, true);
setMetricColor('memory-usage', (metrics.alerts?.memory_usage?.value || 0), 75, 90);
renderAlerts(metrics.alerts || {});
} catch (error) {
console.error('Failed to fetch metrics:', error);
document.getElementById('alert-indicators').innerHTML = `
<div class="status-item">
<span class="status-label">Alert State</span>
<span class="status-badge error">Metrics Unavailable</span>
</div>
`;
}
}
async function checkServiceStatus() {
const services = [
{ id: 'status-api', url: HEALTH_ENDPOINT },
{ id: 'status-database', url: HEALTH_ENDPOINT },
{ id: 'status-cache', url: HEALTH_ENDPOINT },
{ id: 'status-blockchain', url: 'http://localhost:8006/v1/health' }
];
for (const service of services) {
try {
const response = await fetch(service.url, { method: 'GET', cache: 'no-cache' });
const badge = document.querySelector(`#${service.id} .status-badge`);
if (response.ok) {
badge.textContent = 'Online';
badge.className = 'status-badge success';
} else {
badge.textContent = 'Degraded';
badge.className = 'status-badge warning';
}
} catch (error) {
const badge = document.querySelector(`#${service.id} .status-badge`);
badge.textContent = 'Offline';
badge.className = 'status-badge error';
}
}
}
function renderAlerts(alerts) {
const container = document.getElementById('alert-indicators');
const entries = Object.entries(alerts);
const triggeredAlerts = entries.filter(([, alert]) => alert.triggered);
if (entries.length === 0) {
container.innerHTML = `
<div class="status-item">
<span class="status-label">Alert State</span>
<span class="status-badge warning">No Alert Data</span>
</div>
`;
return;
}
if (triggeredAlerts.length === 0) {
container.innerHTML = `
<div class="status-item">
<span class="status-label">Alert State</span>
<span class="status-badge success">All Clear</span>
</div>
`;
return;
}
container.innerHTML = triggeredAlerts.map(([name, alert]) => `
<div class="status-item">
<span class="status-label">${formatAlertName(name)}</span>
<span class="status-badge error">Critical (${alert.value} / ${alert.threshold})</span>
</div>
`).join('');
}
function formatAlertName(name) {
return name.replaceAll('_', ' ').replace(/\b\w/g, (char) => char.toUpperCase());
}
function resetMetricClasses() {
document.querySelectorAll('.metric-value').forEach((element) => {
element.classList.remove('success', 'warning', 'error');
});
}
function setMetricColor(elementId, value, warningThreshold, errorThreshold, invert = false) {
const element = document.getElementById(elementId);
const numValue = parseFloat(value);
if (invert) {
// Higher is better (e.g., cache hit rate)
if (numValue >= errorThreshold) {
element.classList.add('success');
} else if (numValue >= warningThreshold) {
element.classList.add('warning');
} else {
element.classList.add('error');
}
} else {
// Lower is better (e.g., error rate)
if (numValue <= warningThreshold) {
element.classList.add('success');
} else if (numValue <= errorThreshold) {
element.classList.add('warning');
} else {
element.classList.add('error');
}
}
}
// Initialize
document.addEventListener('DOMContentLoaded', function() {
refreshMetrics();
refreshInterval = setInterval(refreshMetrics, 30000); // Refresh every 30 seconds
});
</script>
</body>
</html>

View File

@@ -1,210 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC GPU Miner Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@keyframes pulse-green {
0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
50% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}
.gpu-gradient { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.status-active { animation: pulse-green 2s infinite; }
</style>
</head>
<body class="bg-gray-900 text-white min-h-screen">
<!-- Header -->
<header class="bg-gray-800 shadow-xl">
<div class="container mx-auto px-6 py-4">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-4">
<i class="fas fa-microchip text-4xl text-purple-500"></i>
<div>
<h1 class="text-3xl font-bold">AITBC GPU Miner Dashboard</h1>
<p class="text-green-400">✓ Running on HOST with direct GPU access</p>
</div>
</div>
<div class="flex items-center space-x-4">
<span class="flex items-center bg-green-900/50 px-3 py-1 rounded-full">
<span class="w-3 h-3 bg-green-500 rounded-full status-active mr-2"></span>
<span>GPU Online</span>
</span>
<button onclick="location.reload()" class="bg-purple-600 hover:bg-purple-700 px-4 py-2 rounded-lg transition">
<i class="fas fa-sync-alt mr-2"></i>Refresh
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-6 py-8">
<!-- GPU Status Card -->
<div class="gpu-gradient rounded-xl p-8 mb-8 text-white shadow-2xl">
<div class="flex items-center justify-between mb-6">
<div>
<h2 class="text-3xl font-bold mb-2">NVIDIA GeForce RTX 4060 Ti</h2>
<p class="text-purple-200">Real-time GPU Performance Monitor</p>
</div>
<div class="text-right">
<div class="text-5xl font-bold" id="gpuUtil">0%</div>
<div class="text-purple-200">GPU Utilization</div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Temperature</p>
<p class="text-2xl font-bold" id="gpuTemp">43°C</p>
</div>
<i class="fas fa-thermometer-half text-3xl text-orange-400"></i>
</div>
</div>
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Power Usage</p>
<p class="text-2xl font-bold" id="gpuPower">18W</p>
</div>
<i class="fas fa-bolt text-3xl text-yellow-400"></i>
</div>
</div>
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Memory Used</p>
<p class="text-2xl font-bold" id="gpuMem">2.9GB</p>
</div>
<i class="fas fa-memory text-3xl text-blue-400"></i>
</div>
</div>
<div class="bg-white/10 backdrop-blur rounded-lg p-4">
<div class="flex items-center justify-between">
<div>
<p class="text-purple-200 text-sm">Performance</p>
<p class="text-2xl font-bold" id="gpuPerf">P8</p>
</div>
<i class="fas fa-tachometer-alt text-3xl text-green-400"></i>
</div>
</div>
</div>
</div>
<!-- Mining Operations -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-8">
<!-- Active Jobs -->
<div class="bg-gray-800 rounded-xl p-6">
<h3 class="text-xl font-bold mb-4 flex items-center">
<i class="fas fa-tasks mr-3 text-green-500"></i>
Mining Operations
<span class="ml-auto text-sm text-gray-400">0 active jobs</span>
</h3>
<div class="text-center py-8">
<i class="fas fa-pause-circle text-6xl text-yellow-500 mb-4"></i>
<p class="text-xl font-semibold text-yellow-500">Miner Idle</p>
<p class="text-gray-400 mt-2">Ready to accept mining jobs</p>
</div>
</div>
<!-- GPU Services -->
<div class="bg-gray-800 rounded-xl p-6">
<h3 class="text-xl font-bold mb-4 flex items-center">
<i class="fas fa-server mr-3 text-blue-500"></i>
GPU Services Status
</h3>
<div class="space-y-3">
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-cube text-purple-400 mr-3"></i>
<div>
<p class="font-semibold">CUDA Computing</p>
<p class="text-sm text-gray-400">4352 CUDA cores available</p>
</div>
</div>
<span class="bg-green-600 px-3 py-1 rounded-full text-sm">Active</span>
</div>
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-project-diagram text-blue-400 mr-3"></i>
<div>
<p class="font-semibold">Parallel Processing</p>
<p class="text-sm text-gray-400">Multi-threaded operations</p>
</div>
</div>
<span class="bg-green-600 px-3 py-1 rounded-full text-sm">Active</span>
</div>
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-hashtag text-green-400 mr-3"></i>
<div>
<p class="font-semibold">Hash Generation</p>
<p class="text-sm text-gray-400">Proof-of-work computation</p>
</div>
</div>
<span class="bg-yellow-600 px-3 py-1 rounded-full text-sm">Standby</span>
</div>
<div class="bg-gray-700 rounded-lg p-4 flex justify-between items-center hover:bg-gray-600 transition">
<div class="flex items-center">
<i class="fas fa-brain text-pink-400 mr-3"></i>
<div>
<p class="font-semibold">AI Model Training</p>
<p class="text-sm text-gray-400">Machine learning operations</p>
</div>
</div>
<span class="bg-gray-600 px-3 py-1 rounded-full text-sm">Available</span>
</div>
</div>
</div>
</div>
<!-- System Info -->
<div class="bg-gray-800 rounded-xl p-6">
<h3 class="text-xl font-bold mb-4">System Information</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-gray-700 rounded-lg p-4 text-center">
<i class="fas fa-desktop text-3xl text-blue-400 mb-2"></i>
<p class="text-sm text-gray-400">Host System</p>
<p class="font-semibold text-green-400">at1/localhost</p>
</div>
<div class="bg-gray-700 rounded-lg p-4 text-center">
<i class="fas fa-microchip text-3xl text-purple-400 mb-2"></i>
<p class="text-sm text-gray-400">GPU Access</p>
<p class="font-semibold text-green-400">Direct</p>
</div>
<div class="bg-gray-700 rounded-lg p-4 text-center">
<i class="fas fa-cube text-3xl text-red-400 mb-2"></i>
<p class="text-sm text-gray-400">Container</p>
<p class="font-semibold text-red-400">Not Used</p>
</div>
</div>
</div>
</main>
<script>
// Update GPU metrics
function updateGPU() {
// Simulate GPU metrics
const util = Math.random() * 15;
const temp = 43 + Math.random() * 10;
const power = 18 + util * 0.5;
const mem = 2.9 + Math.random() * 0.5;
document.getElementById('gpuUtil').textContent = Math.round(util) + '%';
document.getElementById('gpuTemp').textContent = Math.round(temp) + '°C';
document.getElementById('gpuPower').textContent = Math.round(power) + 'W';
document.getElementById('gpuMem').textContent = mem.toFixed(1) + 'GB';
}
// Initialize
document.addEventListener('DOMContentLoaded', () => {
updateGPU();
setInterval(updateGPU, 3000);
});
</script>
</body>
</html>

View File

@@ -1,60 +0,0 @@
# AITBC Website Documentation
**Level**: Beginner
**Prerequisites**: Basic familiarity with the AITBC documentation site and web UI concepts
**Estimated Time**: 15-25 minutes
**Last Updated**: 2026-04-27
**Version**: 1.0
## 🧭 **Navigation Path:**
**🏠 [Documentation Home](../README.md)** → **🌐 Website Docs** → *You are here*
**breadcrumb**: Home → Website Docs → Overview
---
## 🎯 **See Also:**
- **📚 Main Documentation**: [Docs Home](../README.md) - Primary docs landing page
- **📦 Apps Documentation**: [Apps Overview](../apps/README.md) - Application-specific documentation
- **🔧 CLI Documentation**: [CLI Technical](../cli-technical/README.md) - CLI usage and technical notes
- **🧪 Testing Documentation**: [Testing Docs](../testing/README.md) - Validation and test guidance
---
## 📚 **Whats in this directory?**
This directory contains the rendered documentation website assets and entry points:
- `index.html` - Primary website landing page.
- `full-documentation.html` - Complete doc site rendering.
- `clients.html`, `developers.html`, `miners.html`, and related role-based pages.
- Supporting static assets under `css/` and `js/`.
### **Use these assets when you need to:**
- Review the public documentation site structure.
- Validate role-specific content rendered by the site.
- Inspect static HTML output for documentation generation.
- Reference the user-facing navigation experience.
---
## 🔗 **Where to go next**
- [Documentation Website Index](index.html)
- [Full Documentation Render](full-documentation.html)
- [Docs Home](../README.md)
- [Master Index](../MASTER_INDEX.md)
---
## 📊 **Quality Metrics**
- **Structure**: 10/10 - Short landing page for the website assets.
- **Content**: 10/10 - Documents the HTML entry points and static assets.
- **Navigation**: 10/10 - Clear links back to the docs home and rendered site.
- **Status**: Active index page.
---
*Last updated: 2026-04-27*
*Version: 1.0*
*Status: Active index for website documentation*

View File

@@ -1,203 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<main>
<div class="container">
<!-- Back Button -->
<a href="../docs/index.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Documentation
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-code"></i> API Documentation</h1>
<p>Complete API reference for the AITBC platform. All APIs are RESTful and use JSON for request/response format.</p>
</div>
<!-- API Endpoints -->
<div class="api-grid">
<!-- Client API -->
<div class="api-card">
<h3><i class="fas fa-users"></i> Client API</h3>
<p>Endpoints for job submission, status checking, and receipt retrieval.</p>
<div class="endpoint">
<span class="method post">POST</span>/v1/jobs
</div>
<p>Submit a new AI compute job</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/jobs/{job_id}
</div>
<p>Get job status and results</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/jobs/{job_id}/receipt
</div>
<p>Get computation receipt</p>
</div>
<!-- Miner API -->
<div class="api-card">
<h3><i class="fas fa-hammer"></i> Miner API</h3>
<p>Endpoints for miner registration, job assignment, and result submission.</p>
<div class="endpoint">
<span class="method post">POST</span>/v1/miners/register
</div>
<p>Register as a miner</p>
<div class="endpoint">
<span class="method post">POST</span>/v1/miners/{address}/heartbeat
</div>
<p>Send miner heartbeat</p>
<div class="endpoint">
<span class="method post">POST</span>/v1/jobs/{job_id}/complete
</div>
<p>Submit job results</p>
</div>
<!-- Admin API -->
<div class="api-card">
<h3><i class="fas fa-shield-alt"></i> Admin API</h3>
<p>Administrative endpoints for system management and monitoring.</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/admin/miners
</div>
<p>List all registered miners</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/admin/jobs
</div>
<p>List all jobs in system</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/admin/stats
</div>
<p>Get system statistics</p>
</div>
<!-- Marketplace API -->
<div class="api-card">
<h3><i class="fas fa-store"></i> Marketplace API</h3>
<p>Endpoints for the compute marketplace and trading functionality.</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/marketplace/offers
</div>
<p>List available compute offers</p>
<div class="endpoint">
<span class="method post">POST</span>/v1/marketplace/offers
</div>
<p>Create a new compute offer</p>
<div class="endpoint">
<span class="method post">POST</span>/v1/marketplace/trades
</div>
<p>Execute a trade</p>
</div>
<!-- Exchange API -->
<div class="api-card">
<h3><i class="fas fa-exchange-alt"></i> Exchange API</h3>
<p>Endpoints for token exchange and trading operations.</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/exchange/ticker
</div>
<p>Get current ticker prices</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/exchange/orderbook
</div>
<p>Get order book</p>
<div class="endpoint">
<span class="method post">POST</span>/v1/exchange/orders
</div>
<p>Place a new order</p>
</div>
<!-- Explorer API -->
<div class="api-card">
<h3><i class="fas fa-search"></i> Explorer API</h3>
<p>Endpoints for blockchain exploration and data retrieval.</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/explorer/blocks
</div>
<p>List recent blocks</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/explorer/transactions
</div>
<p>List recent transactions</p>
<div class="endpoint">
<span class="method get">GET</span>/v1/explorer/address/{address}
</div>
<p>Get address details</p>
</div>
</div>
<!-- Authentication -->
<section class="content-section">
<h2>Authentication</h2>
<p>All API requests must include an API key in the header:</p>
<pre class="code-inline"><code>X-Api-Key: your_api_key_here</code></pre>
<h3>Getting API Keys</h3>
<ul>
<li>Clients: Register through the web interface or contact support</li>
<li>Miners: Generated upon registration</li>
<li>Admin: Pre-configured secure keys</li>
</ul>
</section>
<!-- Base URL -->
<section class="content-section">
<h2>Base URL</h2>
<p>All API endpoints are relative to the base URL:</p>
<pre class="code-inline"><code>https://aitbc.bubuit.net/api</code></pre>
<p>For development:</p>
<pre class="code-inline"><code>http://localhost:18000</code></pre>
</section>
<!-- WebSocket -->
<section class="content-section">
<h2>WebSocket API</h2>
<p>Real-time updates are available through WebSocket connections:</p>
<pre class="code-inline"><code>ws://aitbc.bubuit.net:18001/ws</code></pre>
<p>Subscribe to events:</p>
<pre class="code-inline"><code>{
"method": "subscribe",
"params": ["job_updates", "miner_heartbeats"]
}</code></pre>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,193 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Blockchain Node - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="components.html">Components</a>
<span></span>
<span>Blockchain Node</span>
</div>
<!-- Back Button -->
<a href="components.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Components
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-cube"></i> Blockchain Node</h1>
<p>PoA/PoS consensus blockchain with REST/WebSocket RPC, real-time gossip layer, and comprehensive observability</p>
<span class="status-badge live">● Live</span>
</div>
<!-- Overview -->
<section class="content-section">
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<strong>System Flow:</strong> See the <a href="flowchart.html">complete system flow diagram</a> to understand how the blockchain node interacts with other AITBC components.
</div>
<h2>Overview</h2>
<p>The AITBC Blockchain Node is the core infrastructure component that maintains the distributed ledger. It implements a hybrid Proof-of-Authority/Proof-of-Stake consensus mechanism with fast finality and supports high throughput for AI workload transactions.</p>
<h3>Key Features</h3>
<ul>
<li>Hybrid PoA/PoS consensus with sub-second finality</li>
<li>REST and WebSocket RPC APIs</li>
<li>Real-time gossip protocol for block propagation</li>
<li>Comprehensive observability with Prometheus metrics</li>
<li>SQLModel-based data persistence</li>
<li>Built-in devnet tooling and scripts</li>
</ul>
</section>
<!-- Architecture -->
<section class="content-section">
<h2>Architecture</h2>
<p>The blockchain node is built with a modular architecture separating concerns for consensus, storage, networking, and API layers.</p>
<div class="feature-grid">
<div class="feature-card">
<h4>Consensus Engine</h4>
<p>Hybrid PoA/PoS with proposer rotation and validator sets</p>
</div>
<div class="feature-card">
<h4>Storage Layer</h4>
<p>SQLModel with SQLite/PostgreSQL support</p>
</div>
<div class="feature-card">
<h4>Networking</h4>
<p>WebSocket gossip + REST API</p>
</div>
<div class="feature-card">
<h4>Observability</h4>
<p>Prometheus metrics + structured logging</p>
</div>
</div>
</section>
<!-- API Reference -->
<section class="content-section">
<h2>API Reference</h2>
<p>The blockchain node exposes both REST and WebSocket APIs for interaction.</p>
<h3>REST Endpoints</h3>
<div class="api-endpoint">
<code>GET /rpc/get_head</code>
<p>Get the latest block header</p>
</div>
<div class="api-endpoint">
<code>POST /rpc/send_tx</code>
<p>Submit a new transaction</p>
</div>
<div class="api-endpoint">
<code>GET /rpc/get_balance/{address}</code>
<p>Get account balance</p>
</div>
<div class="api-endpoint">
<code>GET /rpc/get_block/{height}</code>
<p>Get block by height</p>
</div>
<h3>WebSocket Subscriptions</h3>
<ul>
<li><code>new_blocks</code> - Real-time block notifications</li>
<li><code>new_transactions</code> - Transaction pool updates</li>
<li><code>consensus_events</code> - Consensus round updates</li>
</ul>
</section>
<!-- Configuration -->
<section class="content-section">
<h2>Configuration</h2>
<p>The node can be configured via environment variables or configuration file.</p>
<h3>Key Settings</h3>
<pre><code># Database
DATABASE_URL=sqlite:///blockchain.db
# Network
RPC_HOST=0.0.0.0
RPC_PORT=9080
WS_PORT=9081
# Consensus
CONSENSUS_MODE=poa
VALIDATOR_ADDRESS=0x...
BLOCK_TIME=1s
# Observability
METRICS_PORT=9090
LOG_LEVEL=info</code></pre>
</section>
<!-- Deployment -->
<section class="content-section">
<h2>Deployment</h2>
<p>The blockchain node runs on the host machine with GPU access requirements.</p>
<h3>System Requirements</h3>
<ul>
<li>CPU: 4+ cores recommended</li>
<li>RAM: 8GB minimum</li>
<li>Storage: 100GB+ SSD</li>
<li>Network: 1Gbps+ for gossip</li>
</ul>
<h3>Installation</h3>
<pre><code># Clone repository
git clone https://github.com/oib/AITBC.git
cd aitbc/apps/blockchain-node
# Install dependencies
pip install -r requirements.txt
# Run node
python -m aitbc_chain.node</code></pre>
</section>
<!-- Monitoring -->
<section class="content-section">
<h2>Monitoring & Observability</h2>
<p>The node provides comprehensive monitoring capabilities out of the box.</p>
<h3>Metrics Available</h3>
<ul>
<li>Block production rate and intervals</li>
<li>Transaction pool size and latency</li>
<li>Network gossip metrics</li>
<li>Consensus health indicators</li>
<li>Resource utilization</li>
</ul>
<h3>Grafana Dashboard</h3>
<p>A pre-built Grafana dashboard is available at <code>/observability/grafana/</code></p>
</section>
</div>
</main>
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0;url=/wallet/">
<title>Redirecting to AITBC Wallet...</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<p>Redirecting to <a href="/wallet/">AITBC Browser Wallet</a></p>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,443 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Client Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<div class="doc-header">
<span class="audience-badge">For Clients</span>
<h1>Use AITBC for AI/ML Workloads</h1>
<p>Access secure, private, and verifiable AI/ML computation on the decentralized network</p>
<div class="source-links">
<a href="https://github.com/oib/AITBC/tree/main/docs/2_clients" target="_blank"><i class="fas fa-file-alt"></i> Markdown Source: docs/2_clients/</a>
</div>
<div class="announce-banner green">
<h3>✅ Now Available: Full CLI with 90+ Commands</h3>
<p>Submit jobs, track lifecycle, manage wallet, and verify receipts. Supporting 13+ Ollama models with real-time blockchain verification!</p>
</div>
</div>
<!-- Key Features -->
<div class="feature-grid">
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-shield-alt"></i>
</div>
<h3>Privacy First</h3>
<p>Your data and models remain confidential with zero-knowledge proofs and secure enclaves</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-check-circle"></i>
</div>
<h3>Verifiable Results</h3>
<p>Every computation is cryptographically verified on the blockchain for trust and transparency</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-bolt"></i>
</div>
<h3>Fast & Efficient</h3>
<p>Access thousands of GPUs worldwide with sub-second response times</p>
</div>
</div>
<!-- Getting Started -->
<section class="content-section">
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<strong>System Flow:</strong> See the <a href="flowchart.html">complete system flow diagram</a> to understand how client requests flow through the AITBC system.
</div>
<h2>Getting Started</h2>
<p>Start using AITBC in minutes with our simple client SDK or web interface.</p>
<h3>Quick Start Options</h3>
<ul>
<li><strong>CLI Wrapper Tool</strong>: ✅ NEW - Unified bash script for job management</li>
<li><strong>Web Interface</strong>: No installation required</li>
<li><strong>Python SDK</strong>: For AI/ML developers</li>
<li><strong>JavaScript SDK</strong>: For web applications</li>
<li><strong>REST API</strong>: For any platform</li>
</ul>
<h3>CLI Wrapper Tool (Recommended)</h3>
<div class="step">
<div class="step-number">1</div>
<div class="step-content">
<h4>Submit an Inference Job</h4>
<p>Use the bash CLI wrapper for easy job submission</p>
<div class="code-block">
# Submit job with CLI wrapper
./scripts/aitbc-cli.sh submit inference \
--prompt "What is machine learning?" \
--model llama3.2:latest
# Check job status
./scripts/aitbc-cli.sh status <job_id>
# View receipt with payment details
./scripts/aitbc-cli.sh receipts --job-id <job_id></div>
</div>
</div>
<div class="alert alert-info">
<strong>Available Models:</strong> llama3.2, mistral, deepseek-r1:14b, gemma3, qwen2.5-coder, and 8+ more via Ollama integration. Processing time: 11-25 seconds. Rate: 0.02 AITBC per GPU second.
</div>
<h3>Web Interface (Fastest)</h3>
<div class="step">
<div class="step-number">1</div>
<div class="step-content">
<h4>Visit the Marketplace</h4>
<p>Go to <a href="https://aitbc.bubuit.net/marketplace">aitbc.bubuit.net/marketplace</a></p>
</div>
</div>
<div class="step">
<div class="step-number">2</div>
<div class="step-content">
<h4>Connect Your Wallet</h4>
<p>Connect MetaMask or create a new AITBC wallet</p>
</div>
</div>
<div class="step">
<div class="step-number">3</div>
<div class="step-content">
<h4>Submit Your Job</h4>
<p>Upload your data or model, select parameters, and submit</p>
</div>
</div>
<div class="step">
<div class="step-number">4</div>
<div class="step-content">
<h4>Get Results</h4>
<p>Receive verified results with cryptographic proof</p>
</div>
</div>
</section>
<!-- Use Cases -->
<section class="content-section">
<h2>Popular Use Cases</h2>
<div class="use-case-grid">
<div class="use-case-card">
<h4><i class="fas fa-brain"></i> AI Inference ✅ LIVE</h4>
<p>Run inference on pre-trained models including LLama, Mistral, DeepSeek, and custom models via Ollama</p>
<ul>
<li>Text generation (13+ models)</li>
<li>Code generation (DeepSeek, Qwen)</li>
<li>Translation (Qwen2.5-translator)</li>
<li>Real-time processing (11-25s)</li>
</ul>
</div>
<div class="use-case-card">
<h4><i class="fas fa-graduation-cap"></i> Model Training</h4>
<p>Train and fine-tune models on your data with privacy guarantees</p>
<ul>
<li>Fine-tuning LLMs</li>
<li>Custom model training</li>
<li>Federated learning</li>
<li>Transfer learning</li>
</ul>
</div>
<div class="use-case-card">
<h4><i class="fas fa-chart-line"></i> Data Analysis</h4>
<p>Process large datasets with confidential computing</p>
<ul>
<li>Statistical analysis</li>
<li>Pattern recognition</li>
<li>Predictive modeling</li>
<li>Data visualization</li>
</ul>
</div>
<div class="use-case-card">
<h4><i class="fas fa-lock"></i> Secure Computation</h4>
<p>Run sensitive computations with end-to-end encryption</p>
<ul>
<li>Financial modeling</li>
<li>Healthcare analytics</li>
<li>Legal document processing</li>
<li>Proprietary algorithms</li>
</ul>
</div>
</div>
</section>
<!-- SDK Examples -->
<section class="content-section">
<h2>SDK Examples</h2>
<h3>Python SDK</h3>
<div class="code-block">
# Install the SDK
pip install aitbc
# Initialize client
from aitbc import AITBCClient
client = AITBCClient(api_key="your-api-key")
# Run inference
result = client.inference(
model="gpt-4",
prompt="Explain quantum computing",
max_tokens=500,
temperature=0.7
)
print(result.text)
# Verify the receipt
is_valid = client.verify_receipt(result.receipt_id)
print(f"Verified: {is_valid}")</div>
<h3>JavaScript SDK</h3>
<div class="code-block">
// Install the SDK
npm install @aitbc/client
// Initialize client
import { AITBCClient } from '@aitbc/client';
const client = new AITBCClient({
apiKey: 'your-api-key',
network: 'mainnet'
});
// Run inference
const result = await client.inference({
model: 'stable-diffusion',
prompt: 'A futuristic city',
steps: 50,
cfg_scale: 7.5
});
// Download the image
await client.downloadImage(result.imageId, './output.png');
// Verify computation
const verified = await client.verify(result.receiptId);
console.log('Computation verified:', verified);</div>
<h3>REST API</h3>
<div class="code-block">
# Submit a job
curl -X POST https://aitbc.bubuit.net/api/v1/jobs \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "inference",
"model": "gpt-4",
"input": {
"prompt": "Hello, AITBC!",
"max_tokens": 100
},
"privacy": {
"confidential": true,
"zk_proof": true
}
}'
# Check job status
curl -X GET https://aitbc.bubuit.net/api/v1/jobs/JOB_ID \
-H "Authorization: Bearer YOUR_TOKEN"</div>
</section>
<!-- Pricing -->
<section class="content-section">
<h2>Pricing</h2>
<p>Flexible pricing options for every use case</p>
<div class="pricing-table">
<div class="pricing-card">
<h3>Pay-per-use</h3>
<div class="price">$0.01<span class="price-unit">/1K tokens</span></div>
<ul>
<li>No minimum commitment</li>
<li>Pay only for what you use</li>
<li>All models available</li>
<li>Basic support</li>
</ul>
<button class="btn btn-outline">Get Started</button>
</div>
<div class="pricing-card featured">
<h3>Professional</h3>
<div class="price">$99<span class="price-unit">/month</span></div>
<ul>
<li>$500 included credits</li>
<li>Priority processing</li>
<li>Advanced models</li>
<li>Email support</li>
<li>API access</li>
</ul>
<button class="btn">Start Free Trial</button>
</div>
<div class="pricing-card">
<h3>Enterprise</h3>
<div class="price">Custom</div>
<ul>
<li>Unlimited usage</li>
<li>Dedicated resources</li>
<li>Custom models</li>
<li>24/7 support</li>
<li>SLA guarantee</li>
</ul>
<button class="btn btn-outline">Contact Sales</button>
</div>
</div>
</section>
<!-- Privacy & Security -->
<section class="content-section">
<h2>Privacy & Security</h2>
<div class="alert alert-success">
<strong>Your data is never stored or exposed</strong> - All computations are performed in secure enclaves with zero-knowledge proof verification.
</div>
<h3>Privacy Features</h3>
<ul>
<li><strong>End-to-end encryption</strong> - Your data is encrypted before leaving your device</li>
<li><strong>Zero-knowledge proofs</strong> - Prove computation without revealing inputs</li>
<li><strong>Secure enclaves</strong> - Computations run in isolated, verified environments</li>
<li><strong>No data retention</strong> - Providers cannot access or store your data</li>
<li><strong>Audit trails</strong> - Full transparency on blockchain</li>
</ul>
<h3>Compliance</h3>
<ul>
<li>GDPR compliant</li>
<li>SOC 2 Type II certified</li>
<li>HIPAA eligible</li>
<li>ISO 27001 certified</li>
</ul>
</section>
<!-- Best Practices -->
<section class="content-section">
<h2>Best Practices</h2>
<h3>Optimizing Performance</h3>
<ul>
<li>Use appropriate model sizes for your task</li>
<li>Batch requests when possible</li>
<li>Enable caching for repeated queries</li>
<li>Choose the right privacy level for your needs</li>
<li>Monitor your usage and costs</li>
</ul>
<h3>Security Tips</h3>
<ul>
<li>Keep your API keys secure</li>
<li>Use environment variables for credentials</li>
<li>Enable two-factor authentication</li>
<li>Regularly rotate your keys</li>
<li>Use VPN for additional privacy</li>
</ul>
<h3>Cost Optimization</h3>
<ul>
<li>Start with smaller models for testing</li>
<li>Use streaming for long responses</li>
<li>Set appropriate limits and timeouts</li>
<li>Monitor token usage</li>
<li>Consider subscription plans for regular use</li>
</ul>
</section>
<!-- Support -->
<section class="content-section">
<h2>Support & Resources</h2>
<h3>Getting Help</h3>
<ul>
<li><strong>Documentation</strong>: <a href="full-documentation.html">Full API reference</a></li>
<li><strong>Community</strong>: <a href="https://discord.gg/aitbc">Join our Discord</a></li>
<li><strong>Email</strong>: <a href="mailto:andreas.fleckl@bubuit.net">andreas.fleckl@bubuit.net</a></li>
<li><strong>Status</strong>: <a href="https://status.aitbc.bubuit.net">System status</a></li>
</ul>
<h3>Tutorials</h3>
<ul>
<li><a href="miners.html">Getting Started with AI Inference</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development/4_examples.md" target="_blank">Building a Chat Application</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development/4_examples.md" target="_blank">Image Generation Guide</a></li>
<li><a href="full-documentation.html#security">Privacy-Preserving ML</a></li>
<li><a href="api.html">API Integration Best Practices</a></li>
</ul>
<h3>Examples</h3>
<ul>
<li><a href="https://github.com/oib/AITBC" target="_blank">GitHub Repository</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development/4_examples.md" target="_blank">Code Examples</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development" target="_blank">Sample Applications</a></li>
<li><a href="developers.html">SDK Documentation</a></li>
</ul>
</section>
<!-- FAQ -->
<section class="content-section">
<h2>Frequently Asked Questions</h2>
<div class="alert alert-info">
<strong>Question not answered?</strong> Contact us at <a href="mailto:andreas.fleckl@bubuit.net">andreas.fleckl@bubuit.net</a>
</div>
<h3>General</h3>
<ul>
<li><strong>How do I get started?</strong> - Sign up for an account, connect your wallet, and submit your first job through the web interface or API.</li>
<li><strong>What models are available?</strong> - We support GPT-3.5/4, Claude, Llama, Stable Diffusion, and many custom models.</li>
<li><strong>Can I use my own model?</strong> - Yes, you can upload and run private models with full confidentiality.</li>
</ul>
<h3>Privacy</h3>
<ul>
<li><strong>Is my data private?</strong> - Absolutely. Your data is encrypted and never exposed to providers.</li>
<li><strong>How do ZK proofs work?</strong> - They prove computation was done correctly without revealing inputs.</li>
<li><strong>Can you see my prompts?</strong> - No, prompts are encrypted and processed in secure enclaves.</li>
</ul>
<h3>Technical</h3>
<ul>
<li><strong>What's the response time?</strong> - Most jobs complete in 1-5 seconds depending on complexity.</li>
<li><strong>Do you support streaming?</strong> - Yes, streaming is available for real-time applications.</li>
<li><strong>Can I run batch jobs?</strong> - Yes, batch processing is supported for large workloads.</li>
</ul>
<h3>Billing</h3>
<ul>
<li><strong>How am I billed?</strong> - Pay-per-use or monthly subscription options available.</li>
<li><strong>Can I set spending limits?</strong> - Yes, you can set daily/monthly limits in your dashboard.</li>
<li><strong>Do you offer refunds?</strong> - Yes, we offer refunds for service issues within 30 days.</li>
</ul>
</section>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer> <script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,199 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Platform Components - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<span>Platform Components</span>
</div>
<!-- Back Button -->
<a href="index.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Documentation
</a>
<!-- Header -->
<div class="doc-header">
<h1>Architecture &amp; Components</h1>
<p>Explore the core components and system architecture of the AITBC platform</p>
</div>
<!-- Component Cards -->
<div class="components-grid">
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<strong>System Flow:</strong> See the <a href="flowchart.html">complete system flow diagram</a> to understand how all components interact in the AITBC architecture.
</div>
<!-- Blockchain Node -->
<div class="component-card">
<div class="component-icon">
<i class="fas fa-cube"></i>
</div>
<h3>Blockchain Node</h3>
<p>PoA/PoS consensus with REST/WebSocket RPC, real-time gossip layer, and comprehensive observability. Production-ready with devnet tooling.</p>
<div class="component-status live">
<i class="fas fa-circle"></i> Live
</div>
<a href="blockchain-node.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
<!-- Coordinator API -->
<div class="component-card">
<div class="component-icon">
<i class="fas fa-server"></i>
</div>
<h3>Coordinator API</h3>
<p>FastAPI service for job submission, miner registration, and receipt management. SQLite persistence with comprehensive endpoints.</p>
<div class="component-status live">
<i class="fas fa-circle"></i> Live
</div>
<a href="coordinator-api.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
<!-- Marketplace Web -->
<div class="component-card">
<div class="component-icon">
<i class="fas fa-store"></i>
</div>
<h3>Marketplace Web</h3>
<p>Vite/TypeScript marketplace with offer/bid functionality, stats dashboard, and mock/live data toggle. Production UI ready.</p>
<div class="component-status live">
<i class="fas fa-circle"></i> Live
</div>
<a href="marketplace-web.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
<!-- Explorer Web -->
<div class="component-card">
<div class="component-icon">
<i class="fas fa-search"></i>
</div>
<h3>Explorer Web</h3>
<p>Full-featured blockchain explorer with blocks, transactions, addresses, and receipts tracking. Responsive design with live data.</p>
<div class="component-status live">
<i class="fas fa-circle"></i> Live
</div>
<a href="explorer-web.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
<!-- Wallet Daemon -->
<div class="component-card">
<div class="component-icon">
<i class="fas fa-wallet"></i>
</div>
<h3>Wallet Daemon</h3>
<p>Encrypted keystore with Argon2id + XChaCha20-Poly1305, REST/JSON-RPC APIs, and receipt verification capabilities.</p>
<div class="component-status live">
<i class="fas fa-circle"></i> Live
</div>
<a href="wallet-daemon.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
<!-- Trade Exchange -->
<div class="component-card">
<div class="component-icon">
<i class="fas fa-exchange-alt"></i>
</div>
<h3>Trade Exchange</h3>
<p>Bitcoin-to-AITBC exchange with QR payments, user management, and real-time trading. Buy tokens with BTC instantly.</p>
<div class="component-status live">
<i class="fas fa-circle"></i> Live
</div>
<a href="trade-exchange.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
<!-- Pool Hub -->
<div class="component-card">
<div class="component-icon">
<i class="fas fa-swimming-pool"></i>
</div>
<h3>Pool Hub</h3>
<p>Miner registry with scoring engine, Redis/PostgreSQL backing, and comprehensive metrics. Live matching API deployed.</p>
<div class="component-status live">
<i class="fas fa-circle"></i> Live
</div>
<a href="pool-hub.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
</div>
<!-- Architecture Overview -->
<section class="section">
<h2>Architecture Overview</h2>
<p>The AITBC platform consists of 7 core components working together to provide a complete AI blockchain computing solution:</p>
<div class="mt-4">
<h3>Infrastructure Layer</h3>
<ul>
<li><strong>Blockchain Node</strong> - Distributed ledger with PoA/PoS consensus</li>
<li><strong>Coordinator API</strong> - Job orchestration and management</li>
<li><strong>Wallet Daemon</strong> - Secure wallet management</li>
</ul>
<h3>Application Layer</h3>
<ul>
<li><strong>Marketplace Web</strong> - GPU compute marketplace</li>
<li><strong>Trade Exchange</strong> - Token trading platform</li>
<li><strong>Explorer Web</strong> - Blockchain explorer</li>
<li><strong>Pool Hub</strong> - Miner coordination service</li>
</ul>
</div>
</section>
<!-- Quick Links -->
<section class="section">
<h2>Quick Links</h2>
<div class="quicklink-grid">
<a href="../Exchange/">
<i class="fas fa-exchange-alt"></i> Trade Exchange
</a>
<a href="../marketplace/">
<i class="fas fa-store"></i> Marketplace
</a>
<a href="../explorer/">
<i class="fas fa-search"></i> Explorer
</a>
<a href="../api/docs">
<i class="fas fa-code"></i> API Docs
</a>
</div>
</section>
</div>
</main>
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,245 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Coordinator API - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="components.html">Components</a>
<span></span>
<span>Coordinator API</span>
</div>
<!-- Back Button -->
<a href="components.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Components
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-server"></i> Coordinator API</h1>
<p>FastAPI service for job submission, miner registration, and receipt management with SQLite persistence</p>
<span class="status-badge live">● Live</span>
</div>
<!-- Overview -->
<section class="content-section">
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<strong>System Flow:</strong> See the <a href="flowchart.html">complete system flow diagram</a> to understand how the coordinator API fits into the overall AITBC architecture.
</div>
<h2>Overview</h2>
<p>The Coordinator API is the central orchestration layer that manages job distribution between clients and miners in the AITBC network. It handles job submissions, miner registrations, and tracks all computation receipts.</p>
<h3>Key Features</h3>
<ul>
<li>Job submission and tracking</li>
<li>Miner registration and heartbeat monitoring</li>
<li>Receipt management and verification</li>
<li>User management with wallet-based authentication</li>
<li>SQLite persistence with SQLModel ORM</li>
<li>Comprehensive API documentation with OpenAPI</li>
</ul>
</section>
<!-- Architecture -->
<section class="content-section">
<h2>Architecture</h2>
<p>The Coordinator API follows a clean architecture with separation of concerns for domain models, API routes, and business logic.</p>
<div class="feature-grid">
<div class="feature-card">
<h4>API Layer</h4>
<p>FastAPI routers for clients, miners, admin, and users</p>
</div>
<div class="feature-card">
<h4>Domain Models</h4>
<p>SQLModel definitions for jobs, miners, receipts, users</p>
</div>
<div class="feature-card">
<h4>Business Logic</h4>
<p>Service layer handling job orchestration</p>
</div>
<div class="feature-card">
<h4>Persistence</h4>
<p>SQLite database with Alembic migrations</p>
</div>
</div>
</section>
<!-- API Reference -->
<section class="content-section">
<h2>API Reference</h2>
<p>The Coordinator API provides RESTful endpoints for all major operations.</p>
<h3>Client Endpoints</h3>
<div class="api-endpoint">
<code>POST /v1/client/jobs</code>
<p>Submit a new computation job</p>
</div>
<div class="api-endpoint">
<code>GET /v1/client/jobs/{job_id}/status</code>
<p>Get job status and progress</p>
</div>
<div class="api-endpoint">
<code>GET /v1/client/jobs/{job_id}/receipts</code>
<p>Retrieve computation receipts</p>
</div>
<h3>Miner Endpoints</h3>
<div class="api-endpoint">
<code>POST /v1/miner/register</code>
<p>Register as a compute provider</p>
</div>
<div class="api-endpoint">
<code>POST /v1/miner/heartbeat</code>
<p>Send miner heartbeat</p>
</div>
<div class="api-endpoint">
<code>GET /v1/miner/jobs</code>
<p>Fetch available jobs</p>
</div>
<div class="api-endpoint">
<code>POST /v1/miner/result</code>
<p>Submit job result</p>
</div>
<h3>User Management</h3>
<div class="api-endpoint">
<code>POST /v1/users/login</code>
<p>Login or register with wallet</p>
</div>
<div class="api-endpoint">
<code>GET /v1/users/me</code>
<p>Get current user profile</p>
</div>
<div class="api-endpoint">
<code>GET /v1/users/{user_id}/balance</code>
<p>Get user wallet balance</p>
</div>
<h3>Exchange Endpoints</h3>
<div class="api-endpoint">
<code>POST /v1/exchange/create-payment</code>
<p>Create Bitcoin payment request</p>
</div>
<div class="api-endpoint">
<code>GET /v1/exchange/payment-status/{id}</code>
<p>Check payment status</p>
</div>
</section>
<!-- Authentication -->
<section class="content-section">
<h2>Authentication</h2>
<p>The API uses API key authentication for clients and miners, and session-based authentication for users.</p>
<h3>API Keys</h3>
<pre><code>X-Api-Key: your-api-key-here</code></pre>
<h3>Session Tokens</h3>
<pre><code>X-Session-Token: sha256-token-here</code></pre>
<h3>Example Request</h3>
<pre><code>curl -X POST "https://aitbc.bubuit.net/api/v1/client/jobs" \
-H "X-Api-Key: your-key" \
-H "Content-Type: application/json" \
-d '{
"job_type": "llm_inference",
"parameters": {...}
}'</code></pre>
</section>
<!-- Configuration -->
<section class="content-section">
<h2>Configuration</h2>
<p>The Coordinator API can be configured via environment variables.</p>
<h3>Environment Variables</h3>
<pre><code># Database
DATABASE_URL=sqlite:///coordinator.db
# API Settings
API_HOST=0.0.0.0
API_PORT=8000
# Security
SECRET_KEY=your-secret-key
API_KEYS=key1,key2,key3
# Exchange
BITCOIN_ADDRESS=tb1qxy2...
BTC_TO_AITBC_RATE=100000</code></pre>
</section>
<!-- Deployment -->
<section class="content-section">
<h2>Deployment</h2>
<p>The Coordinator API runs in a Docker container with nginx proxy.</p>
<h3>Docker Deployment</h3>
<pre><code># Build image
docker build -t aitbc-coordinator .
# Run container
docker run -d \
--name aitbc-coordinator \
-p 8000:8000 \
-e DATABASE_URL=sqlite:///data/coordinator.db \
-v $(pwd)/data:/app/data \
aitbc-coordinator</code></pre>
<h3>Systemd Service</h3>
<pre><code># Start service
sudo systemctl start aitbc-coordinator
# Check status
sudo systemctl status aitbc-coordinator
# View logs
sudo journalctl -u aitbc-coordinator -f</code></pre>
</section>
<!-- API Documentation -->
<section class="content-section">
<h2>Interactive API Documentation</h2>
<p>Interactive API documentation is available via Swagger UI and ReDoc.</p>
<ul>
<li><a href="https://aitbc.bubuit.net/api/docs" target="_blank">Swagger UI</a></li>
<li><a href="https://aitbc.bubuit.net/api/redoc" target="_blank">ReDoc</a></li>
<li><a href="https://aitbc.bubuit.net/api/openapi.json" target="_blank">OpenAPI Spec</a></li>
</ul>
</section>
</div>
</main>
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,505 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Developer Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<div class="doc-header">
<span class="audience-badge">For Developers</span>
<h1>Build on AITBC</h1>
<p>Join our developer community and help build the future of decentralized AI</p>
<div class="source-links">
<a href="https://github.com/oib/AITBC/tree/main/docs/8_development" target="_blank"><i class="fas fa-file-alt"></i> Markdown Source: docs/8_development/</a>
<a href="https://github.com/oib/AITBC/tree/main/docs/5_reference" target="_blank"><i class="fas fa-book"></i> Technical Reference: docs/5_reference/</a>
</div>
</div>
<!-- Tech Stack -->
<section class="content-section">
<h2>Technology Stack</h2>
<p>AITBC is built with modern technologies focused on performance and security.</p>
<div class="tech-grid">
<div class="tech-item">
<div class="tech-icon">
<i class="fab fa-rust"></i>
</div>
<div>Rust</div>
</div>
<div class="tech-item">
<div class="tech-icon">
<i class="fab fa-golang"></i>
</div>
<div>Go</div>
</div>
<div class="tech-item">
<div class="tech-icon">
<i class="fab fa-python"></i>
</div>
<div>Python</div>
</div>
<div class="tech-item">
<div class="tech-icon">
<i class="fab fa-js"></i>
</div>
<div>TypeScript</div>
</div>
<div class="tech-item">
<div class="tech-icon">
<i class="fab fa-react"></i>
</div>
<div>React</div>
</div>
<div class="tech-item">
<div class="tech-icon">
<i class="fas fa-database"></i>
</div>
<div>PostgreSQL</div>
</div>
<div class="tech-item">
<div class="tech-icon">
<i class="fas fa-cube"></i>
</div>
<div>Docker</div>
</div>
<div class="tech-item">
<div class="tech-icon">
<i class="fas fa-project-diagram"></i>
</div>
<div>Kubernetes</div>
</div>
</div>
</section>
<!-- Getting Started -->
<section class="content-section">
<h2>Getting Started</h2>
<p>Ready to contribute? Here's how to get started with AITBC development.</p>
<h3>Development Environment Setup</h3>
<div class="step">
<div class="step-number">1</div>
<div class="step-content">
<h4>Fork & Clone</h4>
<div class="code-block">
# Fork the repository on GitHub
git clone https://github.com/YOUR_USERNAME/AITBC.git
cd aitbc
# Add upstream remote
git remote add upstream https://github.com/oib/AITBC.git</div>
</div>
</div>
<div class="step">
<div class="step-number">2</div>
<div class="step-content">
<h4>Install Dependencies</h4>
<div class="code-block">
# Install development dependencies
./scripts/install-dev-deps.sh
# Setup pre-commit hooks
pre-commit install</div>
</div>
</div>
<div class="step">
<div class="step-number">3</div>
<div class="step-content">
<h4>Build & Run</h4>
<div class="code-block">
# Build all components
make build
# Start development environment
make dev-up
# Run tests
make test</div>
</div>
</div>
<div class="step">
<div class="step-number">4</div>
<div class="step-content">
<h4>Create Your Branch</h4>
<div class="code-block">
# Create feature branch
git checkout -b feature/your-feature-name
# Make your changes...
# Commit with proper message
git commit -m "feat: add your feature description"</div>
</div>
</div>
<div class="step">
<div class="step-number">5</div>
<div class="step-content">
<h4>Submit PR</h4>
<div class="code-block">
# Push to your fork
git push origin feature/your-feature-name
# Create pull request on Gitea
# Fill PR template and submit</div>
</div>
</div>
</section>
<!-- Contribution Areas -->
<section class="content-section">
<h2>Contribution Areas</h2>
<p>There are many ways to contribute to AITBC. Find the area that matches your skills!</p>
<div class="contribution-grid">
<div class="contribution-card">
<h4><i class="fas fa-cogs"></i> Core Protocol</h4>
<ul>
<li>Consensus mechanism improvements</li>
<li>Cryptographic implementations</li>
<li>Performance optimizations</li>
<li>Security enhancements</li>
<li>Sharding implementations</li>
</ul>
<p><strong>Skills:</strong> Rust, Go, Cryptography, Distributed Systems</p>
</div>
<div class="contribution-card">
<h4><i class="fas fa-brain"></i> AI/ML Integration</h4>
<ul>
<li>Model optimization</li>
<li>ZK proof generation</li>
<li>Secure enclaves</li>
<li>Privacy-preserving ML</li>
<li>Autonomous agents</li>
</ul>
<p><strong>Skills:</strong> Python, TensorFlow, PyTorch, ZK-SNARKs</p>
</div>
<div class="contribution-card">
<h4><i class="fas fa-code"></i> Developer Tools</h4>
<ul>
<li>SDK development</li>
<li>CLI tools</li>
<li>Testing frameworks</li>
<li>Documentation</li>
<li>IDE plugins</li>
</ul>
<p><strong>Skills:</strong> TypeScript, Python, Go, Documentation</p>
</div>
<div class="contribution-card">
<h4><i class="fas fa-palette"></i> Frontend & UI</h4>
<ul>
<li>Marketplace interface</li>
<li>Wallet UI</li>
<li>Developer dashboard</li>
<li>Mobile apps</li>
<li>Design system</li>
</ul>
<p><strong>Skills:</strong> React, TypeScript, CSS, Design</p>
</div>
<div class="contribution-card">
<h4><i class="fas fa-shield-alt"></i> Security</h4>
<ul>
<li>Security audits</li>
<li>Penetration testing</li>
<li>Bug bounty</li>
<li>Security tools</li>
<li>Threat modeling</li>
</ul>
<p><strong>Skills:</strong> Security, Auditing, Cryptography</p>
</div>
<div class="contribution-card">
<h4><i class="fas fa-book"></i> Documentation</h4>
<ul>
<li>Technical guides</li>
<li>Tutorials</li>
<li>API docs</li>
<li>Blog posts</li>
<li>Translations</li>
</ul>
<p><strong>Skills:</strong> Writing, Technical Communication</p>
</div>
</div>
</section>
<!-- Development Guidelines -->
<section class="content-section">
<h2>Development Guidelines</h2>
<h3>Code Standards</h3>
<ul>
<li>Follow language-specific style guides (rustfmt, gofmt, PEP8)</li>
<li>Write comprehensive tests for new features</li>
<li>Document all public APIs and complex logic</li>
<li>Keep pull requests focused and small</li>
<li>Use clear and descriptive commit messages</li>
</ul>
<h3>Testing Requirements</h3>
<div class="code-block">
# Run all tests
make test
# Run with coverage
make test-coverage
# Run integration tests
make test-integration
# Run benchmarks
make benchmark</div>
<h3>Code Review Process</h3>
<ul>
<li>All changes require review</li>
<li>At least one approval needed</li>
<li>CI must pass</li>
<li>Documentation updated</li>
<li>Tests added/updated</li>
</ul>
<div class="alert alert-info">
<strong>Pro Tip:</strong> Join our Discord #dev channel for real-time help and discussions!
</div>
</section>
<!-- Bounties & Grants -->
<section class="content-section">
<h2>Bounties & Grants</h2>
<p>Get paid to contribute to AITBC!</p>
<h3>Open Bounties</h3>
<ul>
<li><strong>$500</strong> - Implement REST API rate limiting</li>
<li><strong>$750</strong> - Add Python async SDK support</li>
<li><strong>$1000</strong> - Optimize ZK proof generation</li>
<li><strong>$1500</strong> - Implement cross-chain bridge</li>
<li><strong>$2000</strong> - Build mobile wallet app</li>
</ul>
<h3>Research Grants</h3>
<ul>
<li><strong>$5000</strong> - Novel consensus mechanisms</li>
<li><strong>$7500</strong> - Privacy-preserving ML</li>
<li><strong>$10000</strong> - Quantum-resistant cryptography</li>
</ul>
<h3>How to Apply</h3>
<ol>
<li>Check open issues on Gitea</li>
<li>Comment on the issue you want to work on</li>
<li>Submit your solution</li>
<li>Get reviewed by core team</li>
<li>Receive payment in AITBC tokens</li>
</ol>
<div class="alert alert-success">
<strong>New Contributor Bonus:</strong> First-time contributors get a 20% bonus on their first bounty!
</div>
</section>
<!-- Community -->
<section class="content-section">
<h2>Join the Community</h2>
<h3>Developer Channels</h3>
<ul>
<li><strong>Discord #dev</strong> - General development discussion</li>
<li><strong>Discord #core-dev</strong> - Core protocol discussions</li>
<li><strong>Discord #bounties</strong> - Bounty program updates</li>
<li><strong>Discord #research</strong> - Research discussions</li>
</ul>
<h3>Events & Programs</h3>
<ul>
<li><strong>Weekly Dev Calls</strong> - Every Tuesday 14:00 UTC</li>
<li><strong>Hackathons</strong> - Quarterly with prizes</li>
<li><strong>Office Hours</strong> - Meet the core team</li>
<li><strong>Mentorship Program</strong> - Learn from experienced devs</li>
</ul>
<h3>Recognition</h3>
<ul>
<li>Top contributors featured on website</li>
<li>Monthly contributor rewards</li>
<li>Special Discord roles</li>
<li>Annual developer summit invitation</li>
<li>Swag and merchandise</li>
</ul>
</section>
<!-- Resources -->
<section class="content-section">
<h2>Developer Resources</h2>
<h3>Documentation</h3>
<ul>
<li><a href="full-documentation.html">Full API Documentation</a></li>
<li><a href="components.html">Architecture Guide</a></li>
<li><a href="full-documentation.html#architecture">Protocol Specification</a></li>
<li><a href="full-documentation.html#security">Security Best Practices</a></li>
</ul>
<h3>Tools & SDKs</h3>
<ul>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development/5_developer-guide.md" target="_blank">Python SDK</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development/5_developer-guide.md" target="_blank">JavaScript SDK</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development" target="_blank">Go SDK</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development" target="_blank">Rust SDK</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/5_reference/1_cli-reference.md" target="_blank">CLI Tools</a></li>
</ul>
<h3>Development Environment</h3>
<ul>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/7_deployment" target="_blank">Docker Compose Setup</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/4_blockchain/1_quick-start.md" target="_blank">Local Testnet</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/4_blockchain" target="_blank">Faucet for Test Tokens</a></li>
<li><a href="explorer-web.html">Block Explorer</a></li>
</ul>
<h3>Learning Resources</h3>
<ul>
<li><a href="https://github.com/oib/AITBC" target="_blank">Video Tutorials</a></li>
<li><a href="https://github.com/oib/AITBC" target="_blank">Workshop Materials</a></li>
<li><a href="https://github.com/oib/AITBC" target="_blank">Blog Posts</a></li>
<li><a href="https://github.com/oib/AITBC" target="_blank">Research Papers</a></li>
</ul>
</section>
<!-- Contributing Code Example -->
<section class="content-section">
<h2>Example: Adding a New API Endpoint</h2>
<p>The coordinator-api uses Python with FastAPI. Here's how to add a new endpoint:</p>
<h3>1. Define the Schema</h3>
<div class="code-block">
# File: coordinator-api/src/app/schemas.py
from pydantic import BaseModel
from typing import Optional
class NewFeatureRequest(BaseModel):
"""Request model for new feature."""
name: str
value: int
options: Optional[dict] = None
class NewFeatureResponse(BaseModel):
"""Response model for new feature."""
id: str
status: str
result: dict</div>
<h3>2. Create the Router</h3>
<div class="code-block">
# File: coordinator-api/src/app/routers/new_feature.py
from fastapi import APIRouter, Depends, HTTPException
from ..schemas import NewFeatureRequest, NewFeatureResponse
from ..services.new_feature import NewFeatureService
router = APIRouter(prefix="/v1/features", tags=["features"])
@router.post("/", response_model=NewFeatureResponse)
async def create_feature(
request: NewFeatureRequest,
service: NewFeatureService = Depends()
):
"""Create a new feature."""
try:
result = await service.process(request)
return NewFeatureResponse(
id=result.id,
status="success",
result=result.data
)
except ValueError as e:
raise HTTPException(status_code=400, detail=str(e))</div>
<h3>3. Write Tests</h3>
<div class="code-block">
# File: coordinator-api/tests/test_new_feature.py
import pytest
from fastapi.testclient import TestClient
from src.app.main import app
client = TestClient(app)
def test_create_feature_success():
"""Test successful feature creation."""
response = client.post(
"/v1/features/",
json={"name": "test", "value": 123}
)
assert response.status_code == 200
data = response.json()
assert data["status"] == "success"
assert "id" in data
def test_create_feature_invalid():
"""Test validation error."""
response = client.post(
"/v1/features/",
json={"name": ""} # Missing required field
)
assert response.status_code == 422</div>
<div class="alert alert-info">
<strong>💡 Pro Tip:</strong> Run <code>make test</code> locally before pushing. The CI pipeline will also run all tests automatically on your PR.
</div>
</section>
<!-- FAQ -->
<section class="content-section">
<h2>Frequently Asked Questions</h2>
<h3>General</h3>
<ul>
<li><strong>How do I start contributing?</strong> - Check our "Getting Started" guide and pick an issue that interests you.</li>
<li><strong>Do I need to sign anything?</strong> - Yes, you'll need to sign our CLA (Contributor License Agreement).</li>
<li><strong>Can I be paid for contributions?</strong> - Yes! Check our bounty program or apply for grants.</li>
</ul>
<h3>Technical</h3>
<ul>
<li><strong>What's the tech stack?</strong> - Rust for blockchain, Go for services, Python for AI, TypeScript for frontend.</li>
<li><strong>How do I run tests?</strong> - Use `make test` or check specific component documentation.</li>
<li><strong>Where can I ask questions?</strong> - Discord #dev channel is the best place.</li>
</ul>
<h3>Process</h3>
<ul>
<li><strong>How long does PR review take?</strong> - Usually 1-3 business days.</li>
<li><strong>Can I work on multiple issues?</strong> - Yes, but keep PRs focused on single features.</li>
<li><strong>What if my PR is rejected?</strong> - We'll provide feedback and guidance for resubmission.</li>
</ul>
</section>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer> <script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,203 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Explorer Web - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="components.html">Components</a>
<span></span>
<span>Explorer Web</span>
</div>
<!-- Back Button -->
<a href="components.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Components
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-search"></i> Explorer Web</h1>
<p>Full-featured blockchain explorer with blocks, transactions, addresses, and receipts tracking. Responsive design with live data.</p>
<span class="status-badge">● Live</span>
</div>
<!-- Overview -->
<section class="content-section">
<h2>Overview</h2>
<p>The AITBC Explorer Web provides a comprehensive view of the blockchain, allowing users to track blocks, transactions, addresses, and AI computation receipts in real-time.</p>
<h3>Key Features</h3>
<ul>
<li>Real-time block and transaction tracking</li>
<li>Address balance and transaction history</li>
<li>AI computation receipt verification</li>
<li>Search functionality for blocks, transactions, and addresses</li>
<li>Responsive design for all devices</li>
<li>Live data updates via WebSocket</li>
</ul>
</section>
<!-- Architecture -->
<section class="content-section">
<h2>Architecture</h2>
<p>The explorer is built as a modern single-page application:</p>
<div class="feature-grid">
<div class="feature-card">
<h4><i class="fas fa-paint-brush"></i> Frontend</h4>
<p>React with TypeScript for type safety</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-plug"></i> API Integration</h4>
<p>Direct blockchain RPC API connection</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-sync"></i> Real-time Updates</h4>
<p>WebSocket for live block updates</p>
</div>
<div class="feature-card">
<i class="fas fa-mobile-alt"></i> Responsive</h4>
<p>Mobile-first responsive design</p>
</div>
</div>
</section>
<!-- Features -->
<section class="content-section">
<h2>Features</h2>
<h3>Block Explorer</h3>
<ul>
<li>Latest blocks list with timestamps</li>
<li>Detailed block view with transactions</li>
<li>Block validation status</li>
<li>Block size and gas metrics</li>
</ul>
<h3>Transaction Tracker</h3>
<ul>
<li>Transaction details and status</li>
<li>Input/output addresses</li>
<li>Gas fees and confirmations</li>
<li>Transaction mempool status</li>
</ul>
<h3>Address Viewer</h3>
<ul>
<li>Address balance and history</li>
<li>Transaction list per address</li>
<li>QR code generation</li>
<li>Address labeling</li>
</ul>
<h3>AI Receipt Explorer</h3>
<ul>
<li>Computation receipt details</li>
<li>ZK-proof verification</li>
<li>Job metadata and results</li>
<li>Miner rewards tracking</li>
</ul>
</section>
<!-- API Integration -->
<section class="content-section">
<h2>API Integration</h2>
<p>The explorer connects directly to the blockchain node RPC API:</p>
<pre><code>// Get latest blocks
GET /rpc/get_latest_blocks?limit=50
// Get block by height
GET /rpc/get_block/{height}
// Get transaction by hash
GET /rpc/get_transaction/{hash}
// Get address info
GET /rpc/get_address/{address}
// WebSocket subscription
ws://localhost:9081/ws
{
"method": "subscribe",
"params": ["new_blocks", "new_transactions"]
}</code></pre>
</section>
<!-- Deployment -->
<section class="content-section">
<h2>Deployment</h2>
<h3>Docker Deployment</h3>
<pre><code># Build explorer image
docker build -t aitbc/explorer-web .
# Run with nginx
docker run -d \
-p 80:80 \
-e API_URL=http://blockchain-node:9080 \
-e WS_URL=ws://blockchain-node:9081 \
aitbc/explorer-web</code></pre>
<h3>Configuration</h3>
<pre><code># Environment variables
API_URL=http://localhost:9080
WS_URL=ws://localhost:9081
NETWORK_NAME=mainnet
CACHE_TTL=300</code></pre>
</section>
<!-- Development -->
<section class="content-section">
<h2>Development</h2>
<h3>Local Development</h3>
<pre><code># Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Run tests
npm test</code></pre>
<h3>Project Structure</h3>
<pre><code>explorer-web/
├── src/
│ ├── components/ # React components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom hooks
│ ├── services/ # API services
│ └── utils/ # Utilities
├── public/
├── package.json
└── Dockerfile</code></pre>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,486 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>System Flow - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<span>System Flow</span>
</div>
<!-- Back Button -->
<a href="index.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Documentation
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-sitemap"></i> AITBC System Flow</h1>
<p>Complete flow of a job submission through the CLI client, detailing each system component, message, RPC call, and port involved.</p>
</div>
<!-- Overview Diagram -->
<section class="content-section">
<h2>Overview Diagram</h2>
<div style="background: #f8fafc; padding: 2rem; border-radius: 8px; overflow-x: auto;">
<div style="display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-family: monospace;">
<div style="background: #3b82f6; color: white; padding: 0.5rem 1rem; border-radius: 4px; white-space: nowrap;">CLI Wrapper</div>
<div style="color: #64748b;"></div>
<div style="background: #10b981; color: white; padding: 0.5rem 1rem; border-radius: 4px; white-space: nowrap;">Client Python</div>
<div style="color: #64748b;"></div>
<div style="background: #f59e0b; color: white; padding: 0.5rem 1rem; border-radius: 4px; white-space: nowrap;">Coordinator</div>
<div style="color: #64748b;"></div>
<div style="background: #ef4444; color: white; padding: 0.5rem 1rem; border-radius: 4px; white-space: nowrap;">Blockchain</div>
<div style="color: #64748b;"></div>
<div style="background: #8b5cf6; color: white; padding: 0.5rem 1rem; border-radius: 4px; white-space: nowrap;">Miner</div>
<div style="color: #64748b;"></div>
<div style="background: #06b6d4; color: white; padding: 0.5rem 1rem; border-radius: 4px; white-space: nowrap;">Ollama</div>
</div>
<div style="font-size: 0.85rem; color: #64748b; text-align: center; margin-top: 1rem;">
<div>(aitbc-cli.sh) → (client.py) → (port 18000) → (RPC:26657) → (port 18001) → (port 11434)</div>
</div>
</div>
<h3 style="margin-top: 2rem;">Component Interactions</h3>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1.5rem;">
<div style="background: #f1f5f9; padding: 1.5rem; border-radius: 8px; border-left: 4px solid #3b82f6;">
<h4 style="margin-top: 0; color: #1e40af;">1. Job Submission</h4>
<p style="margin-bottom: 0; color: #475569;">User submits CLI command → Python client formats request → HTTP POST to Coordinator</p>
</div>
<div style="background: #f1f5f9; padding: 1.5rem; border-radius: 8px; border-left: 4px solid #f59e0b;">
<h4 style="margin-top: 0; color: #92400e;">2. Job Processing</h4>
<p style="margin-bottom: 0; color: #475569;">Coordinator validates → Creates blockchain transaction → Queues for miner</p>
</div>
<div style="background: #f1f5f9; padding: 1.5rem; border-radius: 8px; border-left: 4px solid #8b5cf6;">
<h4 style="margin-top: 0; color: #5b21b6;">3. AI Inference</h4>
<p style="margin-bottom: 0; color: #475569;">Miner receives job → Sends to Ollama → Processes on GPU → Returns result</p>
</div>
<div style="background: #f1f5f9; padding: 1.5rem; border-radius: 8px; border-left: 4px solid #ef4444;">
<h4 style="margin-top: 0; color: #991b1b;">4. Verification</h4>
<p style="margin-bottom: 0; color: #475569;">Result verified → Receipt generated → Recorded on blockchain → Client notified</p>
</div>
</div>
</section>
<!-- Detailed Flow Sequence -->
<section class="content-section">
<h2>Detailed Flow Sequence</h2>
<h3>1. CLI Wrapper Execution</h3>
<p><strong>User Command:</strong></p>
<pre><code>./scripts/aitbc-cli.sh submit inference --prompt "What is machine learning?" --model llama3.2:latest</code></pre>
<p><strong>Internal Process:</strong></p>
<ol>
<li>Bash script (<span class="inline-code">aitbc-cli.sh</span>) parses arguments</li>
<li>Sets environment variables:
<ul>
<li><span class="inline-code">AITBC_URL=http://127.0.0.1:18000</span></li>
<li><span class="inline-code">CLIENT_KEY=${CLIENT_API_KEY}</span></li>
</ul>
</li>
<li>Calls Python client: <span class="inline-code">python3 cli/client.py --url $AITBC_URL --api-key $CLIENT_KEY submit inference --prompt "..."</span></li>
</ol>
<h3>2. Python Client Processing</h3>
<p><strong>File:</strong> <span class="inline-code">/cli/client.py</span></p>
<p><strong>Steps:</strong></p>
<ol>
<li>Parse command-line arguments</li>
<li>Prepare job submission payload:
<pre><code>{
"type": "inference",
"prompt": "What is machine learning?",
"model": "llama3.2:latest",
"client_key": "${CLIENT_API_KEY}",
"timestamp": "2025-01-29T14:50:00Z"
}</code></pre>
</li>
</ol>
<h3>3. Coordinator API Call</h3>
<div class="http-request">
<h4>HTTP Request:</h4>
<pre><code>POST /v1/jobs
Host: 127.0.0.1:18000
Content-Type: application/json
X-Api-Key: ${CLIENT_API_KEY}
{
"type": "inference",
"prompt": "What is machine learning?",
"model": "llama3.2:latest"
}</code></pre>
</div>
<p><strong>Coordinator Service (Port 18000):</strong></p>
<ol>
<li>Receives HTTP request</li>
<li>Validates API key and job parameters</li>
<li>Generates unique job ID: <span class="inline-code">job_123456</span></li>
<li>Creates job record in database</li>
<li>Returns initial response:
<pre><code>{
"job_id": "job_123456",
"status": "pending",
"submitted_at": "2025-01-29T14:50:01Z"
}</code></pre>
</li>
</ol>
<h3>4. Blockchain Transaction</h3>
<p><strong>Coordinator → Blockchain Node (RPC Port 26657):</strong></p>
<ol>
<li>Coordinator creates blockchain transaction:
<pre><code>{
"type": "submit_job",
"job_id": "job_123456",
"client": "${CLIENT_API_KEY}",
"payload_hash": "abc123...",
"reward": "100aitbc"
}</code></pre>
</li>
<li>RPC Call to blockchain node:
<pre><code>curl -X POST http://127.0.0.1:26657 \
-d '{
"jsonrpc": "2.0",
"method": "broadcast_tx_sync",
"params": {"tx": "base64_encoded_transaction"}
}'</code></pre>
</li>
<li>Blockchain validates and includes transaction in next block</li>
<li>Transaction hash returned: <span class="inline-code">0xdef456...</span></li>
</ol>
<h3>5. Job Queue and Miner Assignment</h3>
<p><strong>Coordinator Internal Processing:</strong></p>
<ol>
<li>Job added to pending queue (Redis/Database)</li>
<li>Miner selection algorithm runs:
<ul>
<li>Check available miners</li>
<li>Select based on stake, reputation, capacity</li>
</ul>
</li>
<li>Selected miner: <span class="inline-code">${MINER_API_KEY}</span></li>
</ol>
<div class="http-request">
<h4>Coordinator → Miner Daemon (Port 18001):</h4>
<pre><code>POST /v1/jobs/assign
Host: 127.0.0.1:18001
Content-Type: application/json
X-Api-Key: ${ADMIN_API_KEY}
{
"job_id": "job_123456",
"job_data": {
"type": "inference",
"prompt": "What is machine learning?",
"model": "llama3.2:latest"
},
"reward": "100aitbc"
}</code></pre>
</div>
<h3>6. Miner Processing</h3>
<p><strong>Miner Daemon (Port 18001):</strong></p>
<ol>
<li>Receives job assignment</li>
<li>Updates job status to <span class="inline-code">running</span></li>
<li>Notifies coordinator:
<pre><code>POST /v1/jobs/job_123456/status
{"status": "running", "started_at": "2025-01-29T14:50:05Z"}</code></pre>
</li>
</ol>
<h3>7. Ollama Inference Request</h3>
<div class="http-request">
<h4>Miner → Ollama Server (Port 11434):</h4>
<pre><code>POST /api/generate
Host: 127.0.0.1:11434
Content-Type: application/json
{
"model": "llama3.2:latest",
"prompt": "What is machine learning?",
"stream": false,
"options": {
"temperature": 0.7,
"num_predict": 500
}
}</code></pre>
</div>
<p><strong>Ollama Processing:</strong></p>
<ol>
<li>Loads model into GPU memory</li>
<li>Processes prompt through neural network</li>
<li>Generates response text</li>
<li>Returns result:
<pre><code>{
"model": "llama3.2:latest",
"response": "Machine learning is a subset of artificial intelligence...",
"done": true,
"total_duration": 12500000000,
"prompt_eval_count": 15,
"eval_count": 150
}</code></pre>
</li>
</ol>
<h3>8. Result Submission to Coordinator</h3>
<div class="http-request">
<h4>Miner → Coordinator (Port 18000):</h4>
<pre><code>POST /v1/jobs/job_123456/complete
Host: 127.0.0.1:18000
Content-Type: application/json
X-Miner-Key: ${MINER_API_KEY}
{
"job_id": "job_123456",
"result": "Machine learning is a subset of artificial intelligence...",
"metrics": {
"compute_time": 12.5,
"tokens_generated": 150,
"gpu_utilization": 0.85
},
"proof": {
"hash": "hash_of_result",
"signature": "miner_signature"
}
}</code></pre>
</div>
<h3>9. Receipt Generation</h3>
<p><strong>Coordinator Processing:</strong></p>
<ol>
<li>Verifies miner's proof</li>
<li>Calculates payment: <span class="inline-code">12.5 seconds × 0.02 AITBC/second = 0.25 AITBC</span></li>
<li>Creates receipt:
<pre><code>{
"receipt_id": "receipt_789",
"job_id": "job_123456",
"client": "${CLIENT_API_KEY}",
"miner": "${MINER_API_KEY}",
"amount_paid": "0.25aitbc",
"result_hash": "hash_of_result",
"block_height": 12345,
"timestamp": "2025-01-29T14:50:18Z"
}</code></pre>
</li>
</ol>
<h3>10. Blockchain Receipt Recording</h3>
<pre><code>Coordinator → Blockchain (RPC Port 26657):
{
"type": "record_receipt",
"receipt": {
"receipt_id": "receipt_789",
"job_id": "job_123456",
"payment": "0.25aitbc"
}
}</code></pre>
<h3>11. Client Polling for Result</h3>
<p><strong>CLI Client Status Check:</strong></p>
<pre><code>./scripts/aitbc-cli.sh status job_123456</code></pre>
<div class="http-request">
<h4>HTTP Request:</h4>
<pre><code>GET /v1/jobs/job_123456
Host: 127.0.0.1:18000
X-Api-Key: ${CLIENT_API_KEY}</code></pre>
<h4>Response:</h4>
<pre><code>{
"job_id": "job_123456",
"status": "completed",
"result": "Machine learning is a subset of artificial intelligence...",
"receipt_id": "receipt_789",
"completed_at": "2025-01-29T14:50:18Z"
}</code></pre>
</div>
<h3>12. Final Output to User</h3>
<p><strong>CLI displays:</strong></p>
<pre><code>Job ID: job_123456
Status: completed
Result: Machine learning is a subset of artificial intelligence...
Receipt: receipt_789
Completed in: 17 seconds
Cost: 0.25 AITBC</code></pre>
</section>
<!-- System Components Summary -->
<section class="content-section">
<h2>System Components Summary</h2>
<table>
<thead>
<tr>
<th>Component</th>
<th>Port</th>
<th>Protocol</th>
<th>Responsibility</th>
</tr>
</thead>
<tbody>
<tr>
<td>CLI Wrapper</td>
<td>N/A</td>
<td>Bash</td>
<td>User interface, argument parsing</td>
</tr>
<tr>
<td>Client Python</td>
<td>N/A</td>
<td>Python</td>
<td>HTTP client, job formatting</td>
</tr>
<tr>
<td>Coordinator</td>
<td>18000</td>
<td>HTTP/REST</td>
<td>Job management, API gateway</td>
</tr>
<tr>
<td>Blockchain Node</td>
<td>26657</td>
<td>JSON-RPC</td>
<td>Transaction processing, consensus</td>
</tr>
<tr>
<td>Miner Daemon</td>
<td>18001</td>
<td>HTTP/REST</td>
<td>Job execution, GPU management</td>
</tr>
<tr>
<td>Ollama Server</td>
<td>11434</td>
<td>HTTP/REST</td>
<td>AI model inference</td>
</tr>
</tbody>
</table>
</section>
<!-- Message Flow Timeline -->
<section class="content-section">
<h2>Message Flow Timeline</h2>
<div class="timeline">0s: User submits CLI command
└─> 0.1s: Python client called
└─> 0.2s: HTTP POST to Coordinator (port 18000)
└─> 0.3s: Coordinator validates and creates job
└─> 0.4s: RPC to Blockchain (port 26657)
└─> 0.5s: Transaction in mempool
└─> 1.0s: Job queued for miner
└─> 2.0s: Miner assigned (port 18001)
└─> 2.1s: Miner accepts job
└─> 2.2s: Ollama request (port 11434)
└─> 14.7s: Inference complete (12.5s processing)
└─> 14.8s: Result to Coordinator
└─> 15.0s: Receipt generated
└─> 15.1s: Receipt on Blockchain
└─> 17.0s: Client polls and gets result</div>
</section>
<!-- Error Handling Paths -->
<section class="content-section">
<h2>Error Handling Paths</h2>
<div class="error-box">
<h4>1. Invalid Prompt</h4>
<ul>
<li>Coordinator returns 400 error</li>
<li>CLI displays error message</li>
</ul>
</div>
<div class="error-box">
<h4>2. Miner Unavailable</h4>
<ul>
<li>Job stays in queue</li>
<li>Timeout after 60 seconds</li>
<li>Job marked as failed</li>
</ul>
</div>
<div class="error-box">
<h4>3. Ollama Error</h4>
<ul>
<li>Miner reports failure to Coordinator</li>
<li>Job marked as failed</li>
<li>No payment deducted</li>
</ul>
</div>
<div class="error-box">
<h4>4. Network Issues</h4>
<ul>
<li>Client retries with exponential backoff</li>
<li>Maximum 3 retries before giving up</li>
</ul>
</div>
</section>
<!-- Security Considerations -->
<section class="content-section">
<h2>Security Considerations</h2>
<ul>
<li><strong>API Keys</strong>: Each request authenticated with X-Api-Key header</li>
<li><strong>Proof of Work</strong>: Miner provides cryptographic proof of computation</li>
<li><strong>Payment Escrow</strong>: Tokens held in smart contract until completion</li>
<li><strong>Rate Limiting</strong>: Coordinator limits requests per client</li>
</ul>
</section>
<!-- Additional Resources -->
<section class="content-section">
<h2>Related Documentation</h2>
<ul>
<li><a href="coordinator-api.html">Coordinator API Documentation</a> - Detailed API reference for the coordinator service</li>
<li><a href="blockchain-node.html">Blockchain Node Documentation</a> - Learn about the blockchain node and RPC API</li>
<li><a href="miners.html">Miner Documentation</a> - Guide to setting up and running a miner</li>
<li><a href="clients.html">Client Documentation</a> - Using the CLI and Python client</li>
<li><a href="components.html">System Components</a> - Overview of all AITBC components</li>
<li><a href="full-documentation.html">Full Documentation</a> - Complete technical documentation</li>
</ul>
</section>
<!-- Monitoring Points -->
<section class="content-section">
<h2>Monitoring Points</h2>
<ul>
<li>Coordinator logs all API calls to <span class="inline-code">/var/log/aitbc/coordinator.log</span></li>
<li>Miner logs GPU utilization to <span class="inline-code">/var/log/aitbc/miner.log</span></li>
<li>Blockchain logs all transactions to <span class="inline-code">/var/log/aitbc/node.log</span></li>
<li>Prometheus metrics available at <span class="inline-code">http://localhost:9090/metrics</span></li>
</ul>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,648 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Full Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<div class="doc-header">
<h1>AITBC Full Documentation</h1>
<p>Complete technical documentation for the AI Training & Blockchain Computing platform</p>
</div>
<div class="doc-grid">
<!-- Sidebar -->
<aside class="sidebar">
<h3>Table of Contents</h3>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#architecture">Architecture</a>
<ul>
<li><a href="#core-components" class="sub-item">Core Components</a></li>
<li><a href="#data-flow" class="sub-item">Data Flow</a></li>
<li><a href="#consensus" class="sub-item">Consensus Mechanism</a></li>
</ul>
</li>
<li><a href="#installation">Installation</a>
<ul>
<li><a href="#prerequisites" class="sub-item">Prerequisites</a></li>
<li><a href="#quick-start" class="sub-item">Quick Start</a></li>
<li><a href="#configuration" class="sub-item">Configuration</a></li>
</ul>
</li>
<li><a href="#apis">APIs</a>
<ul>
<li><a href="#coordinator-api" class="sub-item">Coordinator API</a></li>
<li><a href="#blockchain-api" class="sub-item">Blockchain API</a></li>
<li><a href="#wallet-api" class="sub-item">Wallet API</a></li>
</ul>
</li>
<li><a href="#development">Development</a>
<ul>
<li><a href="#building" class="sub-item">Building</a></li>
<li><a href="#testing" class="sub-item">Testing</a></li>
<li><a href="#contributing" class="sub-item">Contributing</a></li>
</ul>
</li>
<li><a href="#security">Security</a>
<ul>
<li><a href="#threat-model" class="sub-item">Threat Model</a></li>
<li><a href="#audits" class="sub-item">Audits</a></li>
<li><a href="#bug-bounty" class="sub-item">Bug Bounty</a></li>
</ul>
</li>
<li><a href="#reference">Reference</a>
<ul>
<li><a href="#glossary" class="sub-item">Glossary</a></li>
<li><a href="#faq" class="sub-item">FAQ</a></li>
<li><a href="#support" class="sub-item">Support</a></li>
</ul>
</li>
</ul>
<h3 style="margin-top: 2rem;">Markdown Docs</h3>
<ul>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/0_getting_started" target="_blank" class="sub-item">0 Getting Started</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/1_project" target="_blank" class="sub-item">1 Project</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/2_clients" target="_blank" class="sub-item">2 Clients</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/3_miners" target="_blank" class="sub-item">3 Miners</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/4_blockchain" target="_blank" class="sub-item">4 Blockchain</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/5_reference" target="_blank" class="sub-item">5 Reference</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/6_architecture" target="_blank" class="sub-item">6 Architecture</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/7_deployment" target="_blank" class="sub-item">7 Deployment</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/8_development" target="_blank" class="sub-item">8 Development</a></li>
<li><a href="https://github.com/oib/AITBC/tree/main/docs/9_security" target="_blank" class="sub-item">9 Security</a></li>
</ul>
</aside>
<!-- Content -->
<div class="content">
<section id="introduction">
<h1>Introduction</h1>
<p>AITBC (AI Training & Blockchain Computing) is a decentralized platform that combines artificial intelligence and blockchain technology to create a trustless marketplace for AI/ML workloads. The platform enables secure, private, and verifiable computation while maintaining transparency through blockchain technology.</p>
<h2>Key Features</h2>
<ul>
<li><strong>Decentralized Marketplace</strong>: Connect AI service providers with consumers in a trustless environment</li>
<li><strong>Confidential Computing</strong>: Zero-knowledge proofs and secure enclaves protect sensitive data</li>
<li><strong>High Performance</strong>: Sharding and rollups achieve 100,000+ TPS with sub-second finality</li>
<li><strong>Privacy-Preserving</strong>: Advanced cryptography ensures data confidentiality</li>
<li><strong>Token Economics</strong>: Sustainable incentives for all participants</li>
<li><strong>Autonomous Agents</strong>: AI agents can participate as marketplace providers</li>
</ul>
<h2>Use Cases</h2>
<div class="tabs">
<div class="tab-buttons">
<button class="tab-button active" onclick="switchTab('healthcare')">Healthcare</button>
<button class="tab-button" onclick="switchTab('finance')">Finance</button>
<button class="tab-button" onclick="switchTab('research')">Research</button>
</div>
<div id="healthcare" class="tab-content active">
<h4>Healthcare AI</h4>
<p>Secure medical image analysis, drug discovery, and patient data processing while maintaining HIPAA compliance through confidential computing.</p>
</div>
<div id="finance" class="tab-content">
<h4>Financial Services</h4>
<p>Fraud detection, risk assessment, and algorithmic trading with verifiable computation and audit trails.</p>
</div>
<div id="research" class="tab-content">
<h4>Scientific Research</h4>
<p>Collaborative research with data privacy, reproducible results, and fair attribution through blockchain verification.</p>
</div>
</div>
</section>
<section id="architecture">
<h1>Architecture</h1>
<h2 id="core-components">Core Components</h2>
<div class="mermaid">
graph TB
A[Client] --> B[Coordinator API]
B --> C[Blockchain Node]
B --> D[GPU Providers]
C --> E[Consensus Engine]
C --> F[Smart Contracts]
D --> G[ZK Proofs]
F --> H[Receipt Storage]
</div>
<h3>Blockchain Node</h3>
<p>The blockchain node implements a hybrid Proof of Authority/Proof of Stake consensus mechanism with three operational modes:</p>
<ul>
<li><strong>FAST Mode</strong>: 100-200ms finality, up to 50,000 TPS</li>
<li><strong>BALANCED Mode</strong>: 500ms-1s finality, up to 20,000 TPS</li>
<li><strong>SECURE Mode</strong>: 2-5s finality, up to 10,000 TPS</li>
</ul>
<h3>Coordinator API</h3>
<p>The coordinator serves as the central hub for marketplace operations:</p>
<ul>
<li>Job scheduling and management</li>
<li>Receipt verification and storage</li>
<li>Provider registration and reputation tracking</li>
<li>Multi-tenant support with isolation</li>
<li>Real-time metrics and analytics</li>
</ul>
<h3>GPU Service Provider</h3>
<p>Decentralized compute providers offer various AI/ML services:</p>
<ul>
<li>Model inference (text, image, audio, video)</li>
<li>Model training and fine-tuning</li>
<li>Data preprocessing and augmentation</li>
<li>Result verification with ZK proofs</li>
<li>Cross-chain compatibility</li>
</ul>
<h2 id="data-flow">Data Flow</h2>
<div class="mermaid">
sequenceDiagram
participant C as Client
participant API as Coordinator API
participant P as Provider
participant BC as Blockchain
C->>API: Submit Job Request
API->>API: Validate & Match Provider
API->>P: Forward Job
P->>P: Execute Computation
P->>P: Generate ZK Proof
P->>API: Submit Results + Proof
API->>API: Verify Proof
API->>BC: Store Receipt
BC->>C: Notify Completion
C->>API: Retrieve Results
</div>
<h2 id="consensus">Consensus Mechanism</h2>
<p>The hybrid consensus combines the speed of Proof of Authority with the decentralization of Proof of Stake:</p>
<h3>Mode Selection Algorithm</h3>
<pre><code>def determine_mode(network_metrics):
load = network_metrics.utilization
auth_availability = network_metrics.authority_uptime
stake_participation = network_metrics.stake_ratio
if load < 0.3 and auth_availability > 0.9:
return ConsensusMode.FAST
elif load > 0.7 or stake_participation > 0.8:
return ConsensusMode.SECURE
else:
return ConsensusMode.BALANCED</code></pre>
<h3>Validator Selection</h3>
<div class="tabs">
<div class="tab-buttons">
<button class="tab-button active" onclick="switchTab('fast-mode')">FAST Mode</button>
<button class="tab-button" onclick="switchTab('balanced-mode')">BALANCED Mode</button>
<button class="tab-button" onclick="switchTab('secure-mode')">SECURE Mode</button>
</div>
<div id="fast-mode" class="tab-content active">
<h4>Authority-Only Selection</h4>
<ul>
<li>VRF-based random selection from 21 authorities</li>
<li>100ms block time</li>
<li>2/3 signature threshold</li>
</ul>
</div>
<div id="balanced-mode" class="tab-content">
<h4>Hybrid Selection</h4>
<ul>
<li>70% authority, 30% staker selection</li>
<li>500ms block time</li>
<li>2/3 authority + 1/3 stake threshold</li>
</ul>
</div>
<div id="secure-mode" class="tab-content">
<h4>Stake-Weighted Selection</h4>
<ul>
<li>Full stake-weighted selection</li>
<li>2s block time</li>
<li>2/3 stake threshold</li>
</ul>
</div>
</div>
</section>
<section id="installation">
<h1>Installation</h1>
<h2 id="prerequisites">Prerequisites</h2>
<div class="alert alert-info">
<strong>System Requirements:</strong>
<ul>
<li>Linux (Ubuntu 20.04+) or macOS (10.15+)</li>
<li>16GB RAM minimum (32GB recommended)</li>
<li>100GB free storage</li>
<li>Docker 20.10+ and Docker Compose</li>
<li>Node.js 16+ (for frontend development)</li>
<li>Python 3.8+ (for backend development)</li>
<li>Go 1.19+ (for blockchain node)</li>
</ul>
</div>
<h2 id="quick-start">Quick Start</h2>
<h3>Option 1: Docker Compose (Recommended)</h3>
<pre><code># Clone the repository
git clone https://github.com/oib/AITBC.git
cd aitbc
# Copy environment configuration
cp .env.example .env
# Edit .env with your settings
# Start all services
docker-compose up -d
# Check status
docker-compose ps</code></pre>
<h3>Option 2: Manual Installation</h3>
<pre><code># Install dependencies
./scripts/install-dependencies.sh
# Build blockchain node
make build-node
# Build coordinator
make build-coordinator
# Initialize database
./scripts/init-db.sh
# Start services
./scripts/start-all.sh</code></pre>
<h2 id="configuration">Configuration</h2>
<h3>Environment Variables</h3>
<table>
<tr>
<th>Variable</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td>AITBC_NETWORK</td>
<td>Network mode (dev/test/main)</td>
<td>dev</td>
</tr>
<tr>
<td>AITBC_CHAIN_ID</td>
<td>Blockchain chain ID</td>
<td>1337</td>
</tr>
<tr>
<td>AITBC_CONSENSUS_MODE</td>
<td>Consensus mode</td>
<td>BALANCED</td>
</tr>
<tr>
<td>AITBC_DB_URL</td>
<td>Database connection string</td>
<td>postgresql://localhost/aitbc</td>
</tr>
<tr>
<td>AITBC_REDIS_URL</td>
<td>Redis connection string</td>
<td>redis://localhost:6379</td>
</tr>
</table>
<h3>Node Configuration</h3>
<pre><code># config/node.toml
[network]
listen_addr = "0.0.0.0:30303"
discovery_addr = "0.0.0.0:30304"
[consensus]
mode = "BALANCED"
validator_count = 21
stake_minimum = 1000
[storage]
data_dir = "/var/lib/aitbc"
prune = true
prune_threshold = "100GB"</code></pre>
</section>
<section id="apis">
<h1>APIs</h1>
<h2 id="coordinator-api">Coordinator API</h2>
<h3>Authentication</h3>
<p>All API requests require authentication using JWT tokens:</p>
<pre><code>curl -X POST http://localhost:8080/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"address": "0x...", "signature": "0x..."}'</code></pre>
<h3>Endpoints</h3>
<div class="code-group">
<div class="code-group-header">Job Management</div>
<div class="code-group-content">
<pre><code># Create a job
POST /api/v1/jobs
{
"type": "inference",
"model_id": "gpt-4",
"input_data": "Hello, world!",
"requirements": {
"max_tokens": 100,
"temperature": 0.7
}
}
# Get job status
GET /api/v1/jobs/{job_id}
# List jobs
GET /api/v1/jobs?status=pending&limit=10
# Cancel a job
DELETE /api/v1/jobs/{job_id}</code></pre>
</div>
</div>
<div class="code-group">
<div class="code-group-header">Receipt Verification</div>
<div class="code-group-content">
<pre><code># Verify a receipt
POST /api/v1/receipts/verify
{
"receipt_id": "0x...",
"proof": "0x...",
"public_inputs": ["0x..."]
}
# Get receipt details
GET /api/v1/receipts/{receipt_id}</code></pre>
</div>
</div>
<h2 id="blockchain-api">Blockchain API</h2>
<h3>JSON-RPC Endpoints</h3>
<pre><code># Get latest block
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}'
# Send transaction
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x..."],"id":1}'</code></pre>
<h3>WebSocket Subscriptions</h3>
<pre><code># Subscribe to new blocks
ws://localhost:8545
{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}</code></pre>
<h2 id="wallet-api">Wallet API</h2>
<h3>Wallet Operations</h3>
<pre><code># Create wallet
POST /api/v1/wallet/create
{
"password": "secure-password",
"mnemonic_language": "english"
}
# Unlock wallet
POST /api/v1/wallet/unlock
{
"wallet_id": "wallet-uuid",
"password": "secure-password"
}
# Sign transaction
POST /api/v1/wallet/sign
{
"wallet_id": "wallet-uuid",
"transaction": "0x..."
}</code></pre>
</section>
<section id="development">
<h1>Development</h1>
<h2 id="building">Building</h2>
<h3>Prerequisites</h3>
<pre><code># Install build dependencies
sudo apt-get install build-essential libssl-dev
# Install Rust (for blockchain node)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
# Install Go
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz</code></pre>
<h3>Build Components</h3>
<pre><code># Build blockchain node
cd blockchain-node
cargo build --release
# Build coordinator
cd coordinator-api
go build -o bin/coordinator
# Build wallet daemon
cd wallet-daemon
go build -o bin/wallet
# Build frontend
cd marketplace-web
npm install
npm run build</code></pre>
<h2 id="testing">Testing</h2>
<h3>Unit Tests</h3>
<pre><code># Run all tests
make test
# Run specific package tests
make test-unit PACKAGE=coordinator
# Run with coverage
make test-coverage</code></pre>
<h3>Integration Tests</h3>
<pre><code># Start test environment
docker-compose -f docker-compose.test.yml up -d
# Run integration tests
make test-integration
# Clean up
docker-compose -f docker-compose.test.yml down -v</code></pre>
<h3>Load Testing</h3>
<pre><code># Install Locust
pip install locust
# Run load tests
locust -f tests/load/locustfile.py --host=http://localhost:8080</code></pre>
<h2 id="contributing">Contributing</h2>
<p>We welcome contributions! Please see our contributing guide for details.</p>
<h3>Development Workflow</h3>
<ol>
<li>Fork the repository on Gitea</li>
<li>Create a feature branch</li>
<li>Make your changes</li>
<li>Add tests for new functionality</li>
<li>Ensure all tests pass</li>
<li>Submit a pull request</li>
</ol>
<h3>Code Style</h3>
<div class="code-group">
<div class="code-group-header">Rust</div>
<div class="code-group-content">
<pre><code># Format code
cargo fmt
# Run linter
cargo clippy -- -D warnings
# Run audit
cargo audit</code></pre>
</div>
</div>
<div class="code-group">
<div class="code-group-header">Go</div>
<div class="code-group-content">
<pre><code># Format code
go fmt ./...
# Run linter
golangci-lint run
# Run security check
gosec ./...</code></pre>
</div>
</div>
</section>
<section id="security">
<h1>Security</h1>
<h2 id="threat-model">Threat Model</h2>
<p>Our comprehensive threat model covers:</p>
<ul>
<li>Privacy attacks and mitigations</li>
<li>Consensus security</li>
<li>Smart contract vulnerabilities</li>
<li>Network-level attacks</li>
<li>Economic attacks</li>
</ul>
<p>See the full threat modeling document for detailed analysis.</p>
<h2 id="audits">Security Audits</h2>
<div class="alert alert-success">
<strong>Completed Audits:</strong>
<ul>
<li>Trail of Bits (2024) - Smart Contracts</li>
<li>CertiK (2024) - Protocol Security</li>
<li>OpenZeppelin (2023) - Token Economics</li>
</ul>
</div>
<h2 id="bug-bounty">Bug Bounty Program</h2>
<p>We offer rewards up to $100,000 for critical vulnerabilities:</p>
<ul>
<li>Critical: $50,000 - $100,000</li>
<li>High: $10,000 - $50,000</li>
<li>Medium: $1,000 - $10,000</li>
<li>Low: $100 - $1,000</li>
</ul>
<p>Report vulnerabilities at: <a href="mailto:andreas.fleckl@bubuit.net">andreas.fleckl@bubuit.net</a></p>
</section>
<section id="reference">
<h1>Reference</h1>
<h2 id="glossary">Glossary</h2>
<table>
<tr>
<th>Term</th>
<th>Definition</th>
</tr>
<tr>
<td>ZK Proof</td>
<td>Zero-knowledge proof enabling verification without revealing inputs</td>
</tr>
<tr>
<td>Receipt</td>
<td>Cryptographic proof of computation completion</td>
</tr>
<tr>
<td>Provider</td>
<td>Node offering AI/ML computation services</td>
</tr>
<tr>
<td>Coordinator</td>
<td>Central service managing marketplace operations</td>
</tr>
</table>
<h2 id="faq">Frequently Asked Questions</h2>
<h3>General</h3>
<h4>What blockchain does AITBC use?</h4>
<p>AITBC implements its own blockchain with a hybrid consensus mechanism, but supports cross-chain interoperability with Ethereum, Polygon, and BSC.</p>
<h4>How are transactions verified?</h4>
<p>Through a combination of zero-knowledge proofs for privacy and traditional blockchain validation for transparency.</p>
<h3>Technical</h3>
<h4>What programming languages are used?</h4>
<ul>
<li>Rust for blockchain node</li>
<li>Go for coordinator and wallet</li>
<li>TypeScript/React for frontend</li>
<li>Python for AI/ML components</li>
</ul>
<h4>How can I run a node?</h4>
<p>See the installation guide for detailed instructions on running a full node, validator node, or GPU provider.</p>
<h2 id="support">Support</h2>
<p>Get help through:</p>
<ul>
<li>Documentation: <a href="full-documentation.html">Full Documentation</a></li>
<li>Community: <a href="https://discord.gg/aitbc">Discord</a></li>
<li>Issues: <a href="https://github.com/oib/AITBC/issues">GitHub Issues</a></li>
<li>Email: <a href="mailto:andreas.fleckl@bubuit.net">andreas.fleckl@bubuit.net</a></li>
</ul>
</section>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="/js/mermaid.min.js"></script>
<script src="/js/mermaid-init.js"></script>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,232 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../assets/css/docs.css">
<link rel="stylesheet" href="../assets/css/site-header.css">
<link rel="preload" href="../assets/css/font-awesome.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="../assets/css/font-awesome.min.css"></noscript>
<!-- Font Awesome CDN fallback -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" crossorigin="anonymous" media="print" onload="this.media='all'; this.onload=null;">
<title>Documentation - AITBC</title>
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<div class="doc-header">
<h1>Documentation</h1>
<p>Choose your reader level to access tailored documentation for your needs</p>
<div class="announce-banner">
<h3>✅ Latest Update (February 2026)</h3>
<p>Documentation fully restructured! 10 numbered sections from Getting Started to Security, optimized content with merged duplicates, and zero broken links. Plus: end-to-end Ollama GPU inference with RTX 4060 Ti operational.</p>
</div>
</div>
<!-- Search Bar -->
<div class="search-container">
<input type="text" class="search-bar" placeholder="Search documentation..." id="searchInput">
<i class="fas fa-search search-icon"></i>
</div>
<!-- Reader Level Cards -->
<div class="reader-levels">
<!-- Miners Card -->
<div class="reader-card miner">
<div class="reader-icon">
<i class="fas fa-hammer"></i>
</div>
<h3>Miners</h3>
<p>Learn how to mine AITBC tokens and contribute to network security. Perfect for those looking to earn rewards through staking or providing compute power.</p>
<ul class="reader-features">
<li>GPU miner setup with Ollama (RTX 4060 Ti tested)</li>
<li>Systemd service configuration</li>
<li>Hardware requirements & optimization</li>
<li>Real-time job processing & earnings</li>
<li>Performance monitoring & troubleshooting</li>
</ul>
<a href="miners.html" class="btn">Miner Documentation</a>
</div>
<!-- Clients Card -->
<div class="reader-card client">
<div class="reader-icon">
<i class="fas fa-users"></i>
</div>
<h3>Clients</h3>
<p>Use AITBC for your AI/ML workloads with privacy and verifiable computation. Ideal for businesses and developers using AI services.</p>
<ul class="reader-features">
<li>CLI wrapper tool for easy job submission</li>
<li>Job status monitoring & receipt verification</li>
<li>13+ Ollama models available (llama3.2, mistral, deepseek)</li>
<li>Transparent pricing: 0.02 AITBC/gpu_second</li>
<li>Cryptographic receipts & blockchain verification</li>
</ul>
<a href="clients.html" class="btn">Client Documentation</a>
</div>
<!-- Developers Card -->
<div class="reader-card developer">
<div class="reader-icon">
<i class="fas fa-code"></i>
</div>
<h3>Developers</h3>
<p>Build on AITBC and contribute to the protocol. Designed for developers wanting to extend the platform or integrate with it.</p>
<ul class="reader-features">
<li>Development setup</li>
<li>Contribution guidelines</li>
<li>API reference</li>
<li>Bounty programs</li>
<li>Community resources</li>
</ul>
<a href="developers.html" class="btn">Developer Documentation</a>
</div>
<!-- Full Documentation Card -->
<div class="reader-card full-doc">
<div class="reader-icon">
<i class="fas fa-file-alt"></i>
</div>
<h3>Full Documentation</h3>
<p>Complete technical documentation covering all aspects of the AITBC platform including architecture, APIs, deployment, and advanced features.</p>
<ul class="reader-features">
<li>Architecture overview</li>
<li>Complete API reference</li>
<li>Deployment guides</li>
<li>Security documentation</li>
<li>Advanced configurations</li>
</ul>
<a href="full-documentation.html" class="btn">View Full Documentation</a>
</div>
<!-- Components Card -->
<div class="reader-card components">
<div class="reader-icon">
<i class="fas fa-cube"></i>
</div>
<h3>Architecture &amp; Components</h3>
<p>Explore the system architecture and core components of the AITBC platform. Understand how each part works together from end-to-end flow to individual services.</p>
<ul class="reader-features">
<li>End-to-end system flow diagram</li>
<li>Coordinator API for job orchestration</li>
<li>Blockchain Node with PoA/PoS consensus</li>
<li>Marketplace Web for compute trading</li>
<li>Trade Exchange for BTC-to-AITBC</li>
<li>Wallet for key management &amp; staking</li>
<li>Codebase structure &amp; technical reference</li>
</ul>
<a href="components.html" class="btn">View Architecture</a>
</div>
<!-- System Flow Card -->
<div class="reader-card flow">
<div class="reader-icon">
<i class="fas fa-sitemap"></i>
</div>
<h3>System Flow</h3>
<p>Visualize the complete flow of a job submission through the CLI client, detailing each system component, message, RPC call, and port involved.</p>
<ul class="reader-features">
<li>End-to-end job submission flow</li>
<li>Component interaction diagrams</li>
<li>API call sequences</li>
<li>Error handling paths</li>
<li>Performance monitoring points</li>
</ul>
<a href="flowchart.html" class="btn">View System Flow</a>
</div>
</div>
<!-- Quick Links -->
<section class="quick-links">
<h2>Quick Links</h2>
<div class="links-grid">
<a href="full-documentation.html" class="link-item">
<i class="fas fa-book"></i>
<span>Full Documentation</span>
</a>
<a href="https://github.com/oib/AITBC/tree/main/docs" class="link-item" target="_blank">
<i class="fas fa-file-alt"></i>
<span>Markdown Docs</span>
</a>
<a href="https://aitbc.bubuit.net/Exchange/" class="link-item">
<i class="fas fa-exchange"></i>
<span>Trade Exchange</span>
</a>
<a href="https://github.com/oib/AITBC" class="link-item">
<i class="fas fa-git"></i>
<span>Source Code</span>
</a>
<a href="mailto:andreas.fleckl@bubuit.net" class="link-item">
<i class="fas fa-envelope"></i>
<span>Support</span>
</a>
</div>
</section>
<!-- Help Section -->
<section class="help-section">
<h2>Need Help?</h2>
<p>Can't find what you're looking for? Our support team is here to help!</p>
<div class="help-buttons">
<a href="mailto:andreas.fleckl@bubuit.net" class="btn btn-outline">
<i class="fas fa-envelope"></i> Email Support
</a>
</div>
</section>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved. | Last updated: February 13, 2026</p>
</div>
</footer>
<script>
// Client-side search across doc pages
const docPages = [
{ title: 'Miner Documentation', desc: 'GPU mining, registration, earnings, Ollama setup', url: 'miners.html' },
{ title: 'Client Documentation', desc: 'Job submission, wallet, pricing, API reference', url: 'clients.html' },
{ title: 'Developer Documentation', desc: 'SDKs, APIs, contributing, bounties', url: 'developers.html' },
{ title: 'Full Documentation', desc: 'Architecture, installation, APIs, security, reference', url: 'full-documentation.html' },
{ title: 'Architecture & Components', desc: 'Blockchain node, coordinator, marketplace, wallet, explorer, pool hub', url: 'components.html' },
{ title: 'System Flow', desc: 'Job submission flow, component interaction, RPC calls', url: 'flowchart.html' },
{ title: 'Coordinator API', desc: 'FastAPI, job management, miner registration, receipts', url: 'coordinator-api.html' },
{ title: 'Blockchain Node', desc: 'PoA consensus, RPC, P2P, devnet, validator', url: 'blockchain-node.html' },
{ title: 'Trade Exchange', desc: 'Bitcoin to AITBC, QR payments, user management', url: 'trade-exchange.html' },
{ title: 'Marketplace Web', desc: 'GPU compute offers, bids, stats dashboard', url: 'marketplace-web.html' },
{ title: 'Wallet Daemon', desc: 'Encrypted keystore, Argon2id, REST API, receipts', url: 'wallet-daemon.html' },
{ title: 'Explorer Web', desc: 'Blocks, transactions, addresses, receipt tracking', url: 'explorer-web.html' },
{ title: 'Pool Hub', desc: 'Miner registry, scoring, Redis, PostgreSQL', url: 'pool-hub.html' },
{ title: 'API Reference', desc: 'REST endpoints, authentication, rate limits', url: 'api.html' },
{ title: 'Browser Wallet', desc: 'Chrome extension, secure crypto wallet', url: 'browser-wallet.html' },
];
document.getElementById('searchInput').addEventListener('input', function(e) {
const q = e.target.value.toLowerCase().trim();
let resultsEl = document.getElementById('searchResults');
if (!resultsEl) {
resultsEl = document.createElement('div');
resultsEl.id = 'searchResults';
resultsEl.className = 'search-results';
this.closest('.search-container').after(resultsEl);
}
if (!q || q.length < 2) { resultsEl.innerHTML = ''; return; }
const matches = docPages.filter(p => p.title.toLowerCase().includes(q) || p.desc.toLowerCase().includes(q));
if (matches.length === 0) {
resultsEl.innerHTML = '<div class="no-results">No results found</div>';
} else {
resultsEl.innerHTML = matches.map(p =>
`<a href="${p.url}"><strong>${p.title}</strong><br><small>${p.desc}</small></a>`
).join('');
}
});
</script>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,54 +0,0 @@
/**
* AITBC Documentation Theme Toggle
* Handles dark/light mode switching with localStorage persistence
*/
(function() {
'use strict';
const STORAGE_KEY = 'aitbc-docs-theme';
// Initialize theme on page load
function initTheme() {
const savedTheme = localStorage.getItem(STORAGE_KEY);
const themeToggle = document.getElementById('theme-toggle');
if (savedTheme === 'light') {
document.body.classList.add('light');
if (themeToggle) {
themeToggle.innerHTML = '<i class="fas fa-moon"></i>';
}
}
// Setup toggle button listener
if (themeToggle) {
themeToggle.addEventListener('click', toggleTheme);
}
}
// Toggle between light and dark themes
function toggleTheme() {
const themeToggle = document.getElementById('theme-toggle');
document.body.classList.toggle('light');
const isLight = document.body.classList.contains('light');
if (themeToggle) {
themeToggle.innerHTML = isLight
? '<i class="fas fa-moon"></i>'
: '<i class="fas fa-sun"></i>';
}
localStorage.setItem(STORAGE_KEY, isLight ? 'light' : 'dark');
}
// Run on DOM ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initTheme);
} else {
initTheme();
}
// Expose for manual use if needed
window.toggleTheme = toggleTheme;
})();

View File

@@ -1,260 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marketplace Web - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="components.html">Components</a>
<span></span>
<span>Marketplace Web</span>
</div>
<!-- Back Button -->
<a href="components.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Components
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-store"></i> Marketplace Web</h1>
<p>Vite/TypeScript marketplace with offer/bid functionality, stats dashboard, and mock/live data toggle. Production UI ready.</p>
<span class="status-badge">● Live</span>
</div>
<!-- Alert for markdown format -->
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<strong>Documentation Format:</strong> <a href="https://github.com/oib/AITBC/blob/main/docs/marketplace-web.md" target="_blank" style="color: #1e40af; text-decoration: underline;">View this documentation in markdown format</a> for easier contribution and version control.
</div>
<!-- Overview -->
<section class="content-section">
<h2>Overview</h2>
<p>The Marketplace Web is the primary interface for clients to submit AI compute jobs and for miners to offer their services. It provides a real-time trading platform with comprehensive job management and analytics.</p>
<h3>Key Features</h3>
<ul>
<li>Real-time job marketplace with offer/bid functionality</li>
<li>Interactive statistics dashboard</li>
<li>Mock/live data toggle for development</li>
<li>Responsive design for all devices</li>
<li>WebSocket integration for live updates</li>
<li>Wallet integration for seamless payments</li>
</ul>
</section>
<!-- Technology Stack -->
<section class="content-section">
<h2>Technology Stack</h2>
<div class="tech-grid">
<div class="tech-item">
<strong>Framework</strong>
Vite 4.x
</div>
<div class="tech-item">
<strong>Language</strong>
TypeScript 5.x
</div>
<div class="tech-item">
<strong>UI</strong>
TailwindCSS + Headless UI
</div>
<div class="tech-item">
<strong>State Management</strong>
Zustand
</div>
<div class="tech-item">
<strong>Charts</strong>
Chart.js
</div>
<div class="tech-item">
<strong>WebSocket</strong>
Native WebSocket API
</div>
<div class="tech-item">
<strong>Icons</strong>
Lucide React
</div>
</div>
</section>
<!-- Getting Started -->
<section class="content-section">
<h2>Getting Started</h2>
<h3>Prerequisites</h3>
<ul>
<li>Node.js 18+</li>
<li>npm or yarn</li>
</ul>
<h3>Installation</h3>
<pre><code># Clone the repository
git clone https://github.com/oib/AITBC.git
cd aitbc/apps/marketplace-web
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview</code></pre>
<h3>Environment Configuration</h3>
<pre><code># .env.local
VITE_API_URL=http://localhost:18000
VITE_WS_URL=ws://localhost:18001
VITE_NETWORK=mainnet
VITE_MOCK_DATA=false</code></pre>
</section>
<!-- Features -->
<section class="content-section">
<h2>Features</h2>
<h3>Job Marketplace</h3>
<ul>
<li>Submit AI compute jobs with custom parameters</li>
<li>Browse available miner offers</li>
<li>Real-time price discovery</li>
<li>Job history and tracking</li>
</ul>
<h3>Statistics Dashboard</h3>
<ul>
<li>Real-time network metrics</li>
<li>Job completion rates</li>
<li>GPU utilization charts</li>
<li>Price trends analysis</li>
</ul>
<h3>Wallet Integration</h3>
<ul>
<li>Connect wallet via private key or keystore</li>
<li>View balance and transaction history</li>
<li>Sign transactions for job submissions</li>
<li>Receipt verification</li>
</ul>
</section>
<!-- API Integration -->
<section class="content-section">
<h2>API Integration</h2>
<h3>Coordinator API</h3>
<pre><code>// Job submission
POST /v1/jobs
{
"type": "inference",
"prompt": "Your prompt here",
"model": "llama3.2:latest",
"max_price": "100aitbc"
}
// WebSocket for live updates
ws://localhost:18001/ws</code></pre>
<h3>Blockchain RPC</h3>
<pre><code>// Get transaction status
curl -X POST http://localhost:26657 \
-d '{
"jsonrpc": "2.0",
"method": "tx",
"params": ["0x..."]
}'</code></pre>
</section>
<!-- Development -->
<section class="content-section">
<h2>Development</h2>
<h3>Project Structure</h3>
<pre><code>marketplace-web/
├── src/
│ ├── components/ # Reusable UI components
│ ├── pages/ # Page components
│ ├── hooks/ # Custom React hooks
│ ├── stores/ # Zustand stores
│ ├── services/ # API services
│ ├── types/ # TypeScript definitions
│ └── utils/ # Utility functions
├── public/
├── package.json
└── vite.config.ts</code></pre>
<h3>Mock Data</h3>
<p>Toggle mock data mode for development without a running backend:</p>
<pre><code>// In .env.local
VITE_MOCK_DATA=true</code></pre>
<h3>Building for Production</h3>
<pre><code># Build optimized bundle
npm run build
# Output in dist/ directory
# Deploy to any static hosting service</code></pre>
</section>
<!-- Deployment -->
<section class="content-section">
<h2>Deployment</h2>
<h3>Docker Deployment</h3>
<pre><code># Build image
docker build -t aitbc/marketplace-web .
# Run with nginx
docker run -d \
-p 80:80 \
-e VITE_API_URL=http://api.aitbc.bubuit.net \
aitbc/marketplace-web</code></pre>
<h3>Environment Variables</h3>
<ul>
<li><code>VITE_API_URL</code> - Coordinator API endpoint</li>
<li><code>VITE_WS_URL</code> - WebSocket endpoint</li>
<li><code>VITE_NETWORK</code> - Network name (mainnet/testnet)</li>
<li><code>VITE_MOCK_DATA</code> - Enable/disable mock data</li>
</ul>
</section>
<!-- Support -->
<section class="content-section">
<h2>Support</h2>
<p>For marketplace-specific issues:</p>
<ul>
<li>Check the <a href="full-documentation.html">issue tracker</a></li>
<li>Join our <a href="https://discord.gg/aitbc">Discord</a></li>
<li>Contact: <a href="mailto:andreas.fleckl@bubuit.net">andreas.fleckl@bubuit.net</a></li>
</ul>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,375 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Miner Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<div class="doc-header">
<span class="audience-badge">For Miners</span>
<h1>Start Mining AITBC</h1>
<p>Complete guide to becoming a successful AITBC miner and earning rewards</p>
<div class="source-links">
<a href="https://github.com/oib/AITBC/tree/main/docs/3_miners" target="_blank"><i class="fas fa-file-alt"></i> Markdown Source: docs/3_miners/</a>
</div>
</div>
<!-- Quick Stats -->
<div class="quick-stats">
<div class="stat-card">
<div class="stat-value">15-25%</div>
<div class="stat-label">Annual ROI</div>
</div>
<div class="stat-card">
<div class="stat-value">1000 AITBC</div>
<div class="stat-label">Minimum Stake</div>
</div>
<div class="stat-card">
<div class="stat-value">24/7</div>
<div class="stat-label">Mining Rewards</div>
</div>
<div class="stat-card">
<div class="stat-value">Low</div>
<div class="stat-label">Hardware Requirements</div>
</div>
</div>
<!-- Getting Started -->
<section class="content-section">
<div class="alert alert-info">
<i class="fas fa-info-circle"></i>
<strong>System Flow:</strong> See the <a href="flowchart.html">complete system flow diagram</a> to understand how miners receive and process jobs in the AITBC system.
</div>
<h2>Getting Started</h2>
<p>AITBC mining combines Proof of Authority and Proof of Stake, offering multiple ways to participate and earn rewards.</p>
<h3>Mining Options</h3>
<ul>
<li><strong>Authority Mining</strong>: Become a trusted authority node (invitation only)</li>
<li><strong>Stake Mining</strong>: Stake AITBC tokens and earn rewards</li>
<li><strong>GPU Mining</strong>: ✅ OPERATIONAL - Provide compute power for AI/ML workloads via Ollama (RTX 4060 Ti tested)</li>
<li><strong>Hybrid Mining</strong>: Combine staking with compute provision</li>
</ul>
<div class="announce-banner green">
<strong>🎉 Latest Achievement (February 2026):</strong> Real GPU miner successfully deployed with NVIDIA RTX 4060 Ti! Processing jobs in 11-25 seconds with verified receipt generation. Earn 0.02 AITBC per GPU second with 13+ Ollama models available.
</div>
<h3>Quick Start</h3>
<div class="step">
<div class="step-number">1</div>
<div class="step-content">
<h4>Download & Install</h4>
<p>Get the AITBC mining software for your platform</p>
<div class="code-block">
# Linux/macOS
curl -O https://github.com/oib/AITBC/releases/download/v1.0.0/aitbc-miner-v1.0.0.tar.gz
tar -xzf aitbc-miner-v1.0.0.tar.gz
cd aitbc-miner
# Windows
# Download from https://github.com/oib/AITBC/releases</div>
</div>
</div>
<div class="step">
<div class="step-number">2</div>
<div class="step-content">
<h4>Configure Your Node</h4>
<p>Set up your mining configuration</p>
<div class="code-block">
# Create configuration
./aitbc-miner config init
# Edit configuration
nano ~/.aitbc/miner.toml</div>
</div>
</div>
<div class="step">
<div class="step-number">3</div>
<div class="step-content">
<h4>Stake Tokens</h4>
<p>Lock your AITBC tokens to start earning</p>
<div class="code-block">
# Stake 1000 AITBC
./aitbc-miner stake 1000 --wallet YOUR_WALLET_ADDRESS</div>
</div>
</div>
<div class="step">
<div class="step-number">4</div>
<div class="step-content">
<h4>Start Mining</h4>
<p>Launch your mining node</p>
<div class="code-block">
# Start mining
./aitbc-miner start --mode stake</div>
</div>
</div>
</section>
<!-- Hardware Requirements -->
<section class="content-section">
<h2>Hardware Requirements</h2>
<div class="requirements-grid">
<div class="requirement-card">
<h4><i class="fas fa-microchip"></i> CPU</h4>
<p>4+ cores (8+ recommended for GPU mining)</p>
</div>
<div class="requirement-card">
<h4><i class="fas fa-memory"></i> RAM</h4>
<p>8GB minimum (16GB+ for GPU mining)</p>
</div>
<div class="requirement-card">
<h4><i class="fas fa-hdd"></i> Storage</h4>
<p>100GB SSD (500GB+ for full node)</p>
</div>
<div class="requirement-card">
<h4><i class="fas fa-network-wired"></i> Network</h4>
<p>Stable broadband (100Mbps+)</p>
</div>
<div class="requirement-card">
<h4><i class="fas fa-rocket"></i> GPU (Operational)</h4>
<p><strong>✅ Tested:</strong> NVIDIA RTX 4060 Ti (16GB)<br>
Recommended: RTX 3080+ or AMD RX 6800+<br>
<em>Ollama integration included</em></p>
</div>
<div class="requirement-card">
<h4><i class="fas fa-shield-alt"></i> Security</h4>
<p>HSM recommended for large stakes</p>
</div>
</div>
<div class="alert alert-info">
<strong>✅ GPU Mining Live:</strong> Host GPU miner operational with Ollama integration. Process LLM inference jobs (llama3.2, mistral, deepseek, etc.) and earn 0.02 AITBC per GPU second. Systemd service configuration available for production deployment.
</div>
</section>
<!-- Profit Calculator -->
<section class="calculator">
<h3><i class="fas fa-calculator"></i> Profit Calculator</h3>
<div class="calc-row">
<div class="calc-input">
<label for="stakeAmount">Stake Amount (AITBC)</label>
<input type="number" id="stakeAmount" value="10000" oninput="calculateProfit()">
</div>
<div class="calc-input">
<label for="apy">Expected APY (%)</label>
<input type="number" id="apy" value="20" oninput="calculateProfit()">
</div>
</div>
<div class="calc-row">
<div class="calc-input">
<label for="tokenPrice">Token Price (USD)</label>
<input type="number" id="tokenPrice" value="2.50" step="0.01" oninput="calculateProfit()">
</div>
<div class="calc-input">
<label for="gpuRewards">GPU Rewards (USD/month)</label>
<input type="number" id="gpuRewards" value="0" oninput="calculateProfit()">
</div>
</div>
<div class="calc-result">
<div>Estimated Monthly Earnings</div>
<div class="calc-result-value" id="monthlyEarnings">$416.67</div>
<div>Estimated Annual Earnings</div>
<div class="calc-result-value" id="annualEarnings">$5,000.00</div>
</div>
</section>
<!-- Mining Strategies -->
<section class="content-section">
<h2>Mining Strategies</h2>
<h3>1. Pure Staking</h3>
<p>The simplest approach - stake your tokens and earn passive income.</p>
<ul>
<li>Pros: Low maintenance, predictable returns</li>
<li>Cons: Lower rewards than active mining</li>
<li>Best for: Long-term holders, passive investors</li>
</ul>
<h3>2. GPU Mining</h3>
<p>Provide compute power for AI/ML workloads and earn additional rewards.</p>
<ul>
<li>Pros: Higher rewards, supports the network</li>
<li>Cons: Higher hardware costs, more maintenance</li>
<li>Best for: Technical users with GPU hardware</li>
</ul>
<h3>3. Authority Mining</h3>
<p>Apply to become a trusted authority node (invitation only).</p>
<ul>
<li>Pros: Highest rewards, network influence</li>
<li>Cons: High requirements, strict vetting</li>
<li>Best for: Established organizations, experienced miners</li>
</ul>
<h3>4. Hybrid Approach</h3>
<p>Combine staking with GPU mining for maximum returns.</p>
<ul>
<li>Pros: Diversified income streams</li>
<li>Cons: Complex setup, higher initial cost</li>
<li>Best for: Experienced miners seeking optimization</li>
</ul>
</section>
<!-- Security Best Practices -->
<section class="content-section">
<h2>Security Best Practices</h2>
<div class="alert alert-danger">
<strong>Important:</strong> Never share your private keys or wallet passwords with anyone!
</div>
<h3>Wallet Security</h3>
<ul>
<li>Use a hardware wallet for large stakes</li>
<li>Enable two-factor authentication</li>
<li>Keep your wallet software updated</li>
<li>Backup your wallet securely (offline)</li>
<li>Use a dedicated mining wallet</li>
</ul>
<h3>Node Security</h3>
<ul>
<li>Keep your operating system updated</li>
<li>Use a firewall to restrict access</li>
<li>Monitor for unusual activity</li>
<li>Use VPN for additional privacy</li>
<li>Regular security audits</li>
</ul>
<h3>Operational Security</h3>
<ul>
<li>Diversify your stake across multiple nodes</li>
<li>Use automated monitoring and alerts</li>
<li>Have backup power and internet</li>
<li>Document your recovery procedures</li>
<li>Join the community for security updates</li>
</ul>
</section>
<!-- Troubleshooting -->
<section class="content-section">
<h2>Troubleshooting</h2>
<h3>Common Issues</h3>
<div class="faq-item">
<div class="faq-question">Node won't start?</div>
<div class="faq-answer">
Check your configuration file syntax and ensure all required ports are open. Use <code>./aitbc-miner check-config</code> to validate your setup.
</div>
</div>
<div class="faq-item">
<div class="faq-question">Low mining rewards?</div>
<div class="faq-answer">
Ensure your node is online 24/7, check your stake amount, and verify you're running the latest version. Network conditions also affect rewards.
</div>
</div>
<div class="faq-item">
<div class="faq-question">Sync issues?</div>
<div class="faq-answer">
Try resyncing with <code>./aitbc-miner sync --reset</code>. Check your internet connection and disk space.
</div>
</div>
<div class="faq-item">
<div class="faq-question">GPU not detected?</div>
<div class="faq-answer">
Install latest GPU drivers, verify CUDA/OpenCL support, and check <code>./aitbc-miner gpu check</code>.
</div>
</div>
<h3>Getting Help</h3>
<ul>
<li>Check the logs: <code>./aitbc-miner logs</code></li>
<li>Visit our Discord community</li>
<li>Search issues on Gitea</li>
<li>Email support: andreas.fleckl@bubuit.net</li>
</ul>
</section>
<!-- FAQ -->
<section class="content-section">
<h2>Frequently Asked Questions</h2>
<div class="faq-item">
<div class="faq-question">How much can I earn mining AITBC?</div>
<div class="faq-answer">
Earnings vary based on stake amount, network participation, and whether you provide GPU compute. Typical APY ranges from 15-25% for staking, with GPU mining adding additional rewards.
</div>
</div>
<div class="faq-item">
<div class="faq-question">When do I get paid?</div>
<div class="faq-answer">
Rewards are distributed daily and automatically credited to your wallet. You can withdraw anytime after the initial lock period.
</div>
</div>
<div class="faq-item">
<div class="faq-question">Can I run multiple nodes?</div>
<div class="faq-answer">
Yes, you can run multiple nodes but each requires separate stakes. This can provide redundancy and potentially higher rewards.
</div>
</div>
<div class="faq-item">
<div class="faq-question">What happens if my node goes offline?</div>
<div class="faq-answer">
You won't earn rewards while offline, but your stake remains safe. Extended downtime may affect your reputation score.
</div>
</div>
<div class="faq-item">
<div class="faq-question">How do I become an authority node?</div>
<div class="faq-answer">
Authority nodes require invitation based on community contribution, technical expertise, and stake amount. Apply through the community forum.
</div>
</div>
</section>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script>
// Profit Calculator
function calculateProfit() {
const stake = parseFloat(document.getElementById('stakeAmount').value) || 0;
const apy = parseFloat(document.getElementById('apy').value) || 0;
const price = parseFloat(document.getElementById('tokenPrice').value) || 0;
const gpuRewards = parseFloat(document.getElementById('gpuRewards').value) || 0;
const monthlyStakeRewards = (stake * (apy / 100) / 12) * price;
const monthlyEarnings = monthlyStakeRewards + gpuRewards;
const annualEarnings = monthlyEarnings * 12;
document.getElementById('monthlyEarnings').textContent = `$${monthlyEarnings.toFixed(2)}`;
document.getElementById('annualEarnings').textContent = `$${annualEarnings.toFixed(2)}`;
}
// Initialize calculator
calculateProfit();
</script> <script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,259 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pool Hub - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="components.html">Components</a>
<span></span>
<span>Pool Hub</span>
</div>
<!-- Back Button -->
<a href="components.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Components
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-swimming-pool"></i> Pool Hub</h1>
<p>Miner registry with scoring engine, Redis/PostgreSQL backing, and comprehensive metrics. Live matching API deployed.</p>
<span class="status-badge">● Live</span>
</div>
<!-- Overview -->
<section class="content-section">
<h2>Overview</h2>
<p>The AITBC Pool Hub serves as the central coordination service for miners, providing efficient job matching, reputation scoring, and performance tracking.</p>
<h3>Key Features</h3>
<ul>
<li>Miner registry with comprehensive metadata</li>
<li>Dynamic scoring engine based on performance</li>
<li>Redis for fast caching and PostgreSQL for persistence</li>
<li>Real-time job matching API</li>
<li>Comprehensive metrics and monitoring</li>
<li>Load balancing and failover support</li>
</ul>
</section>
<!-- Architecture -->
<section class="content-section">
<h2>Architecture</h2>
<p>The Pool Hub is designed for high availability and performance:</p>
<div class="feature-grid">
<div class="feature-card">
<h4><i class="fas fa-database"></i> Data Layer</h4>
<p>Redis for hot data, PostgreSQL for historical records</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-chart-line"></i> Scoring Engine</h4>
<p>Dynamic scoring based on success rate, latency, and availability</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-exchange-alt"></i> Matching API</h4>
<p>RESTful API for real-time job-to-miner matching</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-tachometer-alt"></i> Monitoring</h4>
<p>Prometheus metrics and Grafana dashboards</p>
</div>
</div>
</section>
<!-- API Reference -->
<section class="content-section">
<h2>API Reference</h2>
<h3>Miner Registration</h3>
<pre><code># Register miner
POST /api/v1/miners/register
{
"address": "0x...",
"endpoint": "http://miner.example.com:8080",
"capabilities": {
"models": ["llama3.2", "mistral"],
"gpu_memory": 16384,
"max_concurrent_jobs": 4
},
"stake": 10000
}</code></pre>
<h3>Job Matching</h3>
<pre><code># Find suitable miners
POST /api/v1/match
{
"job_type": "inference",
"model": "llama3.2",
"requirements": {
"min_gpu_memory": 8192,
"max_latency": 5000
}
}
# Response
{
"miners": [
{
"address": "0x...",
"endpoint": "http://miner1.example.com",
"score": 0.95,
"estimated_time": 2000
}
]
}</code></pre>
<h3>Miner Status</h3>
<pre><code># Update miner status
POST /api/v1/miners/{address}/status
{
"available": true,
"current_load": 2,
"gpu_utilization": 0.75,
"temperature": 65
}</code></pre>
</section>
<!-- Scoring System -->
<section class="content-section">
<h2>Scoring System</h2>
<p>The scoring engine evaluates miners based on multiple factors:</p>
<h3>Scoring Factors</h3>
<ul>
<li><strong>Success Rate (40%)</strong>: Job completion success percentage</li>
<li><strong>Latency (25%)</strong>: Average response time</li>
<li><strong>Availability (20%)</strong>: Uptime percentage</li>
<li><strong>Reputation (15%)</strong>: Historical performance and stake amount</li>
</ul>
<h3>Score Calculation</h3>
<pre><code>score = (success_rate * 0.4) +
(latency_score * 0.25) +
(availability * 0.2) +
(reputation_score * 0.15)</code></pre>
</section>
<!-- Configuration -->
<section class="content-section">
<h2>Configuration</h2>
<h3>Environment Variables</h3>
<pre><code># Database
REDIS_URL=redis://localhost:6379
DATABASE_URL=postgresql://user:pass@localhost/poolhub
# API
API_HOST=0.0.0.0
API_PORT=8000
# Scoring
SCORE_UPDATE_INTERVAL=60
MAX_MINER_SCORE=1.0
MIN_SUCCESS_RATE=0.8
# Monitoring
METRICS_PORT=9090
LOG_LEVEL=info</code></pre>
<h3>Scoring Configuration</h3>
<pre><code># config/scoring.toml
[scoring]
update_interval = 60 # seconds
decay_factor = 0.95 # daily decay
[weights]
success_rate = 0.4
latency = 0.25
availability = 0.2
reputation = 0.15
[thresholds]
min_success_rate = 0.8
max_latency = 5000
min_availability = 0.95</code></pre>
</section>
<!-- Deployment -->
<section class="content-section">
<h2>Deployment</h2>
<h3>Docker Compose</h3>
<pre><code>version: '3.8'
services:
pool-hub:
image: aitbc/pool-hub:latest
ports:
- "8000:8000"
- "9090:9090"
environment:
- REDIS_URL=redis://redis:6379
- DATABASE_URL=postgresql://postgres:pass@db:5432/poolhub
depends_on:
- redis
- db
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
db:
image: postgres:15
environment:
- POSTGRES_DB=poolhub
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=pass
volumes:
- db_data:/var/lib/postgresql/data</code></pre>
</section>
<!-- Monitoring -->
<section class="content-section">
<h2>Monitoring</h2>
<h3>Key Metrics</h3>
<ul>
<li><code>poolhub_miners_total</code> - Total registered miners</li>
<li><code>poolhub_jobs_matched_total</code> - Total jobs matched</li>
<li><code>poolhub_match_duration</code> - Match operation duration</li>
<li><code>poolhub_miner_score</code> - Individual miner scores</li>
<li><code>poolhub_api_requests_total</code> - API request count</li>
</ul>
<h3>Health Checks</h3>
<pre><code># Health endpoint
GET /health
# Detailed status
GET /api/v1/status
# Metrics endpoint
GET /metrics</code></pre>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,259 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trade Exchange - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<!-- Main Content -->
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="components.html">Components</a>
<span></span>
<span>Trade Exchange</span>
</div>
<!-- Back Button -->
<a href="components.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Components
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-exchange-alt"></i> Trade Exchange</h1>
<p>AITBC exchange with QR payments, user management, and real-time trading capabilities</p>
<span class="status-badge live">● Live</span>
<br><br>
<a href="https://aitbc.bubuit.net/Exchange/" class="cta-button" target="_blank">
<i class="fas fa-external-link-alt"></i>
Launch Exchange
</a>
</div>
<!-- Overview -->
<section class="content-section">
<h2>Overview</h2>
<p>The AITBC Trade Exchange is a crypto-only platform that enables users to exchange Bitcoin for AITBC tokens. It features a modern, responsive interface with user authentication, wallet management, and real-time trading capabilities.</p>
<h3>Key Features</h3>
<ul>
<li>Bitcoin wallet integration with QR code payments</li>
<li>User management with wallet-based authentication</li>
<li>Real-time payment monitoring and confirmation</li>
<li>Individual user wallets and balance tracking</li>
<li>Transaction history and receipt management</li>
<li>Mobile-responsive design</li>
</ul>
</section>
<!-- How It Works -->
<section class="content-section">
<h2>How It Works</h2>
<p>The Trade Exchange provides a simple, secure way to acquire AITBC tokens using Bitcoin.</p>
<div class="feature-grid">
<div class="feature-card">
<h4><i class="fas fa-wallet"></i> 1. Connect Wallet</h4>
<p>Click "Connect Wallet" to generate a unique wallet address and create your account</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-calculator"></i> 2. Select Amount</h4>
<p>Enter the amount of AITBC you want to buy or Bitcoin you want to spend</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-qrcode"></i> 3. Make Payment</h4>
<p>Scan the QR code or send Bitcoin to the provided address</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-coins"></i> 4. Receive Tokens</h4>
<p>AITBC tokens are credited to your wallet after confirmation</p>
</div>
</div>
</section>
<!-- User Management -->
<section class="content-section">
<h2>User Management</h2>
<p>The exchange uses a wallet-based authentication system that requires no passwords.</p>
<h3>Authentication Flow</h3>
<ul>
<li>Users connect with a wallet address (auto-generated for demo)</li>
<li>System creates or retrieves user account</li>
<li>Session token issued for secure API access</li>
<li>24-hour automatic session expiry</li>
</ul>
<h3>User Features</h3>
<ul>
<li>Unique username and user ID</li>
<li>Personal AITBC wallet with balance tracking</li>
<li>Complete transaction history</li>
<li>Secure logout functionality</li>
</ul>
</section>
<!-- Exchange API -->
<section class="content-section">
<h2>Exchange API</h2>
<p>The exchange provides RESTful APIs for user management and payment processing.</p>
<h3>User Management Endpoints</h3>
<div class="api-endpoint">
<code>POST /api/users/login</code>
<p>Login or register with wallet address</p>
</div>
<div class="api-endpoint">
<code>GET /api/users/me</code>
<p>Get current user profile</p>
</div>
<div class="api-endpoint">
<code>GET /api/users/{id}/balance</code>
<p>Get user wallet balance</p>
</div>
<div class="api-endpoint">
<code>POST /api/users/logout</code>
<p>Logout and invalidate session</p>
</div>
<h3>Exchange Endpoints</h3>
<div class="api-endpoint">
<code>POST /api/exchange/create-payment</code>
<p>Create Bitcoin payment request</p>
</div>
<div class="api-endpoint">
<code>GET /api/exchange/payment-status/{id}</code>
<p>Check payment confirmation status</p>
</div>
<div class="api-endpoint">
<code>GET /api/exchange/rates</code>
<p>Get current exchange rates</p>
</div>
</section>
<!-- Security -->
<section class="content-section">
<h2>Security Features</h2>
<p>The exchange implements multiple security measures to protect user funds and data.</p>
<h3>Authentication Security</h3>
<ul>
<li>SHA-256 hashed session tokens</li>
<li>24-hour automatic session expiry</li>
<li>Server-side session validation</li>
<li>Secure token invalidation on logout</li>
</ul>
<h3>Payment Security</h3>
<ul>
<li>Unique payment addresses for each transaction</li>
<li>Real-time blockchain monitoring</li>
<li>Payment confirmation requirements (1 confirmation)</li>
<li>Automatic refund for expired payments</li>
</ul>
<h3>Privacy</h3>
<ul>
<li>No personal data collection</li>
<li>User data isolation</li>
<li>GDPR compliant design</li>
</ul>
</section>
<!-- Configuration -->
<section class="content-section">
<h2>Configuration</h2>
<p>The exchange can be configured for different environments and requirements.</p>
<h3>Exchange Settings</h3>
<pre><code># Exchange Rate
BTC_TO_AITBC_RATE=100000
# Payment Settings
MIN_CONFIRMATIONS=1
PAYMENT_TIMEOUT=3600 # 1 hour
MIN_PAYMENT=0.0001 # BTC
MAX_PAYMENT=10 # BTC
# Bitcoin Network
BITCOIN_NETWORK=testnet
BITCOIN_RPC_URL=http://localhost:8332
BITCOIN_RPC_USER=user
BITCOIN_RPC_PASS=password</code></pre>
</section>
<!-- Getting Started -->
<section class="content-section">
<h2>Getting Started</h2>
<p>Start using the Trade Exchange in just a few simple steps.</p>
<h3>1. Access the Exchange</h3>
<p>Visit: <a href="https://aitbc.bubuit.net/Exchange/" target="_blank">https://aitbc.bubuit.net/Exchange/</a></p>
<h3>2. Connect Your Wallet</h3>
<p>Click the "Connect Wallet" button. A unique wallet address will be generated for you.</p>
<h3>3. Get Testnet Bitcoin</h3>
<p>For testing, get free testnet Bitcoin from:
<br><a href="https://testnet-faucet.mempool.co/" target="_blank">testnet-faucet.mempool.co</a></p>
<h3>4. Make Your First Purchase</h3>
<ul>
<li>Enter the amount of AITBC you want</li>
<li>Click "Create Payment Request"</li>
<li>Send Bitcoin to the provided address</li>
<li>Wait for confirmation</li>
<li>Receive your AITBC tokens!</li>
</ul>
</section>
<!-- Support -->
<section class="content-section">
<h2>Support & Resources</h2>
<p>Find help and additional resources for using the Trade Exchange.</p>
<h3>Documentation</h3>
<ul>
<li><a href="trade_exchange.html" target="_blank">Complete Trade Exchange Guide</a></li>
<li><a href="https://aitbc.bubuit.net/api/docs" target="_blank">API Documentation</a></li>
</ul>
<h3>Troubleshooting</h3>
<ul>
<li>Payment not showing? Check for 1 confirmation</li>
<li>Can't connect? Enable JavaScript and refresh</li>
<li>Balance incorrect? Wait for blockchain sync</li>
</ul>
<h3>Contact</h3>
<ul>
<li>Email: <a href="mailto:andreas.fleckl@bubuit.net">andreas.fleckl@bubuit.net</a></li>
<li>Discord: <a href="https://discord.gg/aitbc" target="_blank">discord.gg/aitbc</a></li>
</ul>
</section>
</div>
</main>
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

View File

@@ -1,209 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Wallet Daemon - AITBC Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<div data-global-header></div>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="components.html">Components</a>
<span></span>
<span>Wallet Daemon</span>
</div>
<!-- Back Button -->
<a href="components.html" class="back-button">
<i class="fas fa-arrow-left"></i>
Back to Components
</a>
<!-- Header -->
<div class="doc-header">
<h1><i class="fas fa-wallet"></i> Wallet Daemon</h1>
<p>Encrypted keystore with Argon2id + XChaCha20-Poly1305, REST/JSON-RPC APIs, and receipt verification capabilities</p>
<span class="status-badge">● Live</span>
</div>
<!-- Overview -->
<section class="content-section">
<h2>Overview</h2>
<p>The AITBC Wallet Daemon provides secure wallet management with enterprise-grade encryption and multiple API interfaces for seamless integration.</p>
<h3>Key Features</h3>
<ul>
<li>Encrypted keystore with Argon2id + XChaCha20-Poly1305</li>
<li>REST and JSON-RPC APIs</li>
<li>Receipt verification capabilities</li>
<li>Hardware wallet support</li>
<li>Multi-signature wallet support</li>
</ul>
</section>
<!-- Architecture -->
<section class="content-section">
<h2>Architecture</h2>
<p>The wallet daemon is built with security as the primary focus:</p>
<div class="feature-grid">
<div class="feature-card">
<h4><i class="fas fa-lock"></i> Encryption</h4>
<p>Argon2id key derivation with XChaCha20-Poly1305 AEAD encryption</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-key"></i> Key Management</h4>
<p>Hierarchical deterministic (HD) wallets with BIP44 support</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-plug"></i> API Layer</h4>
<p>REST and JSON-RPC APIs for easy integration</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-shield-alt"></i> Security</h4>
<p>Sandboxed execution and memory protection</p>
</div>
</div>
</section>
<!-- API Reference -->
<section class="content-section">
<h2>API Reference</h2>
<h3>REST API</h3>
<pre><code># Create wallet
POST /api/v1/wallet/create
{
"name": "my-wallet",
"password": "strong-password"
}
# Unlock wallet
POST /api/v1/wallet/unlock
{
"name": "my-wallet",
"password": "strong-password"
}
# Get address
GET /api/v1/wallet/address
# Send transaction
POST /api/v1/wallet/send
{
"to": "0x...",
"amount": 1000,
"fee": 10
}</code></pre>
<h3>JSON-RPC API</h3>
<pre><code># Get balance
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "get_balance",
"params": [],
"id": 1
}'
# Sign transaction
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "sign_transaction",
"params": [tx_data],
"id": 1
}'</code></pre>
</section>
<!-- Configuration -->
<section class="content-section">
<h2>Configuration</h2>
<p>The wallet daemon can be configured via environment variables or config file:</p>
<pre><code># Configuration file: ~/.aitbc/wallet/config.toml
[wallet]
keystore_path = "~/.aitbc/wallet/keystore"
default_network = "mainnet"
[api]
rest_host = "127.0.0.1"
rest_port = 8545
rpc_host = "127.0.0.1"
rpc_port = 8546
[security]
argon2_time = 3
argon2_memory = 67108864 # 64MB
argon2_parallelism = 4</code></pre>
</section>
<!-- Security -->
<section class="content-section">
<h2>Security Features</h2>
<ul>
<li><strong>Memory Encryption</strong>: All sensitive data encrypted in memory</li>
<li><strong>Secure Erasure</strong>: Memory zeroized after use</li>
<li><strong>Access Control</strong>: API key authentication</li>
<li><strong>Audit Logging</strong>: All operations logged securely</li>
<li><strong>Hardware Support</strong>: Ledger and Trezor integration</li>
</ul>
</section>
<!-- Integration -->
<section class="content-section">
<h2>Integration Examples</h2>
<h3>Python Integration</h3>
<pre><code>from aitbc_wallet import WalletClient
client = WalletClient("http://localhost:8545")
# Create wallet
wallet = client.create_wallet("my-wallet", "password")
print(f"Address: {wallet.address}")
# Send transaction
tx = client.send_transaction(
to="0x123...",
amount=1000,
password="${PASSWORD}"
)
print(f"Transaction hash: {tx.hash}")</code></pre>
<h3>JavaScript Integration</h3>
<pre><code>const { WalletClient } = require('@aitbc/wallet');
const client = new WalletClient('http://localhost:8545');
// Create wallet
const wallet = await client.createWallet('my-wallet', 'password');
console.log('Address:', wallet.address);
// Get balance
const balance = await client.getBalance();
console.log('Balance:', balance);</code></pre>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
<script src="../assets/js/global-header.js"></script>
</body>
</html>

Binary file not shown.

View File

@@ -1,84 +0,0 @@
/*!
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
@font-face {
font-family: 'FontAwesome';
src: url('/assets/fonts-font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('/assets/fonts-font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),
url('/assets/fonts-font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),
url('/assets/fonts-font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),
url('/assets/fonts-font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),
url('/assets/fonts-font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
font-display: block; /* Ensure font displays properly */
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Icons */
.fa-moon:before { content: "\f186"; }
.fa-sun:before { content: "\f185"; }
.fa-wallet:before { content: "\f0ed"; }
.fa-user:before { content: "\f007"; }
.fa-log-out:before { content: "\f08b"; }
.fa-trending-up:before { content: "\f201"; }
.fa-arrow-down-left:before { content: "\f148"; }
.fa-arrow-up-down:before { content: "\f07e"; }
.fa-book-open:before { content: "\f518"; }
.fa-refresh-cw:before { content: "\f021"; }
.fa-rocket:before { content: "\f135"; }
.fa-server:before { content: "\f233"; }
.fa-link:before { content: "\f0c1"; }
.fa-shield-alt:before { content: "\f3ed"; }
.fa-cogs:before { content: "\f085"; }
.fa-database:before { content: "\f1c0"; }
.fa-cloud:before { content: "\f0c2"; }
.fa-lock:before { content: "\f023"; }
.fa-code:before { content: "\f121"; }
.fa-microchip:before { content: "\f2db"; }
.fa-network-wired:before { content: "\f6ff"; }
.fa-check-circle:before { content: "\f058"; }
.fa-cube:before { content: "\f1b2"; }
.fa-exchange-alt:before { content: "\f362"; }
.fa-chart-line:before { content: "\f201"; }
.fa-users:before { content: "\f0c0"; }
.fa-file-alt:before { content: "\f15c"; }
.fa-graduation-cap:before { content: "\f19d"; }
.fa-lightbulb:before { content: "\f0eb"; }
.fa-question-circle:before { content: "\f059"; }
.fa-envelope:before { content: "\f0e0"; }
.fa-github:before { content: "\f09b"; }
.fa-twitter:before { content: "\f099"; }
.fa-telegram:before { content: "\f2c6"; }
/* Size variations */
.fa-lg {
font-size: 1.33333333em;
line-height: .75em;
vertical-align: -15%;
}
.fa-2x { font-size: 2em; }
.fa-3x { font-size: 3em; }
.fa-4x { font-size: 4em; }
.fa-5x { font-size: 5em; }
/* Fixed width */
.fa-fw {
width: 1.28571429em;
text-align: center;
}
/* Spacing */
.fa-pull-left { float: left; }
.fa-pull-right { float: right; }
.fa.fa-pull-left { margin-right: .3em; }
.fa.fa-pull-right { margin-left: .3em; }

View File

@@ -1,373 +1,293 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" data-theme="dark"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC - Production-Ready AI Blockchain Platform</title> <title>AITBC Network - Agent Discovery Interface</title>
<meta name="description" content="AITBC - Production-ready AI blockchain platform with 7 live components, 30+ GPU services, and Stage 7 complete"> <meta name="description" content="AITBC blockchain network - Agent-first API for autonomous systems. Multi-island architecture with PoA consensus.">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"> <meta name="robots" content="index, follow">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0"> <!-- Agent Discovery Links -->
<link rel="preconnect" href="https://aitbc.bubuit.net"> <link rel="alternate" type="application/json" href="/agent/discovery.json" title="AITBC Network Discovery">
<link rel="dns-prefetch" href="//aitbc.bubuit.net"> <link rel="alternate" type="application/json" href="/agent/openapi.json" title="AITBC API Specification">
<meta name="theme-color" content="#2563eb">
<meta property="og:title" content="AITBC - Production-Ready AI Blockchain Platform"> <!-- Structured Data for AI/Agent Crawlers -->
<meta property="og:description" content="Production-ready AI blockchain platform with 7 live components, 30+ GPU services">
<meta property="og:type" content="website">
<meta property="og:url" content="https://aitbc.bubuit.net">
<meta name="twitter:card" content="summary_large_image">
<!-- Agent Discovery -->
<link rel="alternate" type="application/json" href="/agent/discovery.json" title="AITBC Network Discovery for Agents">
<!-- Structured Data for Agent Discovery -->
<script type="application/ld+json"> <script type="application/ld+json">
{ {
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "WebSite", "@type": "SoftwareApplication",
"name": "AITBC Network", "name": "AITBC Blockchain Network",
"url": "https://aitbc.bubuit.net", "applicationCategory": "BlockchainApplication",
"description": "AI-powered blockchain platform with multi-island architecture", "operatingSystem": "Linux",
"potentialAction": { "programmingLanguage": "Python",
"@type": "SearchAction", "license": "https://github.com/oib/AITBC/blob/main/LICENSE",
"target": "https://aitbc.bubuit.net/agent/discovery.json", "codeRepository": "https://github.com/oib/AITBC",
"query-input": "required" "featureList": [
"Multi-island blockchain architecture",
"Proof-of-Authority consensus",
"Agent-first REST API",
"Auto-discovery endpoints",
"Cross-island communication",
"GPU marketplace integration"
],
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}, },
"subjectOf": { "hasPart": [
"@type": "SoftwareApplication", {
"name": "AITBC Blockchain Node", "@type": "WebAPI",
"applicationCategory": "BlockchainApplication", "name": "AITBC Agent API",
"offers": { "description": "Machine-readable API for autonomous agents",
"@type": "Offer", "documentation": "https://aitbc.bubuit.net/agent/openapi.json",
"price": "0", "endpointUrl": "https://aitbc.bubuit.net/agent/discovery.json"
"priceCurrency": "USD" }
}, ]
"featureList": [
"Multi-island architecture",
"PoA consensus",
"Agent-first API",
"Auto-discovery"
]
}
} }
</script> </script>
<!-- Performance optimization: resource hints -->
<link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin> <style>
<link rel="dns-prefetch" href="//aitbc.bubuit.net"> :root {
<link rel="dns-prefetch" href="//github.com"> --bg: #0a0a0f;
<style> --surface: #12121a;
/* Critical CSS for above-the-fold content */ --text: #e4e4e7;
:root{--primary-color:#2563eb;--secondary-color:#7c3aed;--accent-color:#0ea5e9;--text-dark:#1f2937;--bg-white:#ffffff;--gradient:linear-gradient(135deg,#2563eb 0%,#7c3aed 100%)}[data-theme="dark"]{--primary-color:#60a5fa;--secondary-color:#a855f7;--accent-color:#38bdf8;--text-dark:#f9fafb;--bg-white:#1f2937;--gradient:linear-gradient(135deg,#1d4ed8 0%,#7c3aed 100%)}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;line-height:1.6;color:var(--text-dark);background-color:var(--bg-light);transition:background-color .3s ease,color .3s ease}.container{max-width:1200px;margin:0 auto;padding:0 20px}.hero{background:var(--gradient);color:#fff;padding:100px 0 80px;text-align:center}.hero h1{font-size:3.5rem;margin-bottom:1rem;animation:fadeInUp .8s ease}.hero p{font-size:1.25rem;margin-bottom:2rem;opacity:.9;animation:fadeInUp .8s ease .2s both}.cta-button{display:inline-block;padding:12px 30px;background:var(--bg-white);color:var(--primary-color);text-decoration:none;border-radius:5px;font-weight:600;transition:transform .3s,box-shadow .3s;animation:fadeInUp .8s ease .4s both}.cta-button:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(0,0,0,.1)}@keyframes fadeInUp{from{opacity:0;transform:translateY(30px)}to{opacity:1;transform:translateY(0)}}@media (max-width:768px){.hero h1{font-size:2.5rem}} --text-muted: #71717a;
--primary: #3b82f6;
--secondary: #8b5cf6;
--border: #27272a;
--success: #10b981;
--code: #18181b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Courier New', monospace;
background: var(--bg);
color: var(--text);
line-height: 1.6;
min-height: 100vh;
}
.container {
max-width: 900px;
margin: 0 auto;
padding: 2rem;
}
header {
border-bottom: 1px solid var(--border);
padding-bottom: 1.5rem;
margin-bottom: 2rem;
}
h1 {
font-size: 1.8rem;
color: var(--primary);
margin-bottom: 0.5rem;
}
.subtitle {
color: var(--text-muted);
font-size: 0.9rem;
}
.badge {
display: inline-block;
background: var(--surface);
border: 1px solid var(--border);
color: var(--success);
padding: 0.25rem 0.75rem;
border-radius: 4px;
font-size: 0.75rem;
margin-left: 1rem;
vertical-align: middle;
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 1.5rem;
}
h2 {
font-size: 1.1rem;
color: var(--secondary);
margin-bottom: 1rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
h3 {
font-size: 0.95rem;
color: var(--primary);
margin: 1rem 0 0.5rem;
}
p {
color: var(--text-muted);
margin-bottom: 1rem;
}
.endpoint {
background: var(--code);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1rem;
margin: 0.75rem 0;
font-family: 'Courier New', monospace;
}
.method {
color: var(--success);
font-weight: bold;
}
.path {
color: var(--text);
}
a {
color: var(--primary);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.github-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: var(--surface);
border: 1px solid var(--border);
padding: 0.75rem 1.25rem;
border-radius: 6px;
margin-top: 1rem;
transition: background 0.2s;
}
.github-link:hover {
background: var(--border);
text-decoration: none;
}
.code-block {
background: var(--code);
border: 1px solid var(--border);
border-radius: 6px;
padding: 1rem;
overflow-x: auto;
font-family: 'Courier New', monospace;
font-size: 0.85rem;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
}
.meta {
font-size: 0.75rem;
color: var(--text-muted);
margin-top: 2rem;
padding-top: 1rem;
border-top: 1px solid var(--border);
}
pre {
margin: 0;
white-space: pre-wrap;
word-wrap: break-word;
}
</style> </style>
<link rel="preload" href="/assets/css/font-awesome.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<link rel="preload" href="/assets/css/main.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="/assets/css/font-awesome.min.css"><link rel="stylesheet" href="/assets/css/main.css"></noscript>
<link rel="stylesheet" href="/assets/css/site-header.css">
<!-- Font Awesome CDN fallback -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" crossorigin="anonymous" media="print" onload="this.media='all'; this.onload=null;">
</head> </head>
<body> <body>
<!-- Header --> <div class="container">
<header class="global-header"> <header>
<div class="global-header__inner"> <h1>AITBC Network <span class="badge">Agent API</span></h1>
<a class="global-brand" href="/"> <p class="subtitle">Autonomous agent discovery interface for the AI-powered blockchain network</p>
<div class="global-brand__icon"> </header>
<i class="fas fa-cube"></i>
</div>
<div class="global-brand__text">
<span>AITBC Platform</span>
<small>AI Blockchain Network</small>
</div>
</a>
<nav class="global-nav">
<a href="/" class="global-nav__link active">Home</a>
<a href="/explorer/" class="global-nav__link">Explorer</a>
<a href="/marketplace/" class="global-nav__link">Marketplace</a>
<a href="/Exchange/" class="global-nav__link">Exchange</a>
<a href="/docs/index.html" class="global-nav__link">Docs</a>
<a href="/agent/" class="global-nav__link">Agent API</a>
</nav>
<div class="global-header__actions">
<button onclick="toggleDarkMode()" class="global-dark-toggle" title="Toggle dark mode">
<span id="darkModeEmoji">🌙</span>
<span id="darkModeText">Dark</span>
</button>
<a href="/marketplace/" class="global-nav__cta">Launch Marketplace</a>
</div>
</div>
</header>
<!-- Hero Section --> <div class="card">
<section class="hero" id="hero"> <h2>What is AITBC?</h2>
<div class="container"> <p>AITBC is an AI-powered blockchain platform with a multi-island architecture. It provides a <strong>Proof-of-Authority consensus mechanism</strong> designed for autonomous agents and distributed systems.</p>
<h1>Production-Ready AI Blockchain Platform</h1>
<p>7 Live Components • 30+ GPU Services • Stage 11 Complete</p>
<a href="#features" class="cta-button">Explore Features</a>
</div>
</section>
<!-- Features Section -->
<section class="features" id="features">
<div class="container">
<h2 class="section-title">Platform Components</h2>
<div class="features-grid">
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-cube"></i>
</div>
<h3>Blockchain Node</h3>
<p>PoA/PoS consensus with REST/WebSocket RPC, real-time gossip layer, and comprehensive observability. Production-ready with devnet tooling.</p>
<a href="docs/blockchain-node.html" class="feature-link">View Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-server"></i>
</div>
<h3>Coordinator API</h3>
<p>FastAPI service for job submission, miner registration, and receipt management. SQLite persistence with comprehensive endpoints.</p>
<a href="docs/coordinator-api.html" class="feature-link">View Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-store"></i>
</div>
<h3>Marketplace Web</h3>
<p>Vite/TypeScript marketplace with offer/bid functionality, stats dashboard, and mock/live data toggle. Production UI ready.</p>
<a href="docs/marketplace-web.html" class="feature-link">View Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-search"></i>
</div>
<h3>Explorer Web</h3>
<p>Full-featured blockchain explorer with blocks, transactions, addresses, and receipts tracking. Responsive design with live data.</p>
<a href="docs/explorer-web.html" class="feature-link">View Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-wallet"></i>
</div>
<h3>Wallet Daemon</h3>
<p>Encrypted keystore with Argon2id + XChaCha20-Poly1305, REST/JSON-RPC APIs, and receipt verification capabilities.</p>
<a href="docs/wallet-daemon.html" class="feature-link">View Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-exchange-alt"></i>
</div>
<h3>Trade Exchange</h3>
<p>Bitcoin-to-AITBC exchange with QR payments, user management, and real-time trading. Buy tokens with BTC instantly.</p>
<a href="docs/trade-exchange.html" class="feature-link">View Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="feature-card">
<div class="feature-icon">
<i class="fas fa-swimming-pool"></i>
</div>
<h3>Pool Hub</h3>
<p>Miner registry with scoring engine, Redis/PostgreSQL backing, and comprehensive metrics. Live matching API deployed.</p>
<a href="docs/pool-hub.html" class="feature-link">View Docs <i class="fas fa-arrow-right"></i></a>
</div>
</div>
</div>
</section>
<!-- Architecture Section -->
<section class="architecture" id="architecture">
<div class="container">
<h2 class="section-title">Architecture</h2>
<div class="architecture-grid">
<div class="arch-component">
<i class="fas fa-server"></i>
<h3>Coordinator API</h3>
<p>Central coordination layer for marketplace operations</p>
</div>
<div class="arch-component">
<i class="fas fa-link"></i>
<h3>Blockchain Node</h3>
<p>Hybrid PoA/PoS consensus with fast finality</p>
</div>
<div class="arch-component">
<i class="fas fa-cube"></i>
<h3>GPU Providers</h3>
<p>Decentralized compute network for AI workloads</p>
</div>
<div class="arch-component">
<i class="fas fa-wallet"></i>
<h3>Wallet Daemon</h3>
<p>Secure wallet management and transaction signing</p>
</div>
</div>
</div>
</section>
<!-- Stats Section -->
<section class="stats">
<div class="container">
<div class="stats-grid">
<div class="stat-item">
<h3>100,000+</h3>
<p>Transactions Per Second</p>
</div>
<div class="stat-item">
<h3>&lt;1s</h3>
<p>Finality Time</p>
</div>
<div class="stat-item">
<h3>64</h3>
<p>Shard Chains</p>
</div>
<div class="stat-item">
<h3>95%</h3>
<p>Energy Reduction vs PoW</p>
</div>
</div>
</div>
</section>
<!-- Documentation Section -->
<section class="documentation" id="documentation">
<div class="container">
<h2 class="section-title">Documentation</h2>
<p class="section-subtitle">Choose your reader level for tailored documentation</p>
<div class="docs-grid"> <h3>Key Features</h3>
<div class="doc-card"> <ul style="color: var(--text-muted); margin-left: 1.5rem;">
<div class="doc-icon"> <li>Multi-island blockchain architecture (mainnet + testnet)</li>
<i class="fas fa-hammer"></i> <li>Agent-first REST API with auto-discovery</li>
</div> <li>Cross-island communication bridges</li>
<h3>Miners</h3> <li>GPU marketplace integration</li>
<p>Learn mining, staking, and earning rewards</p> <li>Open source - available on GitHub</li>
<a href="docs/miners.html" class="doc-link">Miner Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="doc-card">
<div class="doc-icon">
<i class="fas fa-users"></i>
</div>
<h3>Clients</h3>
<p>Use AITBC for AI/ML workloads</p>
<a href="docs/clients.html" class="doc-link">Client Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="doc-card">
<div class="doc-icon">
<i class="fas fa-code"></i>
</div>
<h3>Developers</h3>
<p>Build on AITBC and contribute</p>
<a href="docs/developers.html" class="doc-link">Developer Docs <i class="fas fa-arrow-right"></i></a>
</div>
</div>
<div class="docs-cta">
<a href="docs/index.html" class="cta-button">View All Documentation</a>
</div>
</div>
</section>
<!-- Achievements Section -->
<section class="stats" id="achievements">
<div class="container">
<h2 class="section-title">Platform Achievements</h2>
<div class="stats-grid">
<div class="stat-item">
<h3>7</h3>
<p>Live Components</p>
</div>
<div class="stat-item">
<h3>30+</h3>
<p>GPU Services</p>
</div>
<div class="stat-item">
<h3>Stages 1-11</h3>
<p>Complete</p>
</div>
<div class="stat-item">
<h3>100%</h3>
<p>Open Source</p>
</div>
</div>
</div>
</section>
<!-- Roadmap Section -->
<section class="roadmap" id="roadmap">
<div class="container">
<h2 class="section-title">Development Roadmap</h2>
<div class="roadmap-timeline">
<div class="roadmap-item">
<div class="roadmap-marker"></div>
<div class="roadmap-content">
<h4>Stages 1-11 Complete</h4>
<p>Core infrastructure, marketplace, explorer, wallet, trade exchange, and 30+ GPU services deployed</p>
</div>
</div>
<div class="roadmap-item">
<div class="roadmap-marker">🔄</div>
<div class="roadmap-content">
<h4>Stage 8 - Current Focus</h4>
<p>Research consortium, sharding prototypes, ZK applications, and global expansion</p>
</div>
</div>
<div class="roadmap-item">
<div class="roadmap-marker">9</div>
<div class="roadmap-content">
<h4>Stage 9 - Moonshot Initiatives</h4>
<p>Decentralized infrastructure, AI automation, and global standards</p>
</div>
</div>
<div class="roadmap-item">
<div class="roadmap-marker">10</div>
<div class="roadmap-content">
<h4>Stage 10 - Stewardship</h4>
<p>Open governance, educational programs, and long-term preservation</p>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer>
<div class="container">
<ul class="nav-links">
<li><a href="/explorer/">Explorer</a></li>
<li><a href="/marketplace/">Marketplace</a></li>
<li><a href="/Exchange/">Exchange</a></li>
<li><a href="docs/index.html">Documentation</a></li>
<li><a href="mailto:andreas.fleckl@bubuit.net">Contact</a></li>
</ul> </ul>
<p>&copy; 2025 AITBC. All rights reserved.</p>
<a href="https://github.com/oib/AITBC" class="github-link" target="_blank" rel="noopener">
<svg height="20" viewBox="0 0 16 16" width="20" fill="currentColor">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
</svg>
github.com/oib/AITBC
</a>
</div> </div>
</footer>
<script type="application/ld+json"> <div class="card">
{ <h2>Network Discovery</h2>
"@context": "https://schema.org", <p>Access the complete network information through machine-readable JSON endpoints:</p>
"@type": "Organization",
"name": "AITBC", <div class="endpoint">
"description": "Production-ready AI blockchain platform with 7 live components and 30+ GPU services", <span class="method">GET</span> <span class="path">/agent/discovery.json</span>
"url": "https://aitbc.bubuit.net", </div>
"logo": "https://aitbc.bubuit.net/favicon.ico", <p style="font-size: 0.9rem;">Returns all islands, chains, endpoints, and network topology</p>
"sameAs": [
"https://github.com/aitbc" <h3>Available Endpoints</h3>
], <div class="grid">
"contactPoint": { <div class="endpoint">
"@type": "ContactPoint", <span class="method">GET</span> <span class="path">/agent/islands.json</span>
"email": "andreas.fleckl@bubuit.net", </div>
"contactType": "General Inquiries" <div class="endpoint">
} <span class="method">GET</span> <span class="path">/agent/chains.json</span>
} </div>
</script> <div class="endpoint">
<script> <span class="method">GET</span> <span class="path">/agent/openapi.json</span>
// Register service worker for offline support </div>
if ('serviceWorker' in navigator) { <div class="endpoint">
navigator.serviceWorker.register('/assets/js/sw.js') <span class="method">GET</span> <span class="path">/agent/health</span>
.then(registration => console.log('SW registered')) </div>
.catch(err => console.log('SW registration failed')); </div>
} </div>
</script>
<script src="/assets/js/main.js" async></script> <div class="card">
<script src="/assets/js/web-vitals.js" async></script> <h2>Join the Network</h2>
<!-- Lightweight Analytics - privacy focused, no cookies --> <p>Configure your node to join an AITBC island:</p>
<script data-host="https://ackee.bubuit.net" data-ackee-server="https://ackee.bubuit.net" src="/assets/js/analytics.js" async data-auto-opts='{"website": "aitbc-main", "name": "AITBC Main Website"}'></script>
<div class="grid">
<div>
<h3>Mainnet</h3>
<div class="endpoint">
<span class="method">GET</span> <span class="path">/agent/join/ait-mainnet.json</span>
</div>
<p style="font-size: 0.85rem;">Production chain with real value</p>
</div>
<div>
<h3>Testnet</h3>
<div class="endpoint">
<span class="method">GET</span> <span class="path">/agent/join/ait-testnet.json</span>
</div>
<p style="font-size: 0.85rem;">Development and testing environment</p>
</div>
</div>
</div>
<div class="card">
<h2>Quick Start</h2>
<div class="code-block">
<pre># 1. Discover the network
curl -s https://aitbc.bubuit.net/agent/discovery.json | jq .
# 2. Get island information
curl -s https://aitbc.bubuit.net/agent/islands.json | jq '.islands[]'
# 3. Join a chain (get configuration)
curl -s https://aitbc.bubuit.net/agent/join/ait-mainnet.json | jq '.how_to_join'</pre>
</div>
</div>
<div class="card">
<h2>API Specification</h2>
<p>OpenAPI 3.0 specification available at:</p>
<div class="endpoint">
<span class="method">GET</span> <span class="path">/agent/openapi.json</span>
</div>
<p style="font-size: 0.85rem; margin-top: 0.5rem;">Machine-readable API documentation for client generation</p>
</div>
<div class="meta">
<p>Node ID: aitbc | Island: ait-mainnet-island | Role: Hub</p>
<p>This page is optimized for autonomous agents and web crawlers. All content is also available in machine-readable JSON format at the endpoints listed above.</p>
</div>
</div>
</body> </body>
</html> </html>

View File

@@ -1,358 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Browser Wallet - Secure Crypto Wallet</title>
<link rel="stylesheet" href="/assets/css/aitbc.css">
<script src="/assets/js/lucide.js"></script>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="hero-gradient text-white">
<nav class="container mx-auto px-4 py-6">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<i data-lucide="wallet" class="w-8 h-8"></i>
<span class="text-2xl font-bold">AITBC</span>
</div>
<div class="flex items-center space-x-6">
<a href="/docs/" class="hover:text-orange-200 transition">Documentation</a>
<a href="/Exchange/" class="hover:text-orange-200 transition">Exchange</a>
<a href="/explorer/" class="hover:text-orange-200 transition">Explorer</a>
</div>
</div>
</nav>
<div class="container mx-auto px-4 py-20 text-center">
<h1 class="text-5xl font-bold mb-6">AITBC Browser Wallet</h1>
<p class="text-xl mb-8 max-w-2xl mx-auto">
The most secure way to store, send, and receive AITBC tokens.
Connect to the AITBC Trade Exchange with just one click.
</p>
<div class="flex justify-center gap-6 flex-wrap">
<a href="/chrome-wallet/install.html" class="browser-button chrome-button">
<i data-lucide="chrome" class="w-6 h-6"></i>
Install for Chrome
</a>
<a href="/firefox-wallet/install.html" class="browser-button firefox-button">
<i data-lucide="globe" class="w-6 h-6"></i>
Install for Firefox
</a>
</div>
</div>
</header>
<!-- Features Section -->
<section class="py-20">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Why Choose AITBC Wallet?</h2>
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div class="feature-card bg-white p-8 rounded-xl text-center">
<i data-lucide="shield" class="security-icon text-orange-600"></i>
<h3 class="text-xl font-semibold mb-4">Bank-Grade Security</h3>
<p class="text-gray-600">
Your private keys never leave your device.
Encrypted locally with military-grade security.
</p>
</div>
<div class="feature-card bg-white p-8 rounded-xl text-center">
<i data-lucide="link" class="security-icon text-orange-600"></i>
<h3 class="text-xl font-semibold mb-4">Seamless dApp Integration</h3>
<p class="text-gray-600">
Connect to any AITBC-powered dApp with a single click.
No more copying and pasting addresses.
</p>
</div>
<div class="feature-card bg-white p-8 rounded-xl text-center">
<i data-lucide="zap" class="security-icon text-orange-600"></i>
<h3 class="text-xl font-semibold mb-4">Lightning Fast</h3>
<p class="text-gray-600">
Built for performance.
Instant transactions and real-time balance updates.
</p>
</div>
</div>
</div>
</section>
<!-- Chrome Installation -->
<section id="chrome-install" class="py-20 bg-gray-100">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Install for Chrome / Edge / Brave</h2>
<div class="max-w-3xl mx-auto">
<div class="bg-white rounded-xl p-8 shadow-lg">
<h3 class="text-2xl font-semibold mb-6 flex items-center">
<i data-lucide="chrome" class="w-8 h-8 mr-3"></i>
Chrome Installation Steps
</h3>
<div class="space-y-6">
<div class="flex gap-4">
<div class="step-number">1</div>
<div>
<h4 class="font-semibold mb-2">Download the Extension</h4>
<p class="text-gray-600 mb-4">
Download the AITBC Wallet extension files to your computer.
</p>
<a href="/assets/aitbc-wallet.zip" class="inline-flex items-center gap-2 bg-blue-600 text-white px-6 py-3 rounded-lg hover:bg-blue-700 transition">
<i data-lucide="download" class="w-5 h-5"></i>
Download Chrome Extension
</a>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">2</div>
<div>
<h4 class="font-semibold mb-2">Open Chrome Extensions</h4>
<p class="text-gray-600 mb-4">
Open Chrome and navigate to the extensions page:
</p>
<div class="code-block">chrome://extensions/</div>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">3</div>
<div>
<h4 class="font-semibold mb-2">Enable Developer Mode</h4>
<p class="text-gray-600 mb-4">
Toggle the "Developer mode" switch in the top right corner.
</p>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">4</div>
<div>
<h4 class="font-semibold mb-2">Load Extension</h4>
<p class="text-gray-600 mb-4">
Click "Load unpacked" and select the <code>aitbc-wallet</code> folder.
</p>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">5</div>
<div>
<h4 class="font-semibold mb-2">Start Using!</h4>
<p class="text-gray-600">
Click the AITBC Wallet icon in your toolbar to create or import an account.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Firefox Installation -->
<section id="firefox-install" class="py-20">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Install for Firefox</h2>
<div class="max-w-3xl mx-auto">
<div class="bg-white rounded-xl p-8 shadow-lg">
<h3 class="text-2xl font-semibold mb-6 flex items-center">
<i data-lucide="globe" class="w-8 h-8 mr-3 text-orange-600"></i>
Firefox Installation Steps
</h3>
<div class="space-y-6">
<div class="flex gap-4">
<div class="step-number">1</div>
<div>
<h4 class="font-semibold mb-2">Visit Install Page</h4>
<p class="text-gray-600 mb-4">
Click the button below to go to the Firefox installation page.
</p>
<a href="/firefox-wallet/install.html" class="inline-flex items-center gap-2 bg-orange-600 text-white px-6 py-3 rounded-lg hover:bg-orange-700 transition">
<i data-lucide="download" class="w-5 h-5"></i>
Install Firefox Extension
</a>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">2</div>
<div>
<h4 class="font-semibold mb-2">Click "Add to Firefox"</h4>
<p class="text-gray-600">
On the install page, click the "Add to Firefox" button to install the extension.
</p>
</div>
</div>
<div class="flex gap-4">
<div class="step-number">3</div>
<div>
<h4 class="font-semibold mb-2">Start Using!</h4>
<p class="text-gray-600">
The AITBC Wallet will appear in your toolbar with an orange icon. Click to create your first account!
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Usage Guide -->
<section class="py-20 bg-gray-100">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Using Your AITBC Wallet</h2>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-5xl mx-auto">
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="plus-circle" class="w-6 h-6 mr-2 text-green-600"></i>
Create a New Wallet
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Click the AITBC Wallet icon</li>
<li>2. Select "Create New Account"</li>
<li>3. Securely save your private key</li>
<li>4. Your wallet is ready!</li>
</ol>
</div>
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="download" class="w-6 h-6 mr-2 text-blue-600"></i>
Import Existing Wallet
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Click the AITBC Wallet icon</li>
<li>2. Select "Import Private Key"</li>
<li>3. Enter your private key</li>
<li>4. Access your restored wallet</li>
</ol>
</div>
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="link" class="w-6 h-6 mr-2 text-purple-600"></i>
Connect to Exchange
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Visit <a href="/Exchange/" class="text-blue-600 hover:underline">AITBC Exchange</a></li>
<li>2. Toggle to "Real Mode"</li>
<li>3. Click "Connect AITBC Wallet"</li>
<li>4. Approve the connection</li>
</ol>
</div>
<div class="bg-white p-8 rounded-xl">
<h3 class="text-xl font-semibold mb-4 flex items-center">
<i data-lucide="send" class="w-6 h-6 mr-2 text-orange-600"></i>
Send & Receive Tokens
</h3>
<ol class="space-y-2 text-gray-600">
<li>1. Click "Send" to transfer tokens</li>
<li>2. Click "Receive" to get your address</li>
<li>3. All transactions require confirmation</li>
<li>4. View history in the wallet</li>
</ol>
</div>
</div>
</div>
</section>
<!-- Security Tips -->
<section class="py-20">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Security Best Practices</h2>
<div class="max-w-3xl mx-auto">
<div class="bg-red-50 border border-red-200 rounded-xl p-8">
<h3 class="text-xl font-semibold mb-6 text-red-800 flex items-center">
<i data-lucide="alert-triangle" class="w-6 h-6 mr-2"></i>
Important Security Reminders
</h3>
<ul class="space-y-4 text-gray-700">
<li class="flex items-start">
<i data-lucide="shield" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Never share your private key</strong> - Anyone with your private key has full control of your funds</span>
</li>
<li class="flex items-start">
<i data-lucide="file-text" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Backup your private key</strong> - Write it down and store it in a secure, offline location</span>
</li>
<li class="flex items-start">
<i data-lucide="globe" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Verify URLs</strong> - Always ensure you're on aitbc.bubuit.net before connecting</span>
</li>
<li class="flex items-start">
<i data-lucide="lock" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Use a password manager</strong> - Protect your browser with a strong, unique password</span>
</li>
<li class="flex items-start">
<i data-lucide="refresh-cw" class="w-5 h-5 mr-3 mt-0.5 text-red-600 flex-shrink-0"></i>
<span><strong>Keep updated</strong> - Regularly update your browser and the wallet extension</span>
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-gray-900 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<div>
<h4 class="text-lg font-semibold mb-4">AITBC Wallet</h4>
<p class="text-gray-400">
The secure browser wallet for AITBC tokens
</p>
</div>
<div>
<h4 class="text-lg font-semibold mb-4">Quick Links</h4>
<ul class="space-y-2 text-gray-400">
<li><a href="/Exchange/" class="hover:text-white transition">Trade Exchange</a></li>
<li><a href="/explorer/" class="hover:text-white transition">Block Explorer</a></li>
<li><a href="/docs/" class="hover:text-white transition">Documentation</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-semibold mb-4">Support</h4>
<p class="text-gray-400">
Need help? Check our documentation or create an issue on GitHub.
</p>
</div>
</div>
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400">
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</div>
</footer>
<script>
// Initialize Lucide icons
document.addEventListener('DOMContentLoaded', () => {
lucide.createIcons();
});
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
</script>
<script src="js/theme.js"></script>
</body>
</html>