docs: restructure website, optimize HTML, gitignore private files

Website docs (website/docs/):
- Delete 6 stale -md.html duplicates
- Rename docs-clients/miners/developers → clients/miners/developers.html
- Unify header/nav across all 15 pages (new .site-header pattern)
- Fix 34 dead href=# links with real targets
- Upgrade Font Awesome v4→v6 in index.html
- Replace search stub with live client-side search (15-page index)
- Extract all inline CSS into shared docs.css (+630 lines)
- Extract inline theme JS into shared theme.js
- Strip inline style= attributes from 10+ pages
- Add .announce-banner, .source-links, .search-results CSS classes
- Add Markdown Source links to clients/miners/developers pages
- Update components.html title to Architecture & Components
- Move browser-wallet.html to website/wallet/, leave redirect
- Update all dates to February 2026

Website root:
- Delete 6 root-level duplicate HTML files (160KB saved)
- Rewire index.html and 404.html links

Root README.md:
- Fix 8 broken doc links to new numbered folder structure
- Update copyright to 2026

.gitignore + .example files:
- Gitignore private files: .aitbc.yaml, .env, deploy scripts,
  GPU scripts, service scripts, infra configs, .windsurf/, website README
- Create 7 .example files for GitHub users with sanitized templates
- Untrack 47 previously committed private files

Live server:
- Push all website files to aitbc-cascade:/var/www/html/
- Clean stale admin.html and index.nginx-debian.html
This commit is contained in:
oib
2026-02-13 23:18:52 +01:00
parent 06e48ef34b
commit 07f3a87328
87 changed files with 1699 additions and 17311 deletions

View File

@@ -1 +0,0 @@
coordinator_url: http://127.0.0.1:18000

3
.aitbc.yaml.example Normal file
View File

@@ -0,0 +1,3 @@
# AITBC CLI Configuration
# Copy to .aitbc.yaml and adjust for your environment
coordinator_url: http://127.0.0.1:18000

33
.gitignore vendored
View File

@@ -193,3 +193,36 @@ docs/infrastructure.md
# Workflow files (personal, change frequently)
docs/1_project/3_currenttask.md
docs/1_project/4_currentissue.md
# ===================
# Website (local deployment details)
# ===================
website/README.md
website/aitbc-proxy.conf
# ===================
# Local Config & Secrets
# ===================
.aitbc.yaml
apps/coordinator-api/.env
# ===================
# Windsurf IDE (personal dev tooling)
# ===================
.windsurf/
# ===================
# Deploy Scripts (hardcoded local paths & IPs)
# ===================
scripts/deploy/*
!scripts/deploy/*.example
scripts/gpu/*
!scripts/gpu/*.example
scripts/service/*
# ===================
# Infra Configs (production IPs & secrets)
# ===================
infra/nginx/nginx-aitbc*.conf
infra/helm/values/prod/
infra/helm/values/prod.yaml

View File

@@ -63,7 +63,7 @@ aitbc/
└── website/ # Public website and HTML documentation
```
See [docs/structure.md](docs/structure.md) for detailed file-level documentation.
See [docs/README.md](docs/README.md) for the full documentation index.
## Quick Start
@@ -147,17 +147,18 @@ Services run in an Incus container with systemd units. See `systemd/` for servic
## Documentation
| Document | Description |
|----------|-------------|
| [docs/structure.md](docs/structure.md) | Codebase structure and file layout |
| [docs/components.md](docs/components.md) | Component overview |
| [docs/coordinator-api.md](docs/coordinator-api.md) | Coordinator API reference |
| [docs/cli-reference.md](docs/cli-reference.md) | CLI command reference (560+ lines) |
| [docs/roadmap.md](docs/roadmap.md) | Development roadmap |
| [docs/done.md](docs/done.md) | Completed deployments and milestones |
| [docs/files.md](docs/files.md) | File audit and status tracking |
| [docs/currentTask.md](docs/currentTask.md) | Current task and test results |
| Section | Path | Description |
|---------|------|-------------|
| Getting Started | [docs/0_getting_started/](docs/0_getting_started/) | Intro, installation, CLI usage |
| Clients | [docs/2_clients/](docs/2_clients/) | Job submission, wallet, pricing, API |
| Miners | [docs/3_miners/](docs/3_miners/) | GPU setup, registration, earnings |
| Blockchain | [docs/4_blockchain/](docs/4_blockchain/) | Node operation, configuration |
| Reference | [docs/5_reference/](docs/5_reference/) | CLI reference, architecture specs |
| Architecture | [docs/6_architecture/](docs/6_architecture/) | System flow, component details |
| Deployment | [docs/7_deployment/](docs/7_deployment/) | Remote deployment, backups |
| Development | [docs/8_development/](docs/8_development/) | Setup, contributing, examples |
| Security | [docs/9_security/](docs/9_security/) | Security architecture, audit |
## License
[MIT](LICENSE) — Copyright (c) 2025 AITBC
[MIT](LICENSE) — Copyright (c) 2026 AITBC

View File

@@ -1,140 +0,0 @@
# Production environment values
global:
environment: production
coordinator:
replicaCount: 3
image:
tag: "v0.1.0"
resources:
limits:
cpu: 2000m
memory: 2Gi
requests:
cpu: 1000m
memory: 1Gi
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 20
targetCPUUtilizationPercentage: 75
targetMemoryUtilizationPercentage: 80
config:
appEnv: production
allowOrigins: "https://app.aitbc.io"
postgresql:
auth:
existingSecret: "coordinator-db-secret"
primary:
persistence:
size: 200Gi
storageClass: fast-ssd
resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 1000m
memory: 2Gi
readReplicas:
replicaCount: 2
resources:
limits:
cpu: 1000m
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
monitoring:
prometheus:
server:
retention: 90d
persistentVolume:
size: 500Gi
storageClass: fast-ssd
resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 1000m
memory: 2Gi
grafana:
adminPassword: "prod-admin-secure-2024"
persistence:
size: 50Gi
storageClass: fast-ssd
resources:
limits:
cpu: 1000m
memory: 2Gi
requests:
cpu: 500m
memory: 1Gi
ingress:
enabled: true
hosts:
- grafana.aitbc.io
# Additional services
blockchainNode:
replicaCount: 5
resources:
limits:
cpu: 2000m
memory: 2Gi
requests:
cpu: 1000m
memory: 1Gi
autoscaling:
enabled: true
minReplicas: 5
maxReplicas: 50
targetCPUUtilizationPercentage: 70
walletDaemon:
replicaCount: 3
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 10
targetCPUUtilizationPercentage: 75
# Ingress configuration
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/rate-limit: "100"
nginx.ingress.kubernetes.io/rate-limit-window: "1m"
hosts:
- host: api.aitbc.io
paths:
- path: /
pathType: Prefix
tls:
- secretName: prod-tls
hosts:
- api.aitbc.io
# Security
podSecurityPolicy:
enabled: true
networkPolicy:
enabled: true
# Backup configuration
backup:
enabled: true
schedule: "0 2 * * *"
retention: "30d"

View File

@@ -0,0 +1,44 @@
# AITBC Production Helm Values
# Copy to prod.yaml and adjust for your cluster
replicaCount: 1
coordinator:
image: aitbc/coordinator-api:latest
port: 8000
env:
APP_ENV: production
DATABASE_URL: postgresql://aitbc:YOUR_DB_PASSWORD@postgres:5432/aitbc
HMAC_SECRET: YOUR_HMAC_SECRET
ALLOW_ORIGINS: '["https://YOUR_DOMAIN"]'
blockchain:
image: aitbc/blockchain-node:latest
rpcPort: 9080
p2pPort: 9090
env:
NETWORK: mainnet
CONSENSUS_MODE: BALANCED
ingress:
enabled: true
host: YOUR_DOMAIN
tls:
enabled: true
secretName: aitbc-tls
resources:
coordinator:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
blockchain:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 2000m
memory: 4Gi

View File

@@ -1,259 +0,0 @@
# Production environment Helm values
global:
environment: prod
domain: aitbc.bubuit.net
imageTag: stable
imagePullPolicy: IfNotPresent
# Coordinator API
coordinator:
enabled: true
replicas: 3
image:
repository: aitbc/coordinator-api
tag: stable
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 2000m
memory: 2Gi
service:
type: ClusterIP
port: 8001
env:
LOG_LEVEL: warn
DATABASE_URL: secretRef:db-credentials
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 10
targetCPUUtilization: 60
targetMemoryUtilization: 70
livenessProbe:
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
initialDelaySeconds: 5
periodSeconds: 5
# Explorer Web
explorer:
enabled: true
replicas: 3
image:
repository: aitbc/explorer-web
tag: stable
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
service:
type: ClusterIP
port: 3000
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 8
# Marketplace Web
marketplace:
enabled: true
replicas: 3
image:
repository: aitbc/marketplace-web
tag: stable
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
service:
type: ClusterIP
port: 3001
autoscaling:
enabled: true
minReplicas: 3
maxReplicas: 8
# Wallet Daemon
wallet:
enabled: true
replicas: 2
image:
repository: aitbc/wallet-daemon
tag: stable
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: 2000m
memory: 2Gi
service:
type: ClusterIP
port: 8002
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 6
# Trade Exchange
exchange:
enabled: true
replicas: 2
image:
repository: aitbc/trade-exchange
tag: stable
resources:
requests:
cpu: 250m
memory: 512Mi
limits:
cpu: 1000m
memory: 1Gi
service:
type: ClusterIP
port: 8085
# PostgreSQL (prod uses RDS Multi-AZ)
postgresql:
enabled: false
external:
host: secretRef:db-credentials:host
port: 5432
database: coordinator
sslMode: require
# Redis (prod uses ElastiCache)
redis:
enabled: false
external:
host: secretRef:redis-credentials:host
port: 6379
auth: true
# Ingress
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/proxy-body-size: 10m
nginx.ingress.kubernetes.io/rate-limit: "100"
nginx.ingress.kubernetes.io/rate-limit-window: 1m
cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
- secretName: prod-tls
hosts:
- aitbc.bubuit.net
hosts:
- host: aitbc.bubuit.net
paths:
- path: /api
service: coordinator
port: 8001
- path: /explorer
service: explorer
port: 3000
- path: /marketplace
service: marketplace
port: 3001
- path: /wallet
service: wallet
port: 8002
- path: /Exchange
service: exchange
port: 8085
# Monitoring
monitoring:
enabled: true
prometheus:
enabled: true
retention: 30d
resources:
requests:
cpu: 500m
memory: 2Gi
limits:
cpu: 2000m
memory: 4Gi
grafana:
enabled: true
persistence:
enabled: true
size: 10Gi
alertmanager:
enabled: true
config:
receivers:
- name: slack
slack_configs:
- channel: '#aitbc-alerts'
send_resolved: true
# Logging
logging:
enabled: true
level: warn
elasticsearch:
enabled: true
retention: 30d
replicas: 3
# Pod Disruption Budgets
podDisruptionBudget:
coordinator:
minAvailable: 2
explorer:
minAvailable: 2
marketplace:
minAvailable: 2
wallet:
minAvailable: 1
# Network Policies
networkPolicy:
enabled: true
ingress:
- from:
- namespaceSelector:
matchLabels:
name: ingress-nginx
egress:
- to:
- namespaceSelector:
matchLabels:
name: kube-system
ports:
- port: 53
protocol: UDP
# Security
securityContext:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 1000
readOnlyRootFilesystem: true
# Affinity - spread across zones
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: coordinator
topologyKey: topology.kubernetes.io/zone
# Priority Classes
priorityClassName: high-priority

View File

@@ -1,247 +0,0 @@
# AITBC Nginx Reverse Proxy Configuration
# Domain: aitbc.keisanki.net
# This configuration replaces the need for firehol/iptables port forwarding
# HTTP to HTTPS redirect
server {
listen 80;
server_name aitbc.keisanki.net;
# Redirect all HTTP traffic to HTTPS
return 301 https://$server_name$request_uri;
}
# Main HTTPS server block
server {
listen 443 ssl http2;
server_name aitbc.keisanki.net;
# SSL Configuration (Let's Encrypt certificates)
ssl_certificate /etc/letsencrypt/live/aitbc.keisanki.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/aitbc.keisanki.net/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline' 'unsafe-eval'" always;
# Enable gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json;
# Blockchain Explorer (main route)
location / {
proxy_pass http://192.168.100.10:3000;
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;
proxy_buffering off;
# WebSocket support if needed
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# Coordinator API
location /api/ {
proxy_pass http://192.168.100.10:8000/v1/;
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;
proxy_buffering off;
# CORS headers for API
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-Api-Key" always;
# Handle preflight requests
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-Api-Key";
add_header Access-Control-Max-Age 1728000;
add_header Content-Type "text/plain; charset=utf-8";
add_header Content-Length 0;
return 204;
}
}
# Blockchain Node 1 RPC
location /rpc/ {
proxy_pass http://192.168.100.10:8082/rpc/;
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;
proxy_buffering off;
}
# Blockchain Node 2 RPC (alternative endpoint)
location /rpc2/ {
proxy_pass http://192.168.100.10:8081/rpc/;
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;
proxy_buffering off;
}
# Exchange API
location /exchange/ {
proxy_pass http://192.168.100.10:9080/;
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;
proxy_buffering off;
}
# Marketplace UI (if separate from explorer)
location /marketplace/ {
proxy_pass http://192.168.100.10:3001/;
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;
proxy_buffering off;
# Handle subdirectory rewrite
rewrite ^/marketplace/(.*)$ /$1 break;
}
# Admin dashboard
location /admin/ {
proxy_pass http://192.168.100.10:8080/;
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;
proxy_buffering off;
# Optional: Restrict admin access
# allow 192.168.100.0/24;
# allow 127.0.0.1;
# deny all;
}
# Health check endpoint
location /health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
# API health checks
location /api/health {
proxy_pass http://192.168.100.10:8000/v1/health;
proxy_set_header Host $host;
access_log off;
}
# Static assets caching
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
proxy_pass http://192.168.100.10:3000;
expires 1y;
add_header Cache-Control "public, immutable";
add_header X-Content-Type-Options nosniff;
# Don't log static file access
access_log off;
}
# Deny access to hidden files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Custom error pages
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
# Optional: Subdomain for API-only access
server {
listen 443 ssl http2;
server_name api.aitbc.keisanki.net;
# SSL Configuration (same certificates)
ssl_certificate /etc/letsencrypt/live/aitbc.keisanki.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/aitbc.keisanki.net/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Security headers
add_header X-Frame-Options "DENY" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# API routes only
location / {
proxy_pass http://192.168.100.10:8000/v1/;
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;
proxy_buffering off;
# CORS headers
add_header Access-Control-Allow-Origin "*" always;
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-Api-Key" always;
# Handle preflight requests
if ($request_method = 'OPTIONS') {
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,X-Api-Key";
add_header Access-Control-Max-Age 1728000;
add_header Content-Type "text/plain; charset=utf-8";
add_header Content-Length 0;
return 204;
}
}
}
# Optional: Subdomain for blockchain RPC
server {
listen 443 ssl http2;
server_name rpc.aitbc.keisanki.net;
# SSL Configuration
ssl_certificate /etc/letsencrypt/live/aitbc.keisanki.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/aitbc.keisanki.net/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Security headers
add_header X-Frame-Options "DENY" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
# RPC routes
location / {
proxy_pass http://192.168.100.10:8082/rpc/;
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;
proxy_buffering off;
}
}

View File

@@ -1,9 +1,10 @@
# AITBC Services Nginx Configuration
# Domain: https://aitbc.bubuit.net
# Copy to nginx-aitbc.conf and replace YOUR_DOMAIN with your actual domain
# Adjust ports if your services run on different ones
server {
listen 80;
server_name aitbc.bubuit.net;
server_name YOUR_DOMAIN;
# Redirect to HTTPS
return 301 https://$server_name$request_uri;
@@ -11,11 +12,11 @@ server {
server {
listen 443 ssl http2;
server_name aitbc.bubuit.net;
server_name YOUR_DOMAIN;
# SSL Configuration (Let's Encrypt)
ssl_certificate /etc/letsencrypt/live/aitbc.bubuit.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/aitbc.bubuit.net/privkey.pem;
ssl_certificate /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
@@ -26,7 +27,7 @@ server {
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
# API Routes
# Coordinator API
location /api/ {
proxy_pass http://127.0.0.1:8000/v1/;
proxy_set_header Host $host;
@@ -36,7 +37,7 @@ server {
proxy_buffering off;
}
# Blockchain RPC Routes
# Blockchain RPC
location /rpc/ {
proxy_pass http://127.0.0.1:9080/rpc/;
proxy_set_header Host $host;
@@ -53,8 +54,6 @@ server {
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;
# Handle subdirectory
rewrite ^/Marketplace/(.*)$ /$1 break;
proxy_buffering off;
}
@@ -66,32 +65,11 @@ server {
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;
# Handle subdirectory
rewrite ^/Exchange/(.*)$ /$1 break;
proxy_buffering off;
}
# Exchange API Routes
location /api/trades/ {
proxy_pass http://127.0.0.1:3003/api/trades/;
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;
proxy_buffering off;
}
location /api/orders {
proxy_pass http://127.0.0.1:3003/api/orders;
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;
proxy_buffering off;
}
# Wallet CLI API (if needed)
# Wallet API
location /wallet/ {
proxy_pass http://127.0.0.1:8000/wallet/;
proxy_set_header Host $host;
@@ -100,29 +78,17 @@ server {
proxy_set_header X-Forwarded-Proto $scheme;
}
# Admin routes
location /admin/ {
proxy_pass http://127.0.0.1:8000/admin/;
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;
# Restrict access (optional)
# allow 127.0.0.1;
# allow 10.1.223.0/24;
# deny all;
}
# Health check
location /health {
proxy_pass http://127.0.0.1:8000/v1/health;
proxy_set_header Host $host;
}
# Default redirect to Marketplace
# Default — serve static website
location / {
return 301 /Marketplace;
root /var/www/html;
index index.html;
try_files $uri $uri/ =404;
}
# Static file caching

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# Clean up failed deployment and prepare for redeployment
echo "🧹 Cleaning up failed deployment..."
echo "=================================="
# Stop any running services
echo "Stopping services..."
ssh ns3-root "systemctl stop blockchain-node blockchain-rpc nginx 2>/dev/null || true"
# Remove old directories
echo "Removing old directories..."
ssh ns3-root "rm -rf /opt/blockchain-node /opt/blockchain-node-src /opt/blockchain-explorer 2>/dev/null || true"
# Remove systemd services
echo "Removing systemd services..."
ssh ns3-root "systemctl disable blockchain-node blockchain-rpc blockchain-explorer 2>/dev/null || true"
ssh ns3-root "rm -f /etc/systemd/system/blockchain-node.service /etc/systemd/system/blockchain-rpc.service /etc/systemd/system/blockchain-explorer.service 2>/dev/null || true"
ssh ns3-root "systemctl daemon-reload"
echo "✅ Cleanup complete!"
echo ""
echo "You can now run: ./scripts/deploy/deploy-all-remote.sh"

View File

@@ -1,109 +0,0 @@
#!/usr/bin/env python3
"""
Deploy AITBC services to incus container
"""
import subprocess
import time
import sys
def run_command(cmd, container=None):
"""Run command locally or in container"""
if container:
cmd = f"incus exec {container} -- {cmd}"
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
if result.returncode != 0:
print(f"Error: {result.stderr}")
return False
return True
def deploy_to_container():
container = "aitbc"
container_ip = "10.1.223.93"
print("🚀 Deploying AITBC services to container...")
# Stop local services
print("\n📋 Stopping local services...")
subprocess.run("sudo fuser -k 8000/tcp 2>/dev/null || true", shell=True)
subprocess.run("sudo fuser -k 9080/tcp 2>/dev/null || true", shell=True)
subprocess.run("pkill -f 'marketplace-ui' 2>/dev/null || true", shell=True)
subprocess.run("pkill -f 'trade-exchange' 2>/dev/null || true", shell=True)
# Copy project to container
print("\n📁 Copying project to container...")
subprocess.run(f"incus file push -r /home/oib/windsurf/aitbc {container}/home/oib/", shell=True)
# Setup Python environment in container
print("\n🐍 Setting up Python environment...")
run_command("cd /home/oib/aitbc && python3 -m venv .venv", container)
run_command("cd /home/oib/aitbc && source .venv/bin/activate && pip install fastapi uvicorn httpx sqlmodel", container)
# Install dependencies
print("\n📦 Installing dependencies...")
run_command("cd /home/oib/aitbc/apps/coordinator-api && source ../../.venv/bin/activate && pip install -e .", container)
run_command("cd /home/oib/aitbc/apps/blockchain-node && source ../../.venv/bin/activate && pip install -e .", container)
# Create startup script
print("\n🔧 Creating startup script...")
startup_script = """#!/bin/bash
cd /home/oib/aitbc
# Start blockchain node
echo "Starting blockchain node..."
cd apps/blockchain-node
source ../../.venv/bin/activate
python -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 9080 &
NODE_PID=$!
# Start coordinator API
echo "Starting coordinator API..."
cd ../coordinator-api
source ../../.venv/bin/activate
python -m uvicorn src.app.main:app --host 0.0.0.0 --port 8000 &
COORD_PID=$!
# Start marketplace UI
echo "Starting marketplace UI..."
cd ../marketplace-ui
python server.py --port 3001 &
MARKET_PID=$!
# Start trade exchange
echo "Starting trade exchange..."
cd ../trade-exchange
python server.py --port 3002 &
EXCHANGE_PID=$!
echo "Services started!"
echo "Blockchain: http://10.1.223.93:9080"
echo "API: http://10.1.223.93:8000"
echo "Marketplace: http://10.1.223.93:3001"
echo "Exchange: http://10.1.223.93:3002"
# Wait for services
wait $NODE_PID $COORD_PID $MARKET_PID $EXCHANGE_PID
"""
# Write startup script to container
with open('/tmp/start_aitbc.sh', 'w') as f:
f.write(startup_script)
subprocess.run("incus file push /tmp/start_aitbc.sh aitbc/home/oib/", shell=True)
run_command("chmod +x /home/oib/start_aitbc.sh", container)
# Start services
print("\n🚀 Starting AITBC services...")
run_command("/home/oib/start_aitbc.sh", container)
print(f"\n✅ Services deployed to container!")
print(f"\n📋 Access URLs:")
print(f" 🌐 Container IP: {container_ip}")
print(f" 📊 Marketplace: http://{container_ip}:3001")
print(f" 💱 Trade Exchange: http://{container_ip}:3002")
print(f" 🔗 API: http://{container_ip}:8000")
print(f" ⛓️ Blockchain: http://{container_ip}:9080")
if __name__ == "__main__":
deploy_to_container()

View File

@@ -1,56 +0,0 @@
#!/bin/bash
# Deploy blockchain node and explorer by building directly on ns3
echo "🚀 AITBC Remote Deployment (Build on Server)"
echo "=========================================="
echo "This will build the blockchain node directly on ns3"
echo "to utilize the gigabit connection instead of uploading."
echo ""
# Copy deployment scripts to server
echo "Copying deployment scripts to ns3..."
scp scripts/deploy/deploy-blockchain-remote.sh ns3-root:/opt/
scp scripts/deploy/deploy-explorer-remote.sh ns3-root:/opt/
# Create directories on server first
echo "Creating directories on ns3..."
ssh ns3-root "mkdir -p /opt/blockchain-node-src /opt/blockchain-node"
# Copy blockchain source code to server (excluding data files)
echo "Copying blockchain source code to ns3..."
rsync -av --exclude='data/' --exclude='*.db' --exclude='__pycache__' --exclude='.venv' apps/blockchain-node/ ns3-root:/opt/blockchain-node-src/
# Execute blockchain deployment
echo ""
echo "Deploying blockchain node..."
ssh ns3-root "cd /opt && cp -r /opt/blockchain-node-src/* /opt/blockchain-node/ && cd /opt/blockchain-node && chmod +x ../deploy-blockchain-remote.sh && ../deploy-blockchain-remote.sh"
# Wait for blockchain to start
echo ""
echo "Waiting 10 seconds for blockchain node to start..."
sleep 10
# Execute explorer deployment on ns3
echo ""
echo "Deploying blockchain explorer..."
ssh ns3-root "cd /opt && ./deploy-explorer-remote.sh"
# Check services
echo ""
echo "Checking service status..."
ssh ns3-root "systemctl status blockchain-node blockchain-rpc nginx --no-pager | grep -E 'Active:|Main PID:'"
echo ""
echo "✅ Deployment complete!"
echo ""
echo "Services:"
echo " - Blockchain Node RPC: http://localhost:8082"
echo " - Blockchain Explorer: http://localhost:3000"
echo ""
echo "External access:"
echo " - Blockchain Node RPC: http://aitbc.keisanki.net:8082"
echo " - Blockchain Explorer: http://aitbc.keisanki.net:3000"
echo ""
echo "The blockchain node will start syncing automatically."
echo "The explorer connects to the local node and displays real-time data."

View File

@@ -1,207 +0,0 @@
#!/bin/bash
# Deploy blockchain node and explorer to incus container
set -e
echo "🚀 Deploying Blockchain Node and Explorer"
echo "========================================"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Copy blockchain node to container
print_status "Copying blockchain node to container..."
ssh ns3-root "rm -rf /opt/blockchain-node 2>/dev/null || true"
scp -r apps/blockchain-node ns3-root:/opt/
# Setup blockchain node in container
print_status "Setting up blockchain node..."
ssh ns3-root << 'EOF'
cd /opt/blockchain-node
# Create configuration
cat > .env << EOL
CHAIN_ID=ait-devnet
DB_PATH=./data/chain.db
RPC_BIND_HOST=0.0.0.0
RPC_BIND_PORT=8082
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7070
PROPOSER_KEY=proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=memory
EOL
# Create data directory
mkdir -p data/devnet
# Setup Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
# Generate genesis
export PYTHONPATH="${PWD}/src:${PWD}/scripts:${PYTHONPATH:-}"
python scripts/make_genesis.py --output data/devnet/genesis.json --force
EOF
# Create systemd service for blockchain node
print_status "Creating systemd service for blockchain node..."
ssh ns3-root << 'EOF'
cat > /etc/systemd/system/blockchain-node.service << EOL
[Unit]
Description=AITBC Blockchain Node
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m aitbc_chain.main
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
cat > /etc/systemd/system/blockchain-rpc.service << EOL
[Unit]
Description=AITBC Blockchain RPC API
After=blockchain-node.service
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 8082
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
systemctl daemon-reload
systemctl enable blockchain-node blockchain-rpc
EOF
# Start blockchain node
print_status "Starting blockchain node..."
ssh ns3-root "systemctl start blockchain-node blockchain-rpc"
# Wait for node to start
print_status "Waiting for blockchain node to start..."
sleep 5
# Check status
print_status "Checking blockchain node status..."
ssh ns3-root "systemctl status blockchain-node blockchain-rpc --no-pager | grep -E 'Active:|Main PID:'"
# Copy explorer to container
print_status "Copying blockchain explorer to container..."
ssh ns3-root "rm -rf /opt/blockchain-explorer 2>/dev/null || true"
scp -r apps/blockchain-explorer ns3-root:/opt/
# Setup explorer in container
print_status "Setting up blockchain explorer..."
ssh ns3-root << 'EOF'
cd /opt/blockchain-explorer
# Create Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
EOF
# Create systemd service for explorer
print_status "Creating systemd service for blockchain explorer..."
ssh ns3-root << 'EOF'
cat > /etc/systemd/system/blockchain-explorer.service << EOL
[Unit]
Description=AITBC Blockchain Explorer
After=blockchain-rpc.service
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-explorer
Environment=PATH=/opt/blockchain-explorer/.venv/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=/opt/blockchain-explorer/.venv/bin/python3 main.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
systemctl daemon-reload
systemctl enable blockchain-explorer
EOF
# Start explorer
print_status "Starting blockchain explorer..."
ssh ns3-root "systemctl start blockchain-explorer"
# Wait for explorer to start
print_status "Waiting for explorer to start..."
sleep 3
# Setup port forwarding
print_status "Setting up port forwarding..."
ssh ns3-root << 'EOF'
# Clear existing NAT rules
iptables -t nat -F PREROUTING 2>/dev/null || true
iptables -t nat -F POSTROUTING 2>/dev/null || true
# Add port forwarding for blockchain RPC
iptables -t nat -A PREROUTING -p tcp --dport 8082 -j DNAT --to-destination 192.168.100.10:8082
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 8082 -j MASQUERADE
# Add port forwarding for explorer
iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to-destination 192.168.100.10:3000
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 3000 -j MASQUERADE
# Save rules
mkdir -p /etc/iptables
iptables-save > /etc/iptables/rules.v4
# Install iptables-persistent for persistence
apt-get update
apt-get install -y iptables-persistent
EOF
# Check all services
print_status "Checking all services..."
ssh ns3-root "systemctl status blockchain-node blockchain-rpc blockchain-explorer --no-pager | grep -E 'Active:|Main PID:'"
print_success "✅ Deployment complete!"
echo ""
echo "Services deployed:"
echo " - Blockchain Node RPC: http://192.168.100.10:8082"
echo " - Blockchain Explorer: http://192.168.100.10:3000"
echo ""
echo "External access:"
echo " - Blockchain Node RPC: http://aitbc.keisanki.net:8082"
echo " - Blockchain Explorer: http://aitbc.keisanki.net:3000"
echo ""
echo "The explorer is connected to the local blockchain node and will display"
echo "real-time blockchain data including blocks and transactions."

View File

@@ -1,94 +0,0 @@
#!/bin/bash
# Deploy blockchain explorer to incus container
set -e
echo "🔍 Deploying Blockchain Explorer"
echo "================================="
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Copy explorer to container
print_status "Copying blockchain explorer to container..."
ssh ns3-root "rm -rf /opt/blockchain-explorer 2>/dev/null || true"
scp -r apps/blockchain-explorer ns3-root:/opt/
# Setup explorer in container
print_status "Setting up blockchain explorer..."
ssh ns3-root << 'EOF'
cd /opt/blockchain-explorer
# Create Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
EOF
# Create systemd service for explorer
print_status "Creating systemd service for blockchain explorer..."
ssh ns3-root << 'EOF'
cat > /etc/systemd/system/blockchain-explorer.service << EOL
[Unit]
Description=AITBC Blockchain Explorer
After=blockchain-rpc.service
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-explorer
Environment=PATH=/opt/blockchain-explorer/.venv/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=/opt/blockchain-explorer/.venv/bin/python3 main.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
systemctl daemon-reload
systemctl enable blockchain-explorer
EOF
# Start explorer
print_status "Starting blockchain explorer..."
ssh ns3-root "systemctl start blockchain-explorer"
# Wait for explorer to start
print_status "Waiting for explorer to start..."
sleep 3
# Setup port forwarding for explorer
print_status "Setting up port forwarding for explorer..."
ssh ns3-root << 'EOF'
# Add port forwarding for explorer
iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to-destination 192.168.100.10:3000
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 3000 -j MASQUERADE
# Save rules
iptables-save > /etc/iptables/rules.v4
EOF
# Check status
print_status "Checking blockchain explorer status..."
ssh ns3-root "systemctl status blockchain-explorer --no-pager | grep -E 'Active:|Main PID:'"
print_success "✅ Blockchain explorer deployed!"
echo ""
echo "Explorer URL: http://192.168.100.10:3000"
echo "External URL: http://aitbc.keisanki.net:3000"
echo ""
echo "The explorer will automatically connect to the local blockchain node."
echo "You can view blocks, transactions, and chain statistics."

View File

@@ -1,157 +0,0 @@
#!/bin/bash
# Deploy blockchain node directly on ns3 server (build in place)
set -e
echo "🚀 Deploying Blockchain Node on ns3 (Build in Place)"
echo "====================================================="
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Check if we're on the right server
print_status "Checking server..."
if [ "$(hostname)" != "ns3" ] && [ "$(hostname)" != "aitbc" ]; then
print_warning "This script should be run on ns3 server"
echo "Please run: ssh ns3-root"
echo "Then: cd /opt && ./deploy-blockchain-remote.sh"
exit 1
fi
# Install dependencies if needed
print_status "Installing dependencies..."
apt-get update
apt-get install -y python3 python3-venv python3-pip git curl
# Create directory
print_status "Creating blockchain node directory..."
mkdir -p /opt/blockchain-node
cd /opt/blockchain-node
# Check if source code exists
if [ ! -d "src" ]; then
print_status "Source code not found in /opt/blockchain-node, copying from /opt/blockchain-node-src..."
if [ -d "/opt/blockchain-node-src" ]; then
cp -r /opt/blockchain-node-src/* .
else
print_warning "Source code not found. Please ensure it was copied properly."
exit 1
fi
fi
# Setup Python environment
print_status "Setting up Python environment..."
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
# Create configuration with auto-sync
print_status "Creating configuration..."
cat > .env << EOL
CHAIN_ID=ait-devnet
DB_PATH=./data/chain.db
RPC_BIND_HOST=0.0.0.0
RPC_BIND_PORT=8082
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7070
PROPOSER_KEY=proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=memory
EOL
# Create fresh data directory
print_status "Creating fresh data directory..."
rm -rf data
mkdir -p data/devnet
# Generate fresh genesis
print_status "Generating fresh genesis block..."
export PYTHONPATH="${PWD}/src:${PWD}/scripts:${PYTHONPATH:-}"
python scripts/make_genesis.py --output data/devnet/genesis.json --force
# Create systemd service for blockchain node
print_status "Creating systemd services..."
cat > /etc/systemd/system/blockchain-node.service << EOL
[Unit]
Description=AITBC Blockchain Node
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m aitbc_chain.main
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
cat > /etc/systemd/system/blockchain-rpc.service << EOL
[Unit]
Description=AITBC Blockchain RPC API
After=blockchain-node.service
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 8082
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
# Enable and start services
print_status "Starting blockchain node..."
systemctl daemon-reload
systemctl enable blockchain-node blockchain-rpc
systemctl start blockchain-node blockchain-rpc
# Wait for services to start
print_status "Waiting for services to start..."
sleep 5
# Check status
print_status "Checking service status..."
systemctl status blockchain-node blockchain-rpc --no-pager | head -15
# Setup port forwarding if in container
if [ "$(hostname)" = "aitbc" ]; then
print_status "Setting up port forwarding..."
iptables -t nat -A PREROUTING -p tcp --dport 8082 -j DNAT --to-destination 192.168.100.10:8082
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 8082 -j MASQUERADE
iptables-save > /etc/iptables/rules.v4
fi
print_success "✅ Blockchain node deployed!"
echo ""
if [ "$(hostname)" = "aitbc" ]; then
echo "Node RPC: http://192.168.100.10:8082"
echo "External RPC: http://aitbc.keisanki.net:8082"
else
echo "Node RPC: http://95.216.198.140:8082"
echo "External RPC: http://aitbc.keisanki.net:8082"
fi
echo ""
echo "The node will automatically sync on startup."

View File

@@ -1,139 +0,0 @@
#!/bin/bash
# Deploy blockchain node and explorer to incus container
set -e
echo "🚀 Deploying Blockchain Node and Explorer"
echo "========================================"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Copy blockchain node to container
print_status "Copying blockchain node to container..."
ssh ns3-root "rm -rf /opt/blockchain-node 2>/dev/null || true"
scp -r apps/blockchain-node ns3-root:/opt/
# Setup blockchain node in container
print_status "Setting up blockchain node..."
ssh ns3-root << 'EOF'
cd /opt/blockchain-node
# Create configuration
cat > .env << EOL
CHAIN_ID=ait-devnet
DB_PATH=./data/chain.db
RPC_BIND_HOST=0.0.0.0
RPC_BIND_PORT=8082
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7070
PROPOSER_KEY=proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=memory
EOL
# Create data directory
mkdir -p data/devnet
# Setup Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
# Generate genesis
export PYTHONPATH="${PWD}/src:${PWD}/scripts:${PYTHONPATH:-}"
python scripts/make_genesis.py --output data/devnet/genesis.json --force
EOF
# Create systemd service for blockchain node
print_status "Creating systemd service for blockchain node..."
ssh ns3-root << 'EOF'
cat > /etc/systemd/system/blockchain-node.service << EOL
[Unit]
Description=AITBC Blockchain Node
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m aitbc_chain.main
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
cat > /etc/systemd/system/blockchain-rpc.service << EOL
[Unit]
Description=AITBC Blockchain RPC API
After=blockchain-node.service
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 8082
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
systemctl daemon-reload
systemctl enable blockchain-node blockchain-rpc
EOF
# Start blockchain node
print_status "Starting blockchain node..."
ssh ns3-root "systemctl start blockchain-node blockchain-rpc"
# Wait for node to start
print_status "Waiting for blockchain node to start..."
sleep 5
# Check status
print_status "Checking blockchain node status..."
ssh ns3-root "systemctl status blockchain-node blockchain-rpc --no-pager | grep -E 'Active:|Main PID:'"
# Setup port forwarding
print_status "Setting up port forwarding..."
ssh ns3-root << 'EOF'
# Clear existing rules
iptables -t nat -F PREROUTING 2>/dev/null || true
iptables -t nat -F POSTROUTING 2>/dev/null || true
# Add port forwarding for blockchain RPC
iptables -t nat -A PREROUTING -p tcp --dport 8082 -j DNAT --to-destination 192.168.100.10:8082
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 8082 -j MASQUERADE
# Save rules
mkdir -p /etc/iptables
iptables-save > /etc/iptables/rules.v4
EOF
print_success "✅ Blockchain node deployed!"
echo ""
echo "Node RPC: http://192.168.100.10:8082"
echo "External RPC: http://aitbc.keisanki.net:8082"
echo ""
echo "Next: Deploying blockchain explorer..."

View File

@@ -1,316 +0,0 @@
#!/bin/bash
# Deploy blockchain node and explorer directly on ns3
set -e
echo "🚀 AITBC Direct Deployment on ns3"
echo "================================="
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Check if we're on ns3
if [ "$(hostname)" != "ns3" ] && [ "$(hostname)" != "aitbc" ]; then
print_warning "This script must be run on ns3 server"
echo "Run: ssh ns3-root"
echo "Then: cd /opt && ./deploy-direct.sh"
exit 1
fi
# Stop existing services
print_status "Stopping existing services..."
systemctl stop blockchain-node blockchain-rpc blockchain-explorer nginx 2>/dev/null || true
# Install dependencies
print_status "Installing dependencies..."
apt-get update
apt-get install -y python3 python3-venv python3-pip git curl nginx
# Deploy blockchain node
print_status "Deploying blockchain node..."
cd /opt
rm -rf blockchain-node
cp -r blockchain-node-src blockchain-node
cd blockchain-node
# Create configuration
print_status "Creating configuration..."
cat > .env << EOL
CHAIN_ID=ait-devnet
DB_PATH=./data/chain.db
RPC_BIND_HOST=0.0.0.0
RPC_BIND_PORT=8082
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7070
PROPOSER_KEY=proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=memory
EOL
# Create fresh data directory
rm -rf data
mkdir -p data/devnet
# Setup Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
# Generate genesis
export PYTHONPATH="${PWD}/src:${PWD}/scripts:${PYTHONPATH:-}"
python scripts/make_genesis.py --output data/devnet/genesis.json --force
# Create systemd services
print_status "Creating systemd services..."
cat > /etc/systemd/system/blockchain-node.service << EOL
[Unit]
Description=AITBC Blockchain Node
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m aitbc_chain.main
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
cat > /etc/systemd/system/blockchain-rpc.service << EOL
[Unit]
Description=AITBC Blockchain RPC API
After=blockchain-node.service
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 8082
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
# Start blockchain services
print_status "Starting blockchain services..."
systemctl daemon-reload
systemctl enable blockchain-node blockchain-rpc
systemctl start blockchain-node blockchain-rpc
# Deploy explorer
print_status "Deploying blockchain explorer..."
cd /opt
rm -rf blockchain-explorer
mkdir -p blockchain-explorer
cd blockchain-explorer
# Create HTML explorer
cat > index.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Blockchain Explorer</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
</head>
<body class="bg-gray-50">
<header class="bg-blue-600 text-white shadow-lg">
<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="cube" class="w-8 h-8"></i>
<h1 class="text-2xl font-bold">AITBC Blockchain Explorer</h1>
</div>
<button onclick="refreshData()" class="bg-blue-500 hover:bg-blue-400 px-3 py-1 rounded flex items-center space-x-1">
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
<span>Refresh</span>
</button>
</div>
</div>
</header>
<main class="container mx-auto px-4 py-8">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Current Height</p>
<p class="text-2xl font-bold" id="chain-height">-</p>
</div>
<i data-lucide="trending-up" class="w-10 h-10 text-green-500"></i>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Latest Block</p>
<p class="text-lg font-mono" id="latest-hash">-</p>
</div>
<i data-lucide="hash" class="w-10 h-10 text-blue-500"></i>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Node Status</p>
<p class="text-lg font-semibold" id="node-status">-</p>
</div>
<i data-lucide="activity" class="w-10 h-10 text-purple-500"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow">
<div class="px-6 py-4 border-b">
<h2 class="text-xl font-semibold flex items-center">
<i data-lucide="blocks" class="w-5 h-5 mr-2"></i>
Latest Blocks
</h2>
</div>
<div class="p-6">
<table class="w-full">
<thead>
<tr class="text-left text-gray-500 text-sm">
<th class="pb-3">Height</th>
<th class="pb-3">Hash</th>
<th class="pb-3">Timestamp</th>
<th class="pb-3">Transactions</th>
</tr>
</thead>
<tbody id="blocks-table">
<tr>
<td colspan="4" class="text-center py-8 text-gray-500">
Loading blocks...
</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
<script>
lucide.createIcons();
const RPC_URL = 'http://localhost:8082';
async function refreshData() {
try {
const response = await fetch(`${RPC_URL}/rpc/head`);
const head = await response.json();
document.getElementById('chain-height').textContent = head.height || '-';
document.getElementById('latest-hash').textContent = head.hash ? head.hash.substring(0, 16) + '...' : '-';
document.getElementById('node-status').innerHTML = '<span class="text-green-500">Online</span>';
// Load last 10 blocks
const tbody = document.getElementById('blocks-table');
tbody.innerHTML = '';
for (let i = 0; i < 10 && head.height - i >= 0; i++) {
const blockResponse = await fetch(`${RPC_URL}/rpc/blocks/${head.height - i}`);
const block = await blockResponse.json();
const row = tbody.insertRow();
row.innerHTML = `
<td class="py-3 font-mono">${block.height}</td>
<td class="py-3 font-mono text-sm">${block.hash ? block.hash.substring(0, 16) + '...' : '-'}</td>
<td class="py-3 text-sm">${new Date(block.timestamp * 1000).toLocaleString()}</td>
<td class="py-3">${block.transactions ? block.transactions.length : 0}</td>
`;
}
} catch (error) {
console.error('Error:', error);
document.getElementById('node-status').innerHTML = '<span class="text-red-500">Error</span>';
}
}
refreshData();
setInterval(refreshData, 30000);
</script>
</body>
</html>
EOF
# Configure nginx
print_status "Configuring nginx..."
cat > /etc/nginx/sites-available/blockchain-explorer << EOL
server {
listen 3000;
server_name _;
root /opt/blockchain-explorer;
index index.html;
location / {
try_files \$uri \$uri/ =404;
}
}
EOL
ln -sf /etc/nginx/sites-available/blockchain-explorer /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
nginx -t
systemctl reload nginx
# Setup port forwarding if in container
if [ "$(hostname)" = "aitbc" ]; then
print_status "Setting up port forwarding..."
iptables -t nat -F PREROUTING 2>/dev/null || true
iptables -t nat -F POSTROUTING 2>/dev/null || true
iptables -t nat -A PREROUTING -p tcp --dport 8082 -j DNAT --to-destination 192.168.100.10:8082
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 8082 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to-destination 192.168.100.10:3000
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 3000 -j MASQUERADE
iptables-save > /etc/iptables/rules.v4
fi
# Wait for services to start
print_status "Waiting for services to start..."
sleep 5
# Check services
print_status "Checking service status..."
systemctl status blockchain-node blockchain-rpc nginx --no-pager | grep -E 'Active:|Main PID:'
print_success "✅ Deployment complete!"
echo ""
echo "Services:"
if [ "$(hostname)" = "aitbc" ]; then
echo " - Blockchain Node RPC: http://192.168.100.10:8082"
echo " - Blockchain Explorer: http://192.168.100.10:3000"
echo ""
echo "External access:"
echo " - Blockchain Node RPC: http://aitbc.keisanki.net:8082"
echo " - Blockchain Explorer: http://aitbc.keisanki.net:3000"
else
echo " - Blockchain Node RPC: http://localhost:8082"
echo " - Blockchain Explorer: http://localhost:3000"
echo ""
echo "External access:"
echo " - Blockchain Node RPC: http://aitbc.keisanki.net:8082"
echo " - Blockchain Explorer: http://aitbc.keisanki.net:3000"
fi

View File

@@ -1,88 +0,0 @@
#!/bin/bash
# Deploy AITBC services to domain https://aitbc.bubuit.net
set -e
DOMAIN="aitbc.bubuit.net"
CONTAINER="aitbc"
echo "🚀 Deploying AITBC services to https://$DOMAIN"
echo ""
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Stop local services
print_status "Stopping local services..."
sudo fuser -k 8000/tcp 2>/dev/null || true
sudo fuser -k 9080/tcp 2>/dev/null || true
sudo fuser -k 3001/tcp 2>/dev/null || true
sudo fuser -k 3002/tcp 2>/dev/null || true
# Deploy to container
print_status "Deploying to container..."
python /home/oib/windsurf/aitbc/container-deploy.py
# Copy nginx config to container
print_status "Configuring nginx for domain..."
incus file push /home/oib/windsurf/aitbc/nginx-aitbc.conf $CONTAINER/etc/nginx/sites-available/aitbc
# Enable site
incus exec $CONTAINER -- ln -sf /etc/nginx/sites-available/aitbc /etc/nginx/sites-enabled/
incus exec $CONTAINER -- rm -f /etc/nginx/sites-enabled/default
# Test nginx config
incus exec $CONTAINER -- nginx -t
# Reload nginx
incus exec $CONTAINER -- systemctl reload nginx
# Install SSL certificate (Let's Encrypt)
print_warning "SSL Certificate Setup:"
echo "1. Ensure port 80/443 are forwarded to container IP (10.1.223.93)"
echo "2. Run certbot in container:"
echo " incus exec $CONTAINER -- certbot --nginx -d $DOMAIN"
echo ""
# Update UIs to use correct API endpoints
print_status "Updating API endpoints..."
# Update marketplace API base URL
incus exec $CONTAINER -- sed -i "s|http://127.0.0.1:8000|https://$DOMAIN/api|g" /home/oib/aitbc/apps/marketplace-ui/index.html
# Update exchange API endpoints
incus exec $CONTAINER -- sed -i "s|http://127.0.0.1:8000|https://$DOMAIN/api|g" /home/oib/aitbc/apps/trade-exchange/index.html
incus exec $CONTAINER -- sed -i "s|http://127.0.0.1:9080|https://$DOMAIN/rpc|g" /home/oib/aitbc/apps/trade-exchange/index.html
# Restart services to apply changes
print_status "Restarting services..."
incus exec $CONTAINER -- pkill -f "server.py"
sleep 2
incus exec $CONTAINER -- /home/oib/start_aitbc.sh
echo ""
print_status "✅ Deployment complete!"
echo ""
echo "📋 Service URLs:"
echo " 🌐 Domain: https://$DOMAIN"
echo " 📊 Marketplace: https://$DOMAIN/Marketplace"
echo " 💱 Trade Exchange: https://$DOMAIN/Exchange"
echo " 🔗 API: https://$DOMAIN/api"
echo " ⛓️ Blockchain RPC: https://$DOMAIN/rpc"
echo ""
echo "📝 Next Steps:"
echo "1. Forward ports 80/443 to container IP (10.1.223.93)"
echo "2. Install SSL certificate:"
echo " incus exec $CONTAINER -- certbot --nginx -d $DOMAIN"
echo "3. Test services at the URLs above"

View File

@@ -1,74 +0,0 @@
#!/bin/bash
# Deploy AITBC Trade Exchange to the server
set -e
SERVER="root@10.1.223.93"
EXCHANGE_DIR="/root/aitbc/apps/trade-exchange"
echo "🚀 Deploying AITBC Trade Exchange"
echo "=================================="
echo "Server: $SERVER"
echo ""
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Test SSH connection
print_status "Testing SSH connection..."
ssh $SERVER "hostname && ip a show eth0 | grep inet"
# Copy updated files
print_status "Copying updated Exchange files..."
scp /home/oib/windsurf/aitbc/apps/trade-exchange/index.html $SERVER:$EXCHANGE_DIR/
scp /home/oib/windsurf/aitbc/apps/trade-exchange/server.py $SERVER:$EXCHANGE_DIR/
# Ensure assets are available
print_status "Ensuring assets directory exists..."
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets"
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets/css"
ssh $SERVER "mkdir -p /var/www/aitbc.bubuit.net/assets/js"
# Copy assets if they don't exist
print_status "Copying assets if needed..."
if ! ssh $SERVER "test -f /var/www/aitbc.bubuit.net/assets/css/aitbc.css"; then
scp -r /home/oib/windsurf/aitbc/assets/* $SERVER:/var/www/aitbc.bubuit.net/assets/
fi
# Restart the exchange service
print_status "Restarting Trade Exchange service..."
ssh $SERVER "systemctl restart aitbc-exchange"
# Wait for service to start
print_status "Waiting for service to start..."
sleep 5
# Check service status
print_status "Checking service status..."
ssh $SERVER "systemctl status aitbc-exchange --no-pager -l | head -10"
# Test the endpoint
print_status "Testing Exchange endpoint..."
ssh $SERVER "curl -s http://127.0.0.1:3002/ | head -c 100"
echo ""
echo ""
print_status "✅ Exchange deployment complete!"
echo ""
echo "📋 URLs:"
echo " 🌐 IP: http://10.1.223.93/Exchange"
echo " 🔒 Domain: https://aitbc.bubuit.net/Exchange"
echo ""
echo "🔍 To check logs:"
echo " ssh $SERVER 'journalctl -u aitbc-exchange -f'"

View File

@@ -1,396 +0,0 @@
#!/bin/bash
# Deploy blockchain explorer directly on ns3 server
set -e
echo "🔍 Deploying Blockchain Explorer on ns3"
echo "======================================"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Check if we're on the right server
if [ "$(hostname)" != "ns3" ] && [ "$(hostname)" != "aitbc" ]; then
print_warning "This script should be run on ns3 server"
exit 1
fi
# Create directory
print_status "Creating blockchain explorer directory..."
mkdir -p /opt/blockchain-explorer
cd /opt/blockchain-explorer
# Create a simple HTML-based explorer (no build needed)
print_status "Creating web-based explorer..."
cat > index.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Blockchain Explorer</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
<style>
.fade-in { animation: fadeIn 0.3s ease-in; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
</style>
</head>
<body class="bg-gray-50">
<header class="bg-blue-600 text-white shadow-lg">
<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="cube" class="w-8 h-8"></i>
<h1 class="text-2xl font-bold">AITBC Blockchain Explorer</h1>
</div>
<div class="flex items-center space-x-4">
<span class="text-sm">Network: <span class="font-mono bg-blue-700 px-2 py-1 rounded">ait-devnet</span></span>
<button onclick="refreshData()" class="bg-blue-500 hover:bg-blue-400 px-3 py-1 rounded flex items-center space-x-1">
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
<span>Refresh</span>
</button>
</div>
</div>
</div>
</header>
<main class="container mx-auto px-4 py-8">
<!-- Chain Stats -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Current Height</p>
<p class="text-2xl font-bold" id="chain-height">-</p>
</div>
<i data-lucide="trending-up" class="w-10 h-10 text-green-500"></i>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Latest Block</p>
<p class="text-lg font-mono" id="latest-hash">-</p>
</div>
<i data-lucide="hash" class="w-10 h-10 text-blue-500"></i>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Node Status</p>
<p class="text-lg font-semibold" id="node-status">-</p>
</div>
<i data-lucide="activity" class="w-10 h-10 text-purple-500"></i>
</div>
</div>
</div>
<!-- Search -->
<div class="bg-white rounded-lg shadow p-6 mb-8">
<div class="flex space-x-4">
<input type="text" id="search-input" placeholder="Search by block height, hash, or transaction hash"
class="flex-1 px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500">
<button onclick="search()" class="bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700">
Search
</button>
</div>
</div>
<!-- Latest Blocks -->
<div class="bg-white rounded-lg shadow">
<div class="px-6 py-4 border-b">
<h2 class="text-xl font-semibold flex items-center">
<i data-lucide="blocks" class="w-5 h-5 mr-2"></i>
Latest Blocks
</h2>
</div>
<div class="p-6">
<div class="overflow-x-auto">
<table class="w-full">
<thead>
<tr class="text-left text-gray-500 text-sm">
<th class="pb-3">Height</th>
<th class="pb-3">Hash</th>
<th class="pb-3">Timestamp</th>
<th class="pb-3">Transactions</th>
<th class="pb-3">Actions</th>
</tr>
</thead>
<tbody id="blocks-table">
<tr>
<td colspan="5" class="text-center py-8 text-gray-500">
Loading blocks...
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Block Details Modal -->
<div id="block-modal" class="fixed inset-0 bg-black bg-opacity-50 hidden z-50">
<div class="flex items-center justify-center min-h-screen p-4">
<div class="bg-white rounded-lg max-w-4xl w-full max-h-[90vh] overflow-y-auto">
<div class="p-6 border-b">
<div class="flex justify-between items-center">
<h2 class="text-2xl font-bold">Block Details</h2>
<button onclick="closeModal()" class="text-gray-500 hover:text-gray-700">
<i data-lucide="x" class="w-6 h-6"></i>
</button>
</div>
</div>
<div class="p-6" id="block-details">
<!-- Block details will be loaded here -->
</div>
</div>
</div>
</div>
</main>
<footer class="bg-gray-800 text-white mt-12">
<div class="container mx-auto px-4 py-6 text-center">
<p class="text-sm">AITBC Blockchain Explorer - Connected to node at http://localhost:8082</p>
</div>
</footer>
<script>
// Initialize lucide icons
lucide.createIcons();
// RPC URL - change based on environment
const RPC_URL = window.location.hostname === 'localhost' ?
'http://localhost:8082' :
'http://95.216.198.140:8082';
// Global state
let currentData = {};
// Load initial data
document.addEventListener('DOMContentLoaded', () => {
refreshData();
});
// Refresh all data
async function refreshData() {
try {
await Promise.all([
loadChainStats(),
loadLatestBlocks()
]);
} catch (error) {
console.error('Error refreshing data:', error);
document.getElementById('node-status').innerHTML = '<span class="text-red-500">Error</span>';
}
}
// Load chain statistics
async function loadChainStats() {
const response = await fetch(`${RPC_URL}/rpc/head`);
const data = await response.json();
document.getElementById('chain-height').textContent = data.height || '-';
document.getElementById('latest-hash').textContent = data.hash ? data.hash.substring(0, 16) + '...' : '-';
document.getElementById('node-status').innerHTML = '<span class="text-green-500">Online</span>';
currentData.head = data;
}
// Load latest blocks
async function loadLatestBlocks() {
const tbody = document.getElementById('blocks-table');
tbody.innerHTML = '<tr><td colspan="5" class="text-center py-8 text-gray-500">Loading blocks...</td></tr>';
const head = await fetch(`${RPC_URL}/rpc/head`).then(r => r.json());
const blocks = [];
// Load last 10 blocks
for (let i = 0; i < 10 && head.height - i >= 0; i++) {
const block = await fetch(`${RPC_URL}/rpc/blocks/${head.height - i}`).then(r => r.json());
blocks.push(block);
}
tbody.innerHTML = blocks.map(block => `
<tr class="border-t hover:bg-gray-50">
<td class="py-3 font-mono">${block.height}</td>
<td class="py-3 font-mono text-sm">${block.hash ? block.hash.substring(0, 16) + '...' : '-'}</td>
<td class="py-3 text-sm">${formatTimestamp(block.timestamp)}</td>
<td class="py-3">${block.transactions ? block.transactions.length : 0}</td>
<td class="py-3">
<button onclick="showBlockDetails(${block.height})" class="text-blue-600 hover:text-blue-800">
View Details
</button>
</td>
</tr>
`).join('');
}
// Show block details
async function showBlockDetails(height) {
const block = await fetch(`${RPC_URL}/rpc/blocks/${height}`).then(r => r.json());
const modal = document.getElementById('block-modal');
const details = document.getElementById('block-details');
details.innerHTML = `
<div class="space-y-6">
<div>
<h3 class="text-lg font-semibold mb-2">Block Header</h3>
<div class="bg-gray-50 rounded p-4 space-y-2">
<div class="flex justify-between">
<span class="text-gray-600">Height:</span>
<span class="font-mono">${block.height}</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Hash:</span>
<span class="font-mono text-sm">${block.hash || '-'}</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Parent Hash:</span>
<span class="font-mono text-sm">${block.parent_hash || '-'}</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Timestamp:</span>
<span>${formatTimestamp(block.timestamp)}</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Proposer:</span>
<span class="font-mono text-sm">${block.proposer || '-'}</span>
</div>
</div>
</div>
${block.transactions && block.transactions.length > 0 ? `
<div>
<h3 class="text-lg font-semibold mb-2">Transactions (${block.transactions.length})</h3>
<div class="space-y-2">
${block.transactions.map(tx => `
<div class="bg-gray-50 rounded p-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Hash:</span>
<span class="font-mono text-sm">${tx.hash || '-'}</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Type:</span>
<span>${tx.type || '-'}</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">From:</span>
<span class="font-mono text-sm">${tx.sender || '-'}</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Fee:</span>
<span>${tx.fee || '0'}</span>
</div>
</div>
`).join('')}
</div>
</div>
` : '<p class="text-gray-500">No transactions in this block</p>'}
</div>
`;
modal.classList.remove('hidden');
}
// Close modal
function closeModal() {
document.getElementById('block-modal').classList.add('hidden');
}
// Search functionality
async function search() {
const query = document.getElementById('search-input').value.trim();
if (!query) return;
// Try block height first
if (/^\\d+$/.test(query)) {
showBlockDetails(parseInt(query));
return;
}
// TODO: Add transaction hash search
alert('Search by block height is currently supported');
}
// Format timestamp
function formatTimestamp(timestamp) {
if (!timestamp) return '-';
return new Date(timestamp * 1000).toLocaleString();
}
// Auto-refresh every 30 seconds
setInterval(refreshData, 30000);
</script>
</body>
</html>
EOF
# Install a simple web server
print_status "Installing web server..."
apt-get install -y nginx
# Configure nginx to serve the explorer
print_status "Configuring nginx..."
cat > /etc/nginx/sites-available/blockchain-explorer << EOL
server {
listen 3000;
server_name _;
root /opt/blockchain-explorer;
index index.html;
location / {
try_files \$uri \$uri/ =404;
}
# CORS headers for API access
location /rpc/ {
proxy_pass http://localhost:8082;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
}
}
EOL
# Enable the site
ln -sf /etc/nginx/sites-available/blockchain-explorer /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
# Test and reload nginx
nginx -t
systemctl reload nginx
# Setup port forwarding if in container
if [ "$(hostname)" = "aitbc" ]; then
print_status "Setting up port forwarding..."
iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to-destination 192.168.100.10:3000
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 3000 -j MASQUERADE
iptables-save > /etc/iptables/rules.v4
fi
print_status "Checking nginx status..."
systemctl status nginx --no-pager | head -10
print_success "✅ Blockchain explorer deployed!"
echo ""
echo "Explorer URL: http://localhost:3000"
if [ "$(hostname)" = "aitbc" ]; then
echo "External URL: http://aitbc.keisanki.net:3000"
else
echo "External URL: http://aitbc.keisanki.net:3000"
fi
echo ""
echo "The explorer is a static HTML site served by nginx."

View File

@@ -1,66 +0,0 @@
#!/bin/bash
# Deploy AITBC Explorer to the server
set -e
SERVER="root@10.1.223.93"
EXPLORER_DIR="/root/aitbc/apps/explorer-web"
NGINX_CONFIG="/etc/nginx/sites-available/aitbc"
echo "🚀 Deploying AITBC Explorer to Server"
echo "====================================="
echo "Server: $SERVER"
echo ""
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Build the explorer locally first
print_status "Building explorer locally..."
cd /home/oib/windsurf/aitbc/apps/explorer-web
npm run build
# Copy built files to server
print_status "Copying explorer build to server..."
scp -r dist $SERVER:$EXPLORER_DIR/
# Update nginx config to include explorer
print_status "Updating nginx configuration..."
# Backup current config
ssh $SERVER "cp $NGINX_CONFIG ${NGINX_CONFIG}.backup"
# Add explorer location to nginx config
ssh $SERVER "sed -i '/# Health endpoint/i\\
# Explorer\\
location /explorer/ {\\
alias /root/aitbc/apps/explorer-web/dist/;\\
try_files \$uri \$uri/ /explorer/index.html;\\
}\\
\\
# Explorer mock data\\
location /explorer/mock/ {\\
alias /root/aitbc/apps/explorer-web/public/mock/;\\
}\\
' $NGINX_CONFIG"
# Test and reload nginx
print_status "Testing and reloading nginx..."
ssh $SERVER "nginx -t && systemctl reload nginx"
print_status "✅ Explorer deployment complete!"
echo ""
echo "📋 Explorer URL:"
echo " 🌐 Explorer: https://aitbc.bubuit.net/explorer/"
echo ""

View File

@@ -1,121 +0,0 @@
#!/bin/bash
# Deploy the first blockchain node
set -e
echo "🚀 Deploying First Blockchain Node"
echo "================================="
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
NODE1_DIR="/opt/blockchain-node"
# Create configuration for first node
print_status "Creating configuration for first node..."
cat > $NODE1_DIR/.env << EOF
CHAIN_ID=ait-devnet
DB_PATH=./data/chain.db
RPC_BIND_HOST=127.0.0.1
RPC_BIND_PORT=8080
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7070
PROPOSER_KEY=node1_proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=http
GOSSIP_BROADCAST_URL=http://127.0.0.1:7071/gossip
EOF
# Create data directory
mkdir -p $NODE1_DIR/data/devnet
# Generate genesis file
print_status "Generating genesis file..."
cd $NODE1_DIR
export PYTHONPATH="${NODE1_DIR}/src:${NODE1_DIR}/scripts:${PYTHONPATH:-}"
python3 scripts/make_genesis.py --output data/devnet/genesis.json --force
# Create systemd service
print_status "Creating systemd service..."
sudo cat > /etc/systemd/system/blockchain-node.service << EOF
[Unit]
Description=AITBC Blockchain Node 1
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=$NODE1_DIR
Environment=PATH=$NODE1_DIR/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=$NODE1_DIR/src:$NODE1_DIR/scripts
ExecStart=$NODE1_DIR/.venv/bin/python3 -m aitbc_chain.main
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
# Create RPC API service
print_status "Creating RPC API service..."
sudo cat > /etc/systemd/system/blockchain-rpc.service << EOF
[Unit]
Description=AITBC Blockchain RPC API 1
After=blockchain-node.service
[Service]
Type=exec
User=root
WorkingDirectory=$NODE1_DIR
Environment=PATH=$NODE1_DIR/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=$NODE1_DIR/src:$NODE1_DIR/scripts
ExecStart=$NODE1_DIR/.venv/bin/python3 -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 8080
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
# Setup Python environment if not exists
if [ ! -d "$NODE1_DIR/.venv" ]; then
print_status "Setting up Python environment..."
cd $NODE1_DIR
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
fi
# Enable and start services
print_status "Enabling and starting services..."
sudo systemctl daemon-reload
sudo systemctl enable blockchain-node blockchain-rpc
sudo systemctl start blockchain-node blockchain-rpc
# Check status
print_status "Checking service status..."
sudo systemctl status blockchain-node --no-pager -l
sudo systemctl status blockchain-rpc --no-pager -l
echo ""
print_status "✅ First blockchain node deployed!"
echo ""
echo "Node 1 RPC: http://127.0.0.1:8080"
echo "Node 2 RPC: http://127.0.0.1:8081"
echo ""
echo "To check logs:"
echo " Node 1: sudo journalctl -u blockchain-node -f"
echo " Node 2: sudo journalctl -u blockchain-node-2 -f"

View File

@@ -1,306 +0,0 @@
#!/bin/bash
# Deploy blockchain node and explorer inside the container
set -e
echo "🚀 Deploying Inside Container"
echo "============================"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Check if we're in the container
if [ ! -f /proc/1/environ ] || ! grep -q container=lxc /proc/1/environ 2>/dev/null; then
if [ "$(hostname)" != "aitbc" ]; then
print_warning "This script must be run inside the aitbc container"
exit 1
fi
fi
# Stop existing services
print_status "Stopping existing services..."
systemctl stop blockchain-node blockchain-rpc nginx 2>/dev/null || true
# Install dependencies
print_status "Installing dependencies..."
apt-get update
apt-get install -y python3 python3-venv python3-pip git curl nginx
# Deploy blockchain node
print_status "Deploying blockchain node..."
cd /opt
rm -rf blockchain-node
# The source is already in blockchain-node-src, copy it properly
cp -r blockchain-node-src blockchain-node
cd blockchain-node
# Check if pyproject.toml exists
if [ ! -f pyproject.toml ]; then
print_warning "pyproject.toml not found, looking for it..."
find . -name "pyproject.toml" -type f
# If it's in a subdirectory, move everything up
if [ -f blockchain-node-src/pyproject.toml ]; then
print_status "Moving files from nested directory..."
mv blockchain-node-src/* .
rmdir blockchain-node-src
fi
fi
# Create configuration
print_status "Creating configuration..."
cat > .env << EOL
CHAIN_ID=ait-devnet
DB_PATH=./data/chain.db
RPC_BIND_HOST=0.0.0.0
RPC_BIND_PORT=8082
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7070
PROPOSER_KEY=proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=memory
EOL
# Create fresh data directory
rm -rf data
mkdir -p data/devnet
# Setup Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
# Generate genesis
export PYTHONPATH="${PWD}/src:${PWD}/scripts:${PYTHONPATH:-}"
python scripts/make_genesis.py --output data/devnet/genesis.json --force
# Create systemd services
print_status "Creating systemd services..."
cat > /etc/systemd/system/blockchain-node.service << EOL
[Unit]
Description=AITBC Blockchain Node
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m aitbc_chain.main
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
cat > /etc/systemd/system/blockchain-rpc.service << EOL
[Unit]
Description=AITBC Blockchain RPC API
After=blockchain-node.service
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 8082
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOL
# Start blockchain services
print_status "Starting blockchain services..."
systemctl daemon-reload
systemctl enable blockchain-node blockchain-rpc
systemctl start blockchain-node blockchain-rpc
# Deploy explorer
print_status "Deploying blockchain explorer..."
cd /opt
rm -rf blockchain-explorer
mkdir -p blockchain-explorer
cd blockchain-explorer
# Create HTML explorer
cat > index.html << 'EOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AITBC Blockchain Explorer</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/lucide@latest"></script>
</head>
<body class="bg-gray-50">
<header class="bg-blue-600 text-white shadow-lg">
<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="cube" class="w-8 h-8"></i>
<h1 class="text-2xl font-bold">AITBC Blockchain Explorer</h1>
</div>
<button onclick="refreshData()" class="bg-blue-500 hover:bg-blue-400 px-3 py-1 rounded flex items-center space-x-1">
<i data-lucide="refresh-cw" class="w-4 h-4"></i>
<span>Refresh</span>
</button>
</div>
</div>
</header>
<main class="container mx-auto px-4 py-8">
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Current Height</p>
<p class="text-2xl font-bold" id="chain-height">-</p>
</div>
<i data-lucide="trending-up" class="w-10 h-10 text-green-500"></i>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Latest Block</p>
<p class="text-lg font-mono" id="latest-hash">-</p>
</div>
<i data-lucide="hash" class="w-10 h-10 text-blue-500"></i>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-gray-500 text-sm">Node Status</p>
<p class="text-lg font-semibold" id="node-status">-</p>
</div>
<i data-lucide="activity" class="w-10 h-10 text-purple-500"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow">
<div class="px-6 py-4 border-b">
<h2 class="text-xl font-semibold flex items-center">
<i data-lucide="blocks" class="w-5 h-5 mr-2"></i>
Latest Blocks
</h2>
</div>
<div class="p-6">
<table class="w-full">
<thead>
<tr class="text-left text-gray-500 text-sm">
<th class="pb-3">Height</th>
<th class="pb-3">Hash</th>
<th class="pb-3">Timestamp</th>
<th class="pb-3">Transactions</th>
</tr>
</thead>
<tbody id="blocks-table">
<tr>
<td colspan="4" class="text-center py-8 text-gray-500">
Loading blocks...
</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
<script>
lucide.createIcons();
const RPC_URL = 'http://localhost:8082';
async function refreshData() {
try {
const response = await fetch(`${RPC_URL}/rpc/head`);
const head = await response.json();
document.getElementById('chain-height').textContent = head.height || '-';
document.getElementById('latest-hash').textContent = head.hash ? head.hash.substring(0, 16) + '...' : '-';
document.getElementById('node-status').innerHTML = '<span class="text-green-500">Online</span>';
// Load last 10 blocks
const tbody = document.getElementById('blocks-table');
tbody.innerHTML = '';
for (let i = 0; i < 10 && head.height - i >= 0; i++) {
const blockResponse = await fetch(`${RPC_URL}/rpc/blocks/${head.height - i}`);
const block = await blockResponse.json();
const row = tbody.insertRow();
row.innerHTML = `
<td class="py-3 font-mono">${block.height}</td>
<td class="py-3 font-mono text-sm">${block.hash ? block.hash.substring(0, 16) + '...' : '-'}</td>
<td class="py-3 text-sm">${new Date(block.timestamp * 1000).toLocaleString()}</td>
<td class="py-3">${block.transactions ? block.transactions.length : 0}</td>
`;
}
} catch (error) {
console.error('Error:', error);
document.getElementById('node-status').innerHTML = '<span class="text-red-500">Error</span>';
}
}
refreshData();
setInterval(refreshData, 30000);
</script>
</body>
</html>
EOF
# Configure nginx
print_status "Configuring nginx..."
cat > /etc/nginx/sites-available/blockchain-explorer << EOL
server {
listen 3000;
server_name _;
root /opt/blockchain-explorer;
index index.html;
location / {
try_files \$uri \$uri/ =404;
}
}
EOL
ln -sf /etc/nginx/sites-available/blockchain-explorer /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
nginx -t
systemctl reload nginx
# Wait for services to start
print_status "Waiting for services to start..."
sleep 5
# Check services
print_status "Checking service status..."
systemctl status blockchain-node blockchain-rpc nginx --no-pager | grep -E 'Active:|Main PID:'
print_success "✅ Deployment complete in container!"
echo ""
echo "Services:"
echo " - Blockchain Node RPC: http://localhost:8082"
echo " - Blockchain Explorer: http://localhost:3000"
echo ""
echo "These are accessible from the host via port forwarding."

View File

@@ -1,56 +0,0 @@
#!/bin/bash
# Deploy Modern Blockchain Explorer
set -e
echo "🚀 Deploying Modern Blockchain Explorer"
echo "======================================"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Stop existing services
print_status "Stopping existing services..."
systemctl stop nginx 2>/dev/null || true
# Create directory
print_status "Creating explorer directory..."
rm -rf /opt/blockchain-explorer
mkdir -p /opt/blockchain-explorer/assets
# Copy files
print_status "Copying explorer files..."
cp -r /opt/blockchain-node-src/apps/blockchain-explorer/* /opt/blockchain-explorer/
# Update nginx configuration
print_status "Updating nginx configuration..."
cp /opt/blockchain-explorer/nginx.conf /etc/nginx/sites-available/blockchain-explorer
ln -sf /etc/nginx/sites-available/blockchain-explorer /etc/nginx/sites-enabled/
rm -f /etc/nginx/sites-enabled/default
# Test and start nginx
print_status "Starting nginx..."
nginx -t
systemctl start nginx
print_success "✅ Modern explorer deployed!"
echo ""
echo "Access URLs:"
echo " - Explorer: http://localhost:3000/"
echo " - API: http://localhost:3000/api/v1/"
echo ""
echo "Standardized API Endpoints:"
echo " - GET /api/v1/chain/head"
echo " - GET /api/v1/chain/blocks?limit=N"
echo " - GET /api/v1/chain/blocks/{height}"

View File

@@ -1,160 +0,0 @@
#!/bin/bash
# Deploy nginx reverse proxy for AITBC services
# This replaces firehol/iptables port forwarding with nginx reverse proxy
set -e
echo "🚀 Deploying Nginx Reverse Proxy for AITBC"
echo "=========================================="
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Check if we're on the host server
if ! grep -q "ns3-root" ~/.ssh/config 2>/dev/null; then
print_error "ns3-root SSH configuration not found. Please add it to ~/.ssh/config"
exit 1
fi
# Install nginx on host if not already installed
print_status "Checking nginx installation on host..."
ssh ns3-root "which nginx > /dev/null || (apt-get update && apt-get install -y nginx)"
# Install certbot for SSL certificates
print_status "Checking certbot installation..."
ssh ns3-root "which certbot > /dev/null || (apt-get update && apt-get install -y certbot python3-certbot-nginx)"
# Copy nginx configuration
print_status "Copying nginx configuration..."
scp infra/nginx/nginx-aitbc-reverse-proxy.conf ns3-root:/tmp/aitbc-reverse-proxy.conf
# Backup existing nginx configuration
print_status "Backing up existing nginx configuration..."
ssh ns3-root "mkdir -p /etc/nginx/backup && cp -r /etc/nginx/sites-available/* /etc/nginx/backup/ 2>/dev/null || true"
# Install the new configuration
print_status "Installing nginx reverse proxy configuration..."
ssh ns3-root << 'EOF'
# Remove existing configurations
rm -f /etc/nginx/sites-enabled/default
rm -f /etc/nginx/sites-available/aitbc*
# Copy new configuration
cp /tmp/aitbc-reverse-proxy.conf /etc/nginx/sites-available/aitbc-reverse-proxy.conf
# Create symbolic link
ln -sf /etc/nginx/sites-available/aitbc-reverse-proxy.conf /etc/nginx/sites-enabled/
# Test nginx configuration
nginx -t
EOF
# Check if SSL certificate exists
print_status "Checking SSL certificate..."
if ! ssh ns3-root "test -f /etc/letsencrypt/live/aitbc.keisanki.net/fullchain.pem"; then
print_warning "SSL certificate not found. Obtaining Let's Encrypt certificate..."
# Obtain SSL certificate
ssh ns3-root << 'EOF'
# Stop nginx temporarily
systemctl stop nginx 2>/dev/null || true
# Obtain certificate
certbot certonly --standalone -d aitbc.keisanki.net -d api.aitbc.keisanki.net -d rpc.aitbc.keisanki.net --email admin@keisanki.net --agree-tos --non-interactive
# Start nginx
systemctl start nginx
EOF
if [ $? -ne 0 ]; then
print_error "Failed to obtain SSL certificate. Please run certbot manually:"
echo "certbot certonly --standalone -d aitbc.keisanki.net -d api.aitbc.keisanki.net -d rpc.aitbc.keisanki.net"
exit 1
fi
fi
# Restart nginx
print_status "Restarting nginx..."
ssh ns3-root "systemctl restart nginx && systemctl enable nginx"
# Remove old iptables rules (optional)
print_warning "Removing old iptables port forwarding rules (if they exist)..."
ssh ns3-root << 'EOF'
# Flush existing NAT rules for AITBC ports
iptables -t nat -D PREROUTING -p tcp --dport 8000 -j DNAT --to-destination 192.168.100.10:8000 2>/dev/null || true
iptables -t nat -D POSTROUTING -p tcp -d 192.168.100.10 --dport 8000 -j MASQUERADE 2>/dev/null || true
iptables -t nat -D PREROUTING -p tcp --dport 8081 -j DNAT --to-destination 192.168.100.10:8081 2>/dev/null || true
iptables -t nat -D POSTROUTING -p tcp -d 192.168.100.10 --dport 8081 -j MASQUERADE 2>/dev/null || true
iptables -t nat -D PREROUTING -p tcp --dport 8082 -j DNAT --to-destination 192.168.100.10:8082 2>/dev/null || true
iptables -t nat -D POSTROUTING -p tcp -d 192.168.100.10 --dport 8082 -j MASQUERADE 2>/dev/null || true
iptables -t nat -D PREROUTING -p tcp --dport 9080 -j DNAT --to-destination 192.168.100.10:9080 2>/dev/null || true
iptables -t nat -D POSTROUTING -p tcp -d 192.168.100.10 --dport 9080 -j MASQUERADE 2>/dev/null || true
iptables -t nat -D PREROUTING -p tcp --dport 3000 -j DNAT --to-destination 192.168.100.10:3000 2>/dev/null || true
iptables -t nat -D POSTROUTING -p tcp -d 192.168.100.10 --dport 3000 -j MASQUERADE 2>/dev/null || true
# Save iptables rules
iptables-save > /etc/iptables/rules.v4 2>/dev/null || true
EOF
# Wait for nginx to start
sleep 2
# Test the configuration
print_status "Testing reverse proxy configuration..."
echo ""
# Test main domain
if curl -s -o /dev/null -w "%{http_code}" https://aitbc.keisanki.net/health | grep -q "200"; then
print_status "✅ Main domain (aitbc.keisanki.net) - OK"
else
print_error "❌ Main domain (aitbc.keisanki.net) - FAILED"
fi
# Test API endpoint
if curl -s -o /dev/null -w "%{http_code}" https://aitbc.keisanki.net/api/health | grep -q "200"; then
print_status "✅ API endpoint - OK"
else
print_warning "⚠️ API endpoint - Not responding (service may not be running)"
fi
# Test RPC endpoint
if curl -s -o /dev/null -w "%{http_code}" https://aitbc.keisanki.net/rpc/head | grep -q "200"; then
print_status "✅ RPC endpoint - OK"
else
print_warning "⚠️ RPC endpoint - Not responding (blockchain node may not be running)"
fi
echo ""
print_status "🎉 Nginx reverse proxy deployment complete!"
echo ""
echo "Service URLs:"
echo " • Blockchain Explorer: https://aitbc.keisanki.net"
echo " • API: https://aitbc.keisanki.net/api/"
echo " • RPC: https://aitbc.keisanki.net/rpc/"
echo " • Exchange: https://aitbc.keisanki.net/exchange/"
echo ""
echo "Alternative URLs:"
echo " • API-only: https://api.aitbc.keisanki.net"
echo " • RPC-only: https://rpc.aitbc.keisanki.net"
echo ""
echo "Note: Make sure all services are running in the container:"
echo " • blockchain-explorer.service (port 3000)"
echo " • coordinator-api.service (port 8000)"
echo " • blockchain-rpc.service (port 8082)"
echo " • aitbc-exchange.service (port 9080)"

View File

@@ -1,55 +0,0 @@
#!/bin/bash
echo "🚀 Deploying AITBC for Production..."
# 1. Setup production assets
echo "📦 Setting up production assets..."
bash setup-production-assets.sh
# 2. Copy assets to server
echo "📋 Copying assets to server..."
scp -r assets/ aitbc:/var/www/html/
# 3. Update Nginx configuration
echo "⚙️ Updating Nginx configuration..."
ssh aitbc "cat >> /etc/nginx/sites-available/aitbc.conf << 'EOF'
# Serve production assets
location /assets/ {
alias /var/www/html/assets/;
expires 1y;
add_header Cache-Control \"public, immutable\";
add_header X-Content-Type-Options nosniff;
# Gzip compression
gzip on;
gzip_types text/css application/javascript image/svg+xml;
}
# Security headers
add_header Referrer-Policy \"strict-origin-when-cross-origin\" always;
add_header X-Frame-Options \"SAMEORIGIN\" always;
add_header X-Content-Type-Options \"nosniff\" always;
EOF"
# 4. Reload Nginx
echo "🔄 Reloading Nginx..."
ssh aitbc "nginx -t && systemctl reload nginx"
# 5. Update Exchange page to use production assets
echo "🔄 Updating Exchange page..."
scp apps/trade-exchange/index.prod.html aitbc:/root/aitbc/apps/trade-exchange/index.html
# 6. Update Marketplace page
echo "🔄 Updating Marketplace page..."
sed -i 's|https://cdn.tailwindcss.com|/assets/js/tailwind.js|g' apps/marketplace-ui/index.html
sed -i 's|https://unpkg.com/axios/dist/axios.min.js|/assets/js/axios.min.js|g' apps/marketplace-ui/index.html
sed -i 's|https://unpkg.com/lucide@latest|/assets/js/lucide.js|g' apps/marketplace-ui/index.html
scp apps/marketplace-ui/index.html aitbc:/root/aitbc/apps/marketplace-ui/
echo "✅ Production deployment complete!"
echo ""
echo "📝 Next steps:"
echo "1. Restart services: ssh aitbc 'systemctl restart aitbc-exchange aitbc-marketplace-ui'"
echo "2. Clear browser cache"
echo "3. Test all pages"

View File

@@ -1,18 +0,0 @@
#!/bin/bash
# Deploy blockchain node by building directly on ns3 server
echo "🚀 Remote Blockchain Deployment (Build on Server)"
echo "=============================================="
# Copy deployment script to server
echo "Copying deployment script to ns3..."
scp scripts/deploy/deploy-blockchain-remote.sh ns3-root:/opt/
# Execute deployment on server
echo "Executing deployment on ns3 (utilizing gigabit connection)..."
ssh ns3-root "cd /opt && chmod +x deploy-blockchain-remote.sh && ./deploy-blockchain-remote.sh"
echo ""
echo "Deployment complete!"
echo "The blockchain node was built directly on ns3 using its fast connection."

View File

@@ -1,127 +0,0 @@
#!/bin/bash
# Deploy a second blockchain node on the same server
set -e
echo "🚀 Deploying Second Blockchain Node"
echo "=================================="
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Create directory for second node
print_status "Creating directory for second node..."
NODE2_DIR="/opt/blockchain-node-2"
sudo mkdir -p $NODE2_DIR
sudo chown $USER:$USER $NODE2_DIR
# Copy blockchain node code
print_status "Copying blockchain node code..."
cp -r /opt/blockchain-node/* $NODE2_DIR/
# Create configuration for second node
print_status "Creating configuration for second node..."
cat > $NODE2_DIR/.env << EOF
CHAIN_ID=ait-devnet
DB_PATH=./data/chain2.db
RPC_BIND_HOST=127.0.0.1
RPC_BIND_PORT=8081
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7071
PROPOSER_KEY=node2_proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=http
GOSSIP_BROADCAST_URL=http://127.0.0.1:7070/gossip
EOF
# Create data directory
mkdir -p $NODE2_DIR/data/devnet
# Generate genesis file (same as first node)
print_status "Generating genesis file..."
cd $NODE2_DIR
export PYTHONPATH="${NODE2_DIR}/src:${NODE2_DIR}/scripts:${PYTHONPATH:-}"
python3 scripts/make_genesis.py --output data/devnet/genesis.json --force
# Create systemd service
print_status "Creating systemd service..."
sudo cat > /etc/systemd/system/blockchain-node-2.service << EOF
[Unit]
Description=AITBC Blockchain Node 2
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=$NODE2_DIR
Environment=PATH=$NODE2_DIR/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=$NODE2_DIR/src:$NODE2_DIR/scripts
ExecStart=$NODE2_DIR/.venv/bin/python3 -m aitbc_chain.main
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
# Create RPC API service
print_status "Creating RPC API service..."
sudo cat > /etc/systemd/system/blockchain-rpc-2.service << EOF
[Unit]
Description=AITBC Blockchain RPC API 2
After=blockchain-node-2.service
[Service]
Type=exec
User=root
WorkingDirectory=$NODE2_DIR
Environment=PATH=$NODE2_DIR/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=$NODE2_DIR/src:$NODE2_DIR/scripts
ExecStart=$NODE2_DIR/.venv/bin/python3 -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 8081
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
# Setup Python environment
print_status "Setting up Python environment..."
cd $NODE2_DIR
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
# Enable and start services
print_status "Enabling and starting services..."
sudo systemctl daemon-reload
sudo systemctl enable blockchain-node-2 blockchain-rpc-2
sudo systemctl start blockchain-node-2 blockchain-rpc-2
# Check status
print_status "Checking service status..."
sudo systemctl status blockchain-node-2 --no-pager -l
sudo systemctl status blockchain-rpc-2 --no-pager -l
echo ""
print_status "✅ Second blockchain node deployed!"
echo ""
echo "Node 1 RPC: http://127.0.0.1:8080"
echo "Node 2 RPC: http://127.0.0.1:8081"
echo ""
echo "To check logs:"
echo " Node 1: sudo journalctl -u blockchain-node -f"
echo " Node 2: sudo journalctl -u blockchain-node-2 -f"

View File

@@ -1,84 +0,0 @@
#!/bin/bash
# Deploy blockchain node inside incus container aitbc
set -e
echo "🚀 AITBC Deployment in Incus Container"
echo "======================================"
echo "This will deploy inside the aitbc container"
echo ""
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Check if we're on ns3 host
if [ "$(hostname)" != "ns3" ]; then
print_warning "This script must be run on ns3 host"
echo "Run: ssh ns3-root"
exit 1
fi
# Check if container exists
if ! incus list | grep -q "aitbc.*RUNNING"; then
print_warning "Container aitbc is not running"
exit 1
fi
# Copy source to container
print_status "Copying source code to container..."
incus exec aitbc -- rm -rf /opt/blockchain-node-src 2>/dev/null || true
incus exec aitbc -- mkdir -p /opt/blockchain-node-src
# Use the source already on the server
incus file push -r /opt/blockchain-node-src/. aitbc/opt/blockchain-node-src/
# Fix the nested directory issue - move everything up one level
incus exec aitbc -- sh -c 'if [ -d /opt/blockchain-node-src/blockchain-node-src ]; then mv /opt/blockchain-node-src/blockchain-node-src/* /opt/blockchain-node-src/ && rmdir /opt/blockchain-node-src/blockchain-node-src; fi'
# Copy deployment script to container
print_status "Copying deployment script to container..."
incus file push /opt/deploy-in-container.sh aitbc/opt/
# Execute deployment inside container
print_status "Deploying inside container..."
incus exec aitbc -- bash /opt/deploy-in-container.sh
# Setup port forwarding on host
print_status "Setting up port forwarding on host..."
iptables -t nat -F PREROUTING 2>/dev/null || true
iptables -t nat -F POSTROUTING 2>/dev/null || true
# Forward blockchain RPC
iptables -t nat -A PREROUTING -p tcp --dport 8082 -j DNAT --to-destination 192.168.100.10:8082
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 8082 -j MASQUERADE
# Forward explorer
iptables -t nat -A PREROUTING -p tcp --dport 3000 -j DNAT --to-destination 192.168.100.10:3000
iptables -t nat -A POSTROUTING -p tcp -d 192.168.100.10 --dport 3000 -j MASQUERADE
# Save rules
mkdir -p /etc/iptables
iptables-save > /etc/iptables/rules.v4
# Check services
print_status "Checking services in container..."
incus exec aitbc -- systemctl status blockchain-node blockchain-rpc nginx --no-pager | grep -E 'Active:|Main PID:'
print_success "✅ Deployment complete!"
echo ""
echo "Services in container aitbc:"
echo " - Blockchain Node RPC: http://192.168.100.10:8082"
echo " - Blockchain Explorer: http://192.168.100.10:3000"
echo ""
echo "External access via ns3:"
echo " - Blockchain Node RPC: http://aitbc.keisanki.net:8082"
echo " - Blockchain Explorer: http://aitbc.keisanki.net:3000"

View File

@@ -1,253 +0,0 @@
#!/bin/bash
# AITBC Services Deployment to Incus Container
# This script deploys all AITBC services to the 'aitbc' container
set -e
CONTAINER_NAME="aitbc"
CONTAINER_IP="10.1.223.93"
PROJECT_DIR="/home/oib/windsurf/aitbc"
echo "🚀 Deploying AITBC services to container: $CONTAINER_NAME"
echo "Container IP: $CONTAINER_IP"
echo ""
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Function to print colored output
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Stop local services
print_status "Stopping local AITBC services..."
sudo fuser -k 8000/tcp 2>/dev/null || true
sudo fuser -k 9080/tcp 2>/dev/null || true
sudo fuser -k 3001/tcp 2>/dev/null || true
sudo fuser -k 3002/tcp 2>/dev/null || true
pkill -f "aitbc_chain.app" 2>/dev/null || true
pkill -f "marketplace-ui" 2>/dev/null || true
pkill -f "trade-exchange" 2>/dev/null || true
# Copy project to container
print_status "Copying AITBC project to container..."
incus file push -r $PROJECT_DIR $CONTAINER_NAME/home/oib/
# Setup container environment
print_status "Setting up container environment..."
incus exec $CONTAINER_NAME -- bash -c "
cd /home/oib/aitbc
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
"
# Install dependencies for each service
print_status "Installing dependencies..."
# Coordinator API
print_status "Installing Coordinator API dependencies..."
incus exec $CONTAINER_NAME -- bash -c "
cd /home/oib/aitbc/apps/coordinator-api
source ../.venv/bin/activate
pip install -e .
pip install fastapi uvicorn
"
# Blockchain Node
print_status "Installing Blockchain Node dependencies..."
incus exec $CONTAINER_NAME -- bash -c "
cd /home/oib/aitbc/apps/blockchain-node
source ../.venv/bin/activate
pip install -e .
pip install fastapi uvicorn
"
# Create systemd service files
print_status "Creating systemd services..."
# Coordinator API service
incus exec $CONTAINER_NAME -- tee /etc/systemd/system/aitbc-coordinator.service > /dev/null <<EOF
[Unit]
Description=AITBC Coordinator API
After=network.target
[Service]
Type=exec
User=oib
Group=oib
WorkingDirectory=/home/oib/aitbc/apps/coordinator-api
Environment=PATH=/home/oib/aitbc/.venv/bin
ExecStart=/home/oib/aitbc/.venv/bin/python -m uvicorn src.app.main:app --host 0.0.0.0 --port 8000
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Blockchain Node service
incus exec $CONTAINER_NAME -- tee /etc/systemd/system/aitbc-blockchain.service > /dev/null <<EOF
[Unit]
Description=AITBC Blockchain Node
After=network.target
[Service]
Type=exec
User=oib
Group=oib
WorkingDirectory=/home/oib/aitbc/apps/blockchain-node
Environment=PATH=/home/oib/aitbc/.venv/bin
ExecStart=/home/oib/aitbc/.venv/bin/python -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 9080
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Marketplace UI service
incus exec $CONTAINER_NAME -- tee /etc/systemd/system/aitbc-marketplace.service > /dev/null <<EOF
[Unit]
Description=AITBC Marketplace UI
After=network.target
[Service]
Type=exec
User=oib
Group=oib
WorkingDirectory=/home/oib/aitbc/apps/marketplace-ui
Environment=PATH=/home/oib/aitbc/.venv/bin
ExecStart=/home/oib/aitbc/.venv/bin/python server.py --port 3001
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Trade Exchange service
incus exec $CONTAINER_NAME -- tee /etc/systemd/system/aitbc-exchange.service > /dev/null <<EOF
[Unit]
Description=AITBC Trade Exchange
After=network.target
[Service]
Type=exec
User=oib
Group=oib
WorkingDirectory=/home/oib/aitbc/apps/trade-exchange
Environment=PATH=/home/oib/aitbc/.venv/bin
ExecStart=/home/oib/aitbc/.venv/bin/python server.py --port 3002
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
# Reload systemd and start services
print_status "Starting AITBC services..."
incus exec $CONTAINER_NAME -- systemctl daemon-reload
incus exec $CONTAINER_NAME -- systemctl enable aitbc-coordinator
incus exec $CONTAINER_NAME -- systemctl enable aitbc-blockchain
incus exec $CONTAINER_NAME -- systemctl enable aitbc-marketplace
incus exec $CONTAINER_NAME -- systemctl enable aitbc-exchange
incus exec $CONTAINER_NAME -- systemctl start aitbc-coordinator
incus exec $CONTAINER_NAME -- systemctl start aitbc-blockchain
incus exec $CONTAINER_NAME -- systemctl start aitbc-marketplace
incus exec $CONTAINER_NAME -- systemctl start aitbc-exchange
# Wait for services to start
print_status "Waiting for services to start..."
sleep 10
# Check service status
print_status "Checking service status..."
incus exec $CONTAINER_NAME -- systemctl status aitbc-coordinator --no-pager -l
incus exec $CONTAINER_NAME -- systemctl status aitbc-blockchain --no-pager -l
incus exec $CONTAINER_NAME -- systemctl status aitbc-marketplace --no-pager -l
incus exec $CONTAINER_NAME -- systemctl status aitbc-exchange --no-pager -l
# Create nginx configuration for reverse proxy
print_status "Setting up Nginx reverse proxy..."
incus exec $CONTAINER_NAME -- tee /etc/nginx/sites-available/aitbc > /dev/null <<EOF
server {
listen 80;
server_name _;
# Coordinator API
location /api/ {
proxy_pass http://127.0.0.1:8000/v1/;
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;
}
# Blockchain RPC
location /rpc/ {
proxy_pass http://127.0.0.1:9080/rpc/;
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;
}
# Marketplace UI
location /marketplace/ {
proxy_pass http://127.0.0.1:3001/;
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;
}
# Trade Exchange
location /exchange/ {
proxy_pass http://127.0.0.1:3002/;
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;
}
# Default redirect to marketplace
location / {
return 301 /marketplace/;
}
}
EOF
# Enable nginx site
incus exec $CONTAINER_NAME -- ln -sf /etc/nginx/sites-available/aitbc /etc/nginx/sites-enabled/
incus exec $CONTAINER_NAME -- rm -f /etc/nginx/sites-enabled/default
incus exec $CONTAINER_NAME -- nginx -t && incus exec $CONTAINER_NAME -- systemctl reload nginx
# Print access information
echo ""
print_status "✅ AITBC services deployed successfully!"
echo ""
echo "📋 Service URLs:"
echo " 🌐 Public IP: $CONTAINER_IP"
echo " 📊 Marketplace: http://$CONTAINER_IP/marketplace/"
echo " 💱 Trade Exchange: http://$CONTAINER_IP/exchange/"
echo " 🔗 API: http://$CONTAINER_IP/api/"
echo " ⛓️ Blockchain RPC: http://$CONTAINER_IP/rpc/"
echo ""
print_status "To check logs: incus exec $CONTAINER_NAME -- journalctl -u aitbc-coordinator -f"
print_status "To restart services: incus exec $CONTAINER_NAME -- systemctl restart aitbc-*"

View File

@@ -0,0 +1,50 @@
#!/bin/bash
# AITBC Services Deployment to Container
# Copy to deploy-to-container.sh and adjust variables for your environment
set -e
# === CONFIGURE THESE ===
CONTAINER_NAME="aitbc"
CONTAINER_IP="YOUR_CONTAINER_IP"
PROJECT_DIR="/path/to/your/aitbc"
SSH_ALIAS="your-ssh-alias" # or user@host
echo "🚀 Deploying AITBC services to container: $CONTAINER_NAME"
echo "Container IP: $CONTAINER_IP"
echo ""
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
# 1. Push website
echo -e "${YELLOW}Deploying website...${NC}"
scp -r "$PROJECT_DIR/website/index.html" "$PROJECT_DIR/website/404.html" \
"$SSH_ALIAS:/var/www/html/"
scp -r "$PROJECT_DIR/website/docs/"*.html "$SSH_ALIAS:/var/www/html/docs/"
scp "$PROJECT_DIR/website/docs/css/docs.css" "$SSH_ALIAS:/var/www/html/docs/css/"
scp "$PROJECT_DIR/website/docs/js/theme.js" "$SSH_ALIAS:/var/www/html/docs/js/"
echo -e "${GREEN}✓ Website deployed${NC}"
# 2. Deploy coordinator API
echo -e "${YELLOW}Deploying coordinator API...${NC}"
ssh "$SSH_ALIAS" "cd /opt/aitbc && pip install -e apps/coordinator-api/"
ssh "$SSH_ALIAS" "systemctl restart aitbc-coordinator"
echo -e "${GREEN}✓ Coordinator deployed${NC}"
# 3. Deploy blockchain node
echo -e "${YELLOW}Deploying blockchain node...${NC}"
ssh "$SSH_ALIAS" "cd /opt/aitbc && pip install -e apps/blockchain-node/"
ssh "$SSH_ALIAS" "systemctl restart aitbc-blockchain"
echo -e "${GREEN}✓ Blockchain node deployed${NC}"
# 4. Verify
echo ""
echo -e "${YELLOW}Verifying services...${NC}"
ssh "$SSH_ALIAS" "curl -s http://127.0.0.1:8000/v1/health | head -1"
ssh "$SSH_ALIAS" "curl -s http://127.0.0.1:9080/rpc/health | head -1"
echo -e "${GREEN}✓ All services running${NC}"

View File

@@ -1,241 +0,0 @@
#!/bin/bash
# Deploy AITBC services to the aitbc server (10.1.223.93)
set -e
SERVER="root@10.1.223.93"
PROJECT_DIR="/root/aitbc"
echo "🚀 Deploying AITBC to Server"
echo "=========================="
echo "Server: $SERVER"
echo ""
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Test SSH connection
print_status "Testing SSH connection..."
ssh $SERVER "hostname && ip a show eth0 | grep inet"
# Copy project to server
print_status "Copying project to server..."
ssh $SERVER "rm -rf $PROJECT_DIR 2>/dev/null || true"
scp -r /home/oib/windsurf/aitbc $SERVER:/root/
# Setup Python environment
print_status "Setting up Python environment..."
ssh $SERVER "cd $PROJECT_DIR && python3 -m venv .venv && source .venv/bin/activate && pip install --upgrade pip"
# Install dependencies
print_status "Installing dependencies..."
ssh $SERVER "cd $PROJECT_DIR/apps/coordinator-api && source ../../.venv/bin/activate && pip install -e ."
ssh $SERVER "cd $PROJECT_DIR/apps/blockchain-node && source ../../.venv/bin/activate && pip install -e ."
# Create systemd service files
print_status "Creating systemd services..."
# Coordinator API service
ssh $SERVER 'cat > /etc/systemd/system/aitbc-coordinator.service << EOF
[Unit]
Description=AITBC Coordinator API
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/root/aitbc/apps/coordinator-api
Environment=PATH=/root/aitbc/.venv/bin
ExecStart=/root/aitbc/.venv/bin/python -m uvicorn src.app.main:app --host 0.0.0.0 --port 8000
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF'
# Blockchain Node service
ssh $SERVER 'cat > /etc/systemd/system/aitbc-blockchain.service << EOF
[Unit]
Description=AITBC Blockchain Node
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/root/aitbc/apps/blockchain-node
Environment=PATH=/root/aitbc/.venv/bin
ExecStart=/root/aitbc/.venv/bin/python -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 9080
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF'
# Marketplace UI service
ssh $SERVER 'cat > /etc/systemd/system/aitbc-marketplace.service << EOF
[Unit]
Description=AITBC Marketplace UI
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/root/aitbc/apps/marketplace-ui
Environment=PATH=/root/aitbc/.venv/bin
ExecStart=/root/aitbc/.venv/bin/python server.py --port 3001
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF'
# Trade Exchange service
ssh $SERVER 'cat > /etc/systemd/system/aitbc-exchange.service << EOF
[Unit]
Description=AITBC Trade Exchange
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/root/aitbc/apps/trade-exchange
Environment=PATH=/root/aitbc/.venv/bin
ExecStart=/root/aitbc/.venv/bin/python server.py --port 3002
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF'
# Install nginx if not installed
print_status "Installing nginx..."
ssh $SERVER "apt update && apt install -y nginx"
# Create nginx configuration
print_status "Configuring nginx..."
ssh $SERVER 'cat > /etc/nginx/sites-available/aitbc << EOF
server {
listen 80;
server_name aitbc.bubuit.net;
# API routes
location /api/ {
proxy_pass http://127.0.0.1:8000/v1/;
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;
}
# Admin routes
location /admin/ {
proxy_pass http://127.0.0.1:8000/admin/;
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;
}
# Blockchain RPC
location /rpc/ {
proxy_pass http://127.0.0.1:9080/rpc/;
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;
}
# Marketplace UI
location /Marketplace {
proxy_pass http://127.0.0.1:3001/;
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;
}
# Trade Exchange
location /Exchange {
proxy_pass http://127.0.0.1:3002/;
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;
}
# Health endpoint
location /health {
proxy_pass http://127.0.0.1:8000/v1/health;
proxy_set_header Host \$host;
}
# Default redirect
location / {
return 301 /Marketplace;
}
}
EOF'
# Enable nginx site
ssh $SERVER "ln -sf /etc/nginx/sites-available/aitbc /etc/nginx/sites-enabled/"
ssh $SERVER "rm -f /etc/nginx/sites-enabled/default"
# Test and reload nginx
ssh $SERVER "nginx -t && systemctl reload nginx"
# Start services
print_status "Starting AITBC services..."
ssh $SERVER "systemctl daemon-reload"
ssh $SERVER "systemctl enable aitbc-coordinator aitbc-blockchain aitbc-marketplace aitbc-exchange"
ssh $SERVER "systemctl start aitbc-coordinator aitbc-blockchain aitbc-marketplace aitbc-exchange"
# Wait for services to start
print_status "Waiting for services to start..."
sleep 10
# Check service status
print_status "Checking service status..."
ssh $SERVER "systemctl status aitbc-coordinator --no-pager -l | head -10"
ssh $SERVER "systemctl status aitbc-blockchain --no-pager -l | head -10"
# Test endpoints
print_status "Testing endpoints..."
ssh $SERVER "curl -s http://127.0.0.1:8000/v1/health | head -c 100"
echo ""
ssh $SERVER "curl -s http://127.0.0.1:8000/v1/admin/stats -H 'X-Api-Key: ${ADMIN_API_KEY}' | head -c 100"
echo ""
echo ""
print_status "✅ Deployment complete!"
echo ""
echo "📋 Service URLs:"
echo " 🌐 Server IP: 10.1.223.93"
echo " 📊 Marketplace: http://10.1.223.93/Marketplace"
echo " 💱 Trade Exchange: http://10.1.223.93/Exchange"
echo " 🔗 API: http://10.1.223.93/api"
echo " ⛓️ Blockchain RPC: http://10.1.223.93/rpc"
echo ""
echo "🔒 Domain URLs (with SSL):"
echo " 📊 Marketplace: https://aitbc.bubuit.net/Marketplace"
echo " 💱 Trade Exchange: https://aitbc.bubuit.net/Exchange"
echo " 🔗 API: https://aitbc.bubuit.net/api"
echo " ⛓️ Blockchain RPC: https://aitbc.bubuit.net/rpc"
echo ""
print_status "To manage services:"
echo " ssh aitbc 'systemctl status aitbc-coordinator'"
echo " ssh aitbc 'journalctl -u aitbc-coordinator -f'"

View File

@@ -1,158 +0,0 @@
#!/usr/bin/env python3
"""
Deploy AITBC services to incus container with GPU miner integration
"""
import subprocess
import time
import sys
def run_command(cmd, container=None):
"""Run command locally or in container"""
if container:
cmd = f"incus exec {container} -- {cmd}"
print(f"Running: {cmd}")
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
if result.returncode != 0:
print(f"Error: {result.stderr}")
return False
return True
def deploy_to_container():
container = "aitbc"
container_ip = "10.1.223.93"
print("🚀 Deploying AITBC services to container with GPU miner...")
# Check if container exists
result = subprocess.run("incus list -c n", shell=True, capture_output=True, text=True)
if container not in result.stdout:
print(f"\n📦 Creating container {container}...")
subprocess.run(f"incus launch images:ubuntu/22.04 {container}", shell=True)
time.sleep(10)
# Ensure container is running
subprocess.run(f"incus start {container}", shell=True)
time.sleep(5)
# Update and install packages in container
print("\n📦 Installing packages in container...")
run_command("apt-get update", container)
run_command("apt-get install -y python3 python3-pip python3-venv curl", container)
# Stop local services
print("\n📋 Stopping local services...")
subprocess.run("sudo fuser -k 8000/tcp 2>/dev/null || true", shell=True)
subprocess.run("sudo fuser -k 9080/tcp 2>/dev/null || true", shell=True)
subprocess.run("pkill -f 'marketplace-ui' 2>/dev/null || true", shell=True)
subprocess.run("pkill -f 'trade-exchange' 2>/dev/null || true", shell=True)
# Copy project to container
print("\n📁 Copying project to container...")
subprocess.run(f"incus file push -r /home/oib/windsurf/aitbc {container}/home/oib/", shell=True)
# Setup Python environment in container
print("\n🐍 Setting up Python environment...")
run_command("cd /home/oib/aitbc && python3 -m venv .venv", container)
run_command("cd /home/oib/aitbc && source .venv/bin/activate && pip install fastapi uvicorn httpx sqlmodel psutil", container)
# Install dependencies
print("\n📦 Installing dependencies...")
run_command("cd /home/oib/aitbc/apps/coordinator-api && source ../../.venv/bin/activate && pip install -e .", container)
run_command("cd /home/oib/aitbc/apps/blockchain-node && source ../../.venv/bin/activate && pip install -e .", container)
# Create startup script with GPU miner
print("\n🔧 Creating startup script with GPU miner...")
startup_script = """#!/bin/bash
cd /home/oib/aitbc
source .venv/bin/activate
# Start coordinator API
echo "Starting Coordinator API..."
cd apps/coordinator-api
source ../../.venv/bin/activate
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 &
COORD_PID=$!
# Start blockchain node
echo "Starting Blockchain Node..."
cd ../../apps/blockchain-node
source ../../.venv/bin/activate
python -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 9080 &
BLOCK_PID=$!
# Start trade exchange
echo "Starting Trade Exchange..."
cd ../../apps/trade-exchange
source ../../.venv/bin/activate
python simple_exchange_api.py &
EXCHANGE_PID=$!
# Start GPU registry
echo "Starting GPU Registry..."
cd ../..
python gpu_registry_demo.py &
REGISTRY_PID=$!
# Start GPU miner
echo "Starting GPU Miner..."
python gpu_miner_with_wait.py &
MINER_PID=$!
echo "All services started!"
echo "Coordinator API: http://10.1.223.93:8000"
echo "Blockchain RPC: http://10.1.223.93:9080"
echo "Trade Exchange: http://10.1.223.93:3002"
echo "GPU Registry: http://10.1.223.93:8091"
# Wait for services
wait $COORD_PID $BLOCK_PID $EXCHANGE_PID $REGISTRY_PID $MINER_PID
"""
# Write startup script to container
with open('/tmp/startup.sh', 'w') as f:
f.write(startup_script)
subprocess.run(f"incus file push /tmp/startup.sh {container}/home/oib/aitbc/", shell=True)
run_command("chmod +x /home/oib/aitbc/startup.sh", container)
# Create systemd service
print("\n⚙️ Creating systemd service...")
service_content = """[Unit]
Description=AITBC Services with GPU Miner
After=network.target
[Service]
Type=simple
User=oib
WorkingDirectory=/home/oib/aitbc
ExecStart=/home/oib/aitbc/startup.sh
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
"""
with open('/tmp/aitbc.service', 'w') as f:
f.write(service_content)
subprocess.run(f"incus file push /tmp/aitbc.service {container}/tmp/", shell=True)
run_command("mv /tmp/aitbc.service /etc/systemd/system/", container)
run_command("systemctl daemon-reload", container)
run_command("systemctl enable aitbc.service", container)
run_command("systemctl start aitbc.service", container)
print("\n✅ Deployment complete!")
print(f"\n📊 Service URLs:")
print(f" - Coordinator API: http://{container_ip}:8000")
print(f" - Blockchain RPC: http://{container_ip}:9080")
print(f" - Trade Exchange: http://{container_ip}:3002")
print(f" - GPU Registry: http://{container_ip}:8091")
print(f"\n🔍 Check GPU status:")
print(f" curl http://{container_ip}:8091/miners/list")
print(f"\n📋 To manage services in container:")
print(f" incus exec {container} -- systemctl status aitbc")
print(f" incus exec {container} -- journalctl -u aitbc -f")
if __name__ == "__main__":
deploy_to_container()

View File

@@ -1,130 +0,0 @@
#!/usr/bin/env python3
"""
Deploy GPU Miner Integration to AITBC Container
"""
import subprocess
import sys
def run_in_container(cmd):
"""Run command in aitbc container"""
full_cmd = f"incus exec aitbc -- {cmd}"
print(f"Running: {full_cmd}")
result = subprocess.run(full_cmd, shell=True, capture_output=True, text=True)
if result.returncode != 0:
print(f"Error: {result.stderr}")
return False, result.stderr
return True, result.stdout
def deploy_gpu_miner_to_container():
print("🚀 Deploying GPU Miner Integration to AITBC Container...")
# Check container access
print("\n1. 🔍 Checking container access...")
success, output = run_in_container("whoami")
if success:
print(f" Container user: {output.strip()}")
else:
print(" ❌ Cannot access container")
return
# Copy GPU miner files to container
print("\n2. 📁 Copying GPU miner files...")
files_to_copy = [
"gpu_miner_with_wait.py",
"gpu_registry_demo.py"
]
for file in files_to_copy:
cmd = f"incus file push /home/oib/windsurf/aitbc/{file} aitbc/home/oib/"
print(f" Copying {file}...")
result = subprocess.run(cmd, shell=True)
if result.returncode == 0:
print(f"{file} copied")
else:
print(f" ❌ Failed to copy {file}")
# Install dependencies in container
print("\n3. 📦 Installing dependencies...")
run_in_container("pip install httpx fastapi uvicorn psutil")
# Create GPU miner service in container
print("\n4. ⚙️ Creating GPU miner service...")
service_content = """[Unit]
Description=AITBC GPU Miner Client
After=network.target
[Service]
Type=simple
User=oib
WorkingDirectory=/home/oib
ExecStart=/usr/bin/python3 gpu_miner_with_wait.py
Restart=always
RestartSec=30
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
"""
# Write service file to container
with open('/tmp/gpu-miner.service', 'w') as f:
f.write(service_content)
subprocess.run("incus file push /tmp/gpu-miner.service aitbc/tmp/", shell=True)
run_in_container("sudo mv /tmp/gpu-miner.service /etc/systemd/system/")
run_in_container("sudo systemctl daemon-reload")
run_in_container("sudo systemctl enable gpu-miner.service")
run_in_container("sudo systemctl start gpu-miner.service")
# Create GPU registry service in container
print("\n5. 🎮 Creating GPU registry service...")
registry_service = """[Unit]
Description=AITBC GPU Registry
After=network.target
[Service]
Type=simple
User=oib
WorkingDirectory=/home/oib
ExecStart=/usr/bin/python3 gpu_registry_demo.py
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
"""
with open('/tmp/gpu-registry.service', 'w') as f:
f.write(registry_service)
subprocess.run("incus file push /tmp/gpu-registry.service aitbc/tmp/", shell=True)
run_in_container("sudo mv /tmp/gpu-registry.service /etc/systemd/system/")
run_in_container("sudo systemctl daemon-reload")
run_in_container("sudo systemctl enable gpu-registry.service")
run_in_container("sudo systemctl start gpu-registry.service")
# Check services
print("\n6. 📊 Checking services...")
success, output = run_in_container("sudo systemctl status gpu-miner.service --no-pager")
print(output)
success, output = run_in_container("sudo systemctl status gpu-registry.service --no-pager")
print(output)
# Update coordinator to include miner endpoints
print("\n7. 🔗 Updating coordinator API...")
print("\n✅ GPU Miner deployed to container!")
print("\n📊 Access URLs:")
print(" - Container IP: 10.1.223.93")
print(" - GPU Registry: http://10.1.223.93:8091/miners/list")
print(" - Coordinator API: http://10.1.223.93:8000")
print("\n🔧 To manage services in container:")
print(" incus exec aitbc -- sudo systemctl status gpu-miner")
print(" incus exec aitbc -- sudo journalctl -u gpu-miner -f")
if __name__ == "__main__":
deploy_gpu_miner_to_container()

View File

@@ -1,113 +0,0 @@
#!/bin/bash
# Setup gossip relay to connect blockchain nodes
set -e
echo "🌐 Setting up Gossip Relay for Blockchain Nodes"
echo "=============================================="
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
print_status() {
echo -e "${GREEN}[INFO]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
# Stop existing nodes
print_status "Stopping blockchain nodes..."
sudo systemctl stop blockchain-node blockchain-node-2 blockchain-rpc blockchain-rpc-2 2>/dev/null || true
# Update node configurations to use broadcast backend
print_status "Updating Node 1 configuration..."
sudo cat > /opt/blockchain-node/.env << EOF
CHAIN_ID=ait-devnet
DB_PATH=./data/chain.db
RPC_BIND_HOST=127.0.0.1
RPC_BIND_PORT=8082
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7070
PROPOSER_KEY=node1_proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=broadcast
GOSSIP_BROADCAST_URL=http://127.0.0.1:7070/gossip
EOF
print_status "Updating Node 2 configuration..."
sudo cat > /opt/blockchain-node-2/.env << EOF
CHAIN_ID=ait-devnet
DB_PATH=./data/chain2.db
RPC_BIND_HOST=127.0.0.1
RPC_BIND_PORT=8081
P2P_BIND_HOST=0.0.0.0
P2P_BIND_PORT=7071
PROPOSER_KEY=node2_proposer_key_$(date +%s)
MINT_PER_UNIT=1000
COORDINATOR_RATIO=0.05
GOSSIP_BACKEND=broadcast
GOSSIP_BROADCAST_URL=http://127.0.0.1:7070/gossip
EOF
# Create gossip relay service
print_status "Creating gossip relay service..."
sudo cat > /etc/systemd/system/blockchain-gossip-relay.service << EOF
[Unit]
Description=AITBC Blockchain Gossip Relay
After=network.target
[Service]
Type=exec
User=root
WorkingDirectory=/opt/blockchain-node
Environment=PATH=/opt/blockchain-node/.venv/bin:/usr/local/bin:/usr/bin:/bin
Environment=PYTHONPATH=/opt/blockchain-node/src:/opt/blockchain-node/scripts
ExecStart=/opt/blockchain-node/.venv/bin/python3 -m aitbc_chain.gossip.relay --port 7070 --host 0.0.0.0
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF
# Enable and start gossip relay
print_status "Starting gossip relay..."
sudo systemctl daemon-reload
sudo systemctl enable blockchain-gossip-relay
sudo systemctl start blockchain-gossip-relay
# Wait for relay to start
sleep 2
# Check if relay is running
print_status "Checking gossip relay status..."
sudo systemctl status blockchain-gossip-relay --no-pager | head -10
# Restart blockchain nodes
print_status "Restarting blockchain nodes with shared gossip..."
sudo systemctl start blockchain-node blockchain-node-2 blockchain-rpc blockchain-rpc-2
# Wait for nodes to start
sleep 3
# Check status
print_status "Checking node status..."
sudo systemctl status blockchain-node blockchain-node-2 --no-pager | grep -E 'Active:|Main PID:'
echo ""
print_status "✅ Gossip relay setup complete!"
echo ""
echo "Nodes are now connected via shared gossip backend."
echo "They should sync blocks and transactions."
echo ""
echo "To verify connectivity:"
echo " 1. Run: python /opt/test_blockchain_simple.py"
echo " 2. Check if heights are converging"
echo ""
echo "Gossip relay logs: sudo journalctl -u blockchain-gossip-relay -f"

View File

@@ -1,40 +0,0 @@
#!/bin/bash
# Test if blockchain node and explorer are running
echo "🔍 Testing Blockchain Deployment"
echo "==============================="
# Test blockchain RPC
echo "Testing blockchain RPC..."
if curl -s http://aitbc.keisanki.net:8082/rpc/head > /dev/null; then
echo "✅ Blockchain RPC is accessible"
curl -s http://aitbc.keisanki.net:8082/rpc/head | jq '.height'
else
echo "❌ Blockchain RPC is not accessible"
fi
# Test explorer
echo ""
echo "Testing blockchain explorer..."
if curl -s http://aitbc.keisanki.net:3000 > /dev/null; then
echo "✅ Explorer is accessible"
else
echo "❌ Explorer is not accessible"
fi
# Check services on server
echo ""
echo "Checking service status on ns3..."
ssh ns3-root "systemctl is-active blockchain-node blockchain-rpc nginx" | while read service status; do
if [ "$status" = "active" ]; then
echo "$service is running"
else
echo "$service is not running"
fi
done
# Check logs if needed
echo ""
echo "Recent blockchain logs:"
ssh ns3-root "journalctl -u blockchain-node -n 5 --no-pager"

View File

@@ -1,89 +0,0 @@
#!/bin/bash
# Deploy GPU Miner to AITBC Container - All in One
set -e
echo "🚀 Deploying GPU Miner to AITBC Container..."
# Step 1: Copy files
echo "1. Copying GPU scripts..."
scp -o StrictHostKeyChecking=no /home/oib/windsurf/aitbc/gpu_registry_demo.py aitbc:/home/oib/
scp -o StrictHostKeyChecking=no /home/oib/windsurf/aitbc/gpu_miner_with_wait.py aitbc:/home/oib/
# Step 2: Install Python and deps
echo "2. Installing Python and dependencies..."
ssh aitbc 'sudo apt-get update -qq'
ssh aitbc 'sudo apt-get install -y -qq python3 python3-venv python3-pip'
ssh aitbc 'python3 -m venv /home/oib/.venv-gpu'
ssh aitbc '/home/oib/.venv-gpu/bin/pip install -q fastapi uvicorn httpx psutil'
# Step 3: Create GPU registry service
echo "3. Creating GPU registry service..."
ssh aitbc "sudo tee /etc/systemd/system/aitbc-gpu-registry.service >/dev/null <<'EOF'
[Unit]
Description=AITBC GPU Registry
After=network.target
[Service]
Type=simple
User=oib
WorkingDirectory=/home/oib
ExecStart=/home/oib/.venv-gpu/bin/python /home/oib/gpu_registry_demo.py
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF"
# Step 4: Start GPU registry
echo "4. Starting GPU registry..."
ssh aitbc 'sudo systemctl daemon-reload'
ssh aitbc 'sudo systemctl enable --now aitbc-gpu-registry.service'
# Step 5: Create GPU miner service
echo "5. Creating GPU miner service..."
ssh aitbc "sudo tee /etc/systemd/system/aitbc-gpu-miner.service >/dev/null <<'EOF'
[Unit]
Description=AITBC GPU Miner Client
After=network.target aitbc-gpu-registry.service
Wants=aitbc-gpu-registry.service
[Service]
Type=simple
User=oib
WorkingDirectory=/home/oib
ExecStart=/home/oib/.venv-gpu/bin/python /home/oib/gpu_miner_with_wait.py
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF"
# Step 6: Start GPU miner
echo "6. Starting GPU miner..."
ssh aitbc 'sudo systemctl daemon-reload'
ssh aitbc 'sudo systemctl enable --now aitbc-gpu-miner.service'
# Step 7: Check services
echo "7. Checking services..."
echo -e "\n=== GPU Registry Service ==="
ssh aitbc 'sudo systemctl status aitbc-gpu-registry.service --no-pager'
echo -e "\n=== GPU Miner Service ==="
ssh aitbc 'sudo systemctl status aitbc-gpu-miner.service --no-pager'
# Step 8: Verify GPU registration
echo -e "\n8. Verifying GPU registration..."
sleep 3
echo " curl http://10.1.223.93:8091/miners/list"
curl -s http://10.1.223.93:8091/miners/list | python3 -c "import sys,json; data=json.load(sys.stdin); print(f'✅ Found {len(data.get(\"gpus\", []))} GPU(s)'); [print(f' - {gpu[\"capabilities\"][\"gpu\"][\"model\"]} ({gpu[\"capabilities\"][\"gpu\"][\"memory_gb\"]}GB)') for gpu in data.get('gpus', [])]"
echo -e "\n✅ Deployment complete!"
echo "GPU Registry: http://10.1.223.93:8091"
echo "GPU Miner: Running and sending heartbeats"

View File

@@ -1,89 +0,0 @@
#!/bin/bash
# Deploy GPU Miner to AITBC Container
echo "🚀 Deploying GPU Miner to AITBC Container..."
# Check if container is accessible
echo "1. Checking container access..."
sudo incus exec aitbc -- whoami
# Copy GPU miner files
echo "2. Copying GPU miner files..."
sudo incus file push /home/oib/windsurf/aitbc/gpu_miner_with_wait.py aitbc/home/oib/
sudo incus file push /home/oib/windsurf/aitbc/gpu_registry_demo.py aitbc/home/oib/
# Install dependencies
echo "3. Installing dependencies..."
sudo incus exec aitbc -- pip install httpx fastapi uvicorn psutil
# Create GPU miner service
echo "4. Creating GPU miner service..."
cat << 'EOF' | sudo tee /tmp/gpu-miner.service
[Unit]
Description=AITBC GPU Miner Client
After=network.target
[Service]
Type=simple
User=oib
WorkingDirectory=/home/oib
ExecStart=/usr/bin/python3 gpu_miner_with_wait.py
Restart=always
RestartSec=30
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
sudo incus file push /tmp/gpu-miner.service aitbc/tmp/
sudo incus exec aitbc -- sudo mv /tmp/gpu-miner.service /etc/systemd/system/
sudo incus exec aitbc -- sudo systemctl daemon-reload
sudo incus exec aitbc -- sudo systemctl enable gpu-miner.service
sudo incus exec aitbc -- sudo systemctl start gpu-miner.service
# Create GPU registry service
echo "5. Creating GPU registry service..."
cat << 'EOF' | sudo tee /tmp/gpu-registry.service
[Unit]
Description=AITBC GPU Registry
After=network.target
[Service]
Type=simple
User=oib
WorkingDirectory=/home/oib
ExecStart=/usr/bin/python3 gpu_registry_demo.py
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
sudo incus file push /tmp/gpu-registry.service aitbc/tmp/
sudo incus exec aitbc -- sudo mv /tmp/gpu-registry.service /etc/systemd/system/
sudo incus exec aitbc -- sudo systemctl daemon-reload
sudo incus exec aitbc -- sudo systemctl enable gpu-registry.service
sudo incus exec aitbc -- sudo systemctl start gpu-registry.service
# Check services
echo "6. Checking services..."
echo "GPU Miner Service:"
sudo incus exec aitbc -- sudo systemctl status gpu-miner.service --no-pager
echo -e "\nGPU Registry Service:"
sudo incus exec aitbc -- sudo systemctl status gpu-registry.service --no-pager
# Show access URLs
echo -e "\n✅ Deployment complete!"
echo "Access URLs:"
echo " - Container IP: 10.1.223.93"
echo " - GPU Registry: http://10.1.223.93:8091/miners/list"
echo " - Coordinator API: http://10.1.223.93:8000"
echo -e "\nTo check GPU status:"
echo " curl http://10.1.223.93:8091/miners/list"

View File

@@ -1,92 +0,0 @@
#!/usr/bin/env python3
"""
GPU Exchange Integration Demo
Shows how the GPU miner is integrated with the exchange
"""
import json
import httpx
import subprocess
import time
from datetime import datetime
print("🔗 AITBC GPU Exchange Integration")
print("=" * 50)
# Check GPU Registry
print("\n1. 📊 Checking GPU Registry...")
try:
response = httpx.get("http://localhost:8091/miners/list")
if response.status_code == 200:
data = response.json()
gpus = data.get("gpus", [])
print(f" Found {len(gpus)} registered GPU(s)")
for gpu in gpus:
print(f"\n 🎮 GPU Details:")
print(f" Model: {gpu['capabilities']['gpu']['model']}")
print(f" Memory: {gpu['capabilities']['gpu']['memory_gb']} GB")
print(f" CUDA: {gpu['capabilities']['gpu']['cuda_version']}")
print(f" Status: {gpu.get('status', 'Unknown')}")
print(f" Region: {gpu.get('region', 'Unknown')}")
else:
print(" ❌ GPU Registry not accessible")
except Exception as e:
print(f" ❌ Error: {e}")
# Check Exchange
print("\n2. 💰 Checking Trade Exchange...")
try:
response = httpx.get("http://localhost:3002")
if response.status_code == 200:
print(" ✅ Trade Exchange is running")
print(" 🌐 URL: http://localhost:3002")
else:
print(" ❌ Trade Exchange not responding")
except:
print(" ❌ Trade Exchange not accessible")
# Check Blockchain
print("\n3. ⛓️ Checking Blockchain Node...")
try:
response = httpx.get("http://localhost:9080/rpc/head")
if response.status_code == 200:
data = response.json()
print(f" ✅ Blockchain Node active")
print(f" Block Height: {data.get('height', 'Unknown')}")
print(f" Block Hash: {data.get('hash', 'Unknown')[:16]}...")
else:
print(" ❌ Blockchain Node not responding")
except:
print(" ❌ Blockchain Node not accessible")
# Show Integration Points
print("\n4. 🔌 Integration Points:")
print(" • GPU Registry: http://localhost:8091/miners/list")
print(" • Trade Exchange: http://localhost:3002")
print(" • Blockchain RPC: http://localhost:9080")
print(" • GPU Marketplace: Exchange > Browse GPU Marketplace")
# Show API Usage
print("\n5. 📡 API Usage Examples:")
print("\n Get registered GPUs:")
print(" curl http://localhost:8091/miners/list")
print("\n Get GPU details:")
print(" curl http://localhost:8091/miners/localhost-gpu-miner")
print("\n Get blockchain info:")
print(" curl http://localhost:9080/rpc/head")
# Show Current Status
print("\n6. 📈 Current System Status:")
print(" ✅ GPU Miner: Running (systemd)")
print(" ✅ GPU Registry: Running on port 8091")
print(" ✅ Trade Exchange: Running on port 3002")
print(" ✅ Blockchain Node: Running on port 9080")
print("\n" + "=" * 50)
print("🎯 GPU is successfully integrated with the exchange!")
print("\nNext steps:")
print("1. Open http://localhost:3002 in your browser")
print("2. Click 'Browse GPU Marketplace'")
print("3. View the registered RTX 4060 Ti GPU")
print("4. Purchase GPU compute time with AITBC tokens")

View File

@@ -1,396 +0,0 @@
#!/usr/bin/env python3
"""
Real GPU Miner Client for AITBC - runs on host with actual GPU
"""
import json
import time
import httpx
import logging
import sys
import subprocess
import os
from datetime import datetime
# Configuration
COORDINATOR_URL = "http://127.0.0.1:18000"
MINER_ID = "${MINER_API_KEY}"
AUTH_TOKEN = "${MINER_API_KEY}"
HEARTBEAT_INTERVAL = 15
MAX_RETRIES = 10
RETRY_DELAY = 30
# Setup logging with explicit configuration
LOG_PATH = "/home/oib/windsurf/aitbc/logs/host_gpu_miner.log"
os.makedirs(os.path.dirname(LOG_PATH), exist_ok=True)
class FlushHandler(logging.StreamHandler):
def emit(self, record):
super().emit(record)
self.flush()
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[
FlushHandler(sys.stdout),
logging.FileHandler(LOG_PATH)
]
)
logger = logging.getLogger(__name__)
# Force stdout to be unbuffered
sys.stdout.reconfigure(line_buffering=True)
sys.stderr.reconfigure(line_buffering=True)
# GPU capabilities (RTX 4060 Ti)
GPU_CAPABILITIES = {
"gpu": {
"model": "NVIDIA GeForce RTX 4060 Ti",
"memory_gb": 16,
"cuda_version": "12.4",
"platform": "CUDA",
"supported_tasks": ["inference", "training", "stable-diffusion", "llama"],
"max_concurrent_jobs": 1
}
}
def get_gpu_info():
"""Get real GPU information"""
try:
result = subprocess.run(['nvidia-smi', '--query-gpu=name,memory.total,memory.used,utilization.gpu',
'--format=csv,noheader,nounits'],
capture_output=True, text=True, timeout=5)
if result.returncode == 0:
info = result.stdout.strip().split(', ')
return {
"name": info[0],
"memory_total": int(info[1]),
"memory_used": int(info[2]),
"utilization": int(info[3])
}
except Exception as e:
logger.error(f"Failed to get GPU info: {e}")
return None
def check_ollama():
"""Check if Ollama is running and has models"""
try:
response = httpx.get("http://localhost:11434/api/tags", timeout=5)
if response.status_code == 200:
models = response.json().get('models', [])
model_names = [m['name'] for m in models]
logger.info(f"Ollama running with models: {model_names}")
return True, model_names
else:
logger.error("Ollama not responding")
return False, []
except Exception as e:
logger.error(f"Ollama check failed: {e}")
return False, []
def wait_for_coordinator():
"""Wait for coordinator to be available"""
for i in range(MAX_RETRIES):
try:
response = httpx.get(f"{COORDINATOR_URL}/v1/health", timeout=5)
if response.status_code == 200:
logger.info("Coordinator is available!")
return True
except:
pass
logger.info(f"Waiting for coordinator... ({i+1}/{MAX_RETRIES})")
time.sleep(RETRY_DELAY)
logger.error("Coordinator not available after max retries")
return False
def register_miner():
"""Register the miner with the coordinator"""
register_data = {
"capabilities": GPU_CAPABILITIES,
"concurrency": 1,
"region": "localhost"
}
headers = {
"X-Api-Key": AUTH_TOKEN,
"Content-Type": "application/json"
}
try:
response = httpx.post(
f"{COORDINATOR_URL}/v1/miners/register?miner_id={MINER_ID}",
json=register_data,
headers=headers,
timeout=10
)
if response.status_code == 200:
data = response.json()
logger.info(f"Successfully registered miner: {data}")
return data.get("session_token", "demo-token")
else:
logger.error(f"Registration failed: {response.status_code} - {response.text}")
return None
except Exception as e:
logger.error(f"Registration error: {e}")
return None
def send_heartbeat():
"""Send heartbeat to coordinator with real GPU stats"""
gpu_info = get_gpu_info()
if gpu_info:
heartbeat_data = {
"status": "active",
"current_jobs": 0,
"last_seen": datetime.utcnow().isoformat(),
"gpu_utilization": gpu_info["utilization"],
"memory_used": gpu_info["memory_used"],
"memory_total": gpu_info["memory_total"]
}
else:
heartbeat_data = {
"status": "active",
"current_jobs": 0,
"last_seen": datetime.utcnow().isoformat(),
"gpu_utilization": 0,
"memory_used": 0,
}
headers = {
"X-Api-Key": AUTH_TOKEN,
"Content-Type": "application/json"
}
try:
response = httpx.post(
f"{COORDINATOR_URL}/v1/miners/heartbeat?miner_id={MINER_ID}",
json=heartbeat_data,
headers=headers,
timeout=5
)
if response.status_code == 200:
logger.info(f"Heartbeat sent (GPU: {gpu_info['utilization'] if gpu_info else 'N/A'}%)")
else:
logger.error(f"Heartbeat failed: {response.status_code} - {response.text}")
except Exception as e:
logger.error(f"Heartbeat error: {e}")
def execute_job(job, available_models):
"""Execute a job using real GPU resources"""
job_id = job.get('job_id')
payload = job.get('payload', {})
logger.info(f"Executing job {job_id}: {payload}")
try:
if payload.get('type') == 'inference':
# Get the prompt and model
prompt = payload.get('prompt', '')
model = payload.get('model', 'llama3.2:latest')
# Check if model is available
if model not in available_models:
# Use first available model
if available_models:
model = available_models[0]
logger.info(f"Using available model: {model}")
else:
raise Exception("No models available in Ollama")
# Call Ollama API for real GPU inference
logger.info(f"Running inference on GPU with model: {model}")
start_time = time.time()
ollama_response = httpx.post(
"http://localhost:11434/api/generate",
json={
"model": model,
"prompt": prompt,
"stream": False
},
timeout=60
)
if ollama_response.status_code == 200:
result = ollama_response.json()
output = result.get('response', '')
execution_time = time.time() - start_time
# Get GPU stats after execution
gpu_after = get_gpu_info()
# Submit result back to coordinator
submit_result(job_id, {
"result": {
"status": "completed",
"output": output,
"model": model,
"tokens_processed": result.get('eval_count', 0),
"execution_time": execution_time,
"gpu_used": True
},
"metrics": {
"gpu_utilization": gpu_after["utilization"] if gpu_after else 0,
"memory_used": gpu_after["memory_used"] if gpu_after else 0,
"memory_peak": max(gpu_after["memory_used"] if gpu_after else 0, 2048)
}
})
logger.info(f"Job {job_id} completed in {execution_time:.2f}s")
return True
else:
logger.error(f"Ollama error: {ollama_response.status_code}")
submit_result(job_id, {
"result": {
"status": "failed",
"error": f"Ollama error: {ollama_response.text}"
}
})
return False
else:
# Unsupported job type
logger.error(f"Unsupported job type: {payload.get('type')}")
submit_result(job_id, {
"result": {
"status": "failed",
"error": f"Unsupported job type: {payload.get('type')}"
}
})
return False
except Exception as e:
logger.error(f"Job execution error: {e}")
submit_result(job_id, {
"result": {
"status": "failed",
"error": str(e)
}
})
return False
def submit_result(job_id, result):
"""Submit job result to coordinator"""
headers = {
"X-Api-Key": AUTH_TOKEN,
"Content-Type": "application/json"
}
try:
response = httpx.post(
f"{COORDINATOR_URL}/v1/miners/{job_id}/result",
json=result,
headers=headers,
timeout=10
)
if response.status_code == 200:
logger.info(f"Result submitted for job {job_id}")
else:
logger.error(f"Result submission failed: {response.status_code} - {response.text}")
except Exception as e:
logger.error(f"Result submission error: {e}")
def poll_for_jobs():
"""Poll for available jobs"""
poll_data = {
"max_wait_seconds": 5
}
headers = {
"X-Api-Key": AUTH_TOKEN,
"Content-Type": "application/json"
}
try:
response = httpx.post(
f"{COORDINATOR_URL}/v1/miners/poll",
json=poll_data,
headers=headers,
timeout=10
)
if response.status_code == 200:
job = response.json()
logger.info(f"Received job: {job}")
return job
elif response.status_code == 204:
return None
else:
logger.error(f"Poll failed: {response.status_code} - {response.text}")
return None
except Exception as e:
logger.error(f"Error polling for jobs: {e}")
return None
def main():
"""Main miner loop"""
logger.info("Starting Real GPU Miner Client on Host...")
# Check GPU availability
gpu_info = get_gpu_info()
if not gpu_info:
logger.error("GPU not available, exiting")
sys.exit(1)
logger.info(f"GPU detected: {gpu_info['name']} ({gpu_info['memory_total']}MB)")
# Check Ollama
ollama_available, models = check_ollama()
if not ollama_available:
logger.error("Ollama not available - please install and start Ollama")
sys.exit(1)
logger.info(f"Ollama models available: {', '.join(models)}")
# Wait for coordinator
if not wait_for_coordinator():
sys.exit(1)
# Register with coordinator
session_token = register_miner()
if not session_token:
logger.error("Failed to register, exiting")
sys.exit(1)
logger.info("Miner registered successfully, starting main loop...")
# Main loop
last_heartbeat = 0
last_poll = 0
try:
while True:
current_time = time.time()
# Send heartbeat
if current_time - last_heartbeat >= HEARTBEAT_INTERVAL:
send_heartbeat()
last_heartbeat = current_time
# Poll for jobs
if current_time - last_poll >= 3:
job = poll_for_jobs()
if job:
# Execute the job with real GPU
execute_job(job, models)
last_poll = current_time
time.sleep(1)
except KeyboardInterrupt:
logger.info("Shutting down miner...")
except Exception as e:
logger.error(f"Error in main loop: {e}")
sys.exit(1)
if __name__ == "__main__":
main()

View File

@@ -1,3 +0,0 @@
#!/bin/bash
# Wrapper script for GPU miner to ensure proper logging
exec /home/oib/windsurf/aitbc/.venv/bin/python -u /home/oib/windsurf/aitbc/scripts/gpu/gpu_miner_host.py 2>&1

View File

@@ -1,72 +0,0 @@
#!/usr/bin/env python3
"""
Simple GPU Registry Server for demonstration
"""
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import Dict, Any, Optional
import uvicorn
from datetime import datetime
app = FastAPI(title="GPU Registry Demo")
# In-memory storage
registered_gpus: Dict[str, Dict] = {}
class GPURegistration(BaseModel):
capabilities: Dict[str, Any]
concurrency: int = 1
region: Optional[str] = None
class Heartbeat(BaseModel):
inflight: int = 0
status: str = "ONLINE"
metadata: Dict[str, Any] = {}
@app.get("/")
async def root():
return {"message": "GPU Registry Demo", "registered_gpus": len(registered_gpus)}
@app.get("/health")
async def health():
return {"status": "ok"}
@app.post("/miners/register")
async def register_gpu(miner_id: str, gpu_data: GPURegistration):
"""Register a GPU miner"""
registered_gpus[miner_id] = {
"id": miner_id,
"registered_at": datetime.utcnow().isoformat(),
"last_heartbeat": datetime.utcnow().isoformat(),
**gpu_data.dict()
}
return {"status": "ok", "message": f"GPU {miner_id} registered successfully"}
@app.post("/miners/heartbeat")
async def heartbeat(miner_id: str, heartbeat_data: Heartbeat):
"""Receive heartbeat from GPU miner"""
if miner_id not in registered_gpus:
raise HTTPException(status_code=404, detail="GPU not registered")
registered_gpus[miner_id]["last_heartbeat"] = datetime.utcnow().isoformat()
registered_gpus[miner_id]["status"] = heartbeat_data.status
registered_gpus[miner_id]["metadata"] = heartbeat_data.metadata
return {"status": "ok"}
@app.get("/miners/list")
async def list_gpus():
"""List all registered GPUs"""
return {"gpus": list(registered_gpus.values())}
@app.get("/miners/{miner_id}")
async def get_gpu(miner_id: str):
"""Get details of a specific GPU"""
if miner_id not in registered_gpus:
raise HTTPException(status_code=404, detail="GPU not registered")
return registered_gpus[miner_id]
if __name__ == "__main__":
print("Starting GPU Registry Demo on http://localhost:8091")
uvicorn.run(app, host="0.0.0.0", port=8091)

View File

@@ -1,146 +0,0 @@
#!/usr/bin/env python3
"""
Integrate GPU Miner with existing Trade Exchange
"""
import httpx
import json
import subprocess
import time
from datetime import datetime
# Configuration
EXCHANGE_URL = "http://localhost:3002"
GPU_REGISTRY_URL = "http://localhost:8091"
def update_exchange_with_gpu():
"""Update the exchange frontend to show registered GPUs"""
# Read the exchange HTML
with open('/home/oib/windsurf/aitbc/apps/trade-exchange/index.html', 'r') as f:
html_content = f.read()
# Add GPU marketplace integration
gpu_integration = """
<script>
// GPU Integration
async function loadRealGPUOffers() {
try {
const response = await fetch('http://localhost:8091/miners/list');
const data = await response.json();
if (data.gpus && data.gpus.length > 0) {
displayRealGPUOffers(data.gpus);
} else {
displayDemoOffers();
}
} catch (error) {
console.log('Using demo GPU offers');
displayDemoOffers();
}
}
function displayRealGPUOffers(gpus) {
const container = document.getElementById('gpuList');
container.innerHTML = '';
gpus.forEach(gpu => {
const gpuCard = `
<div class="bg-white rounded-lg shadow-lg p-6 card-hover">
<div class="flex justify-between items-start mb-4">
<h3 class="text-lg font-semibold">${gpu.capabilities.gpu.model}</h3>
<span class="bg-green-100 text-green-800 px-2 py-1 rounded text-sm">Available</span>
</div>
<div class="space-y-2 text-sm text-gray-600 mb-4">
<p><i data-lucide="monitor" class="w-4 h-4 inline mr-1"></i>Memory: ${gpu.capabilities.gpu.memory_gb} GB</p>
<p><i data-lucide="zap" class="w-4 h-4 inline mr-1"></i>CUDA: ${gpu.capabilities.gpu.cuda_version}</p>
<p><i data-lucide="cpu" class="w-4 h-4 inline mr-1"></i>Concurrency: ${gpu.concurrency}</p>
<p><i data-lucide="map-pin" class="w-4 h-4 inline mr-1"></i>Region: ${gpu.region}</p>
</div>
<div class="flex justify-between items-center">
<span class="text-2xl font-bold text-purple-600">50 AITBC/hr</span>
<button onclick="purchaseGPU('${gpu.id}')" class="bg-purple-600 text-white px-4 py-2 rounded hover:bg-purple-700 transition">
Purchase
</button>
</div>
</div>
`;
container.innerHTML += gpuCard;
});
lucide.createIcons();
}
// Override the loadGPUOffers function
const originalLoadGPUOffers = loadGPUOffers;
loadGPUOffers = loadRealGPUOffers;
</script>
"""
# Insert before closing body tag
if '</body>' in html_content:
html_content = html_content.replace('</body>', gpu_integration + '</body>')
# Write back to file
with open('/home/oib/windsurf/aitbc/apps/trade-exchange/index.html', 'w') as f:
f.write(html_content)
print("✅ Updated exchange with GPU integration!")
else:
print("❌ Could not find </body> tag in exchange HTML")
def create_gpu_api_endpoint():
"""Create an API endpoint in the exchange to serve GPU data"""
api_code = """
@app.get("/api/gpu/offers")
async def get_gpu_offers():
\"\"\"Get available GPU offers\"\"\"
try:
# Fetch from GPU registry
response = httpx.get("http://localhost:8091/miners/list")
if response.status_code == 200:
data = response.json()
return {"offers": data.get("gpus", [])}
except:
pass
# Return demo data if registry not available
return {
"offers": [{
"id": "demo-gpu-1",
"model": "NVIDIA RTX 4060 Ti",
"memory_gb": 16,
"price_per_hour": 50,
"available": True
}]
}
"""
print("\n📝 To add GPU API endpoint to exchange, add this code to simple_exchange_api.py:")
print(api_code)
def main():
print("🔗 Integrating GPU Miner with Trade Exchange...")
# Update exchange frontend
update_exchange_with_gpu()
# Show API integration code
create_gpu_api_endpoint()
print("\n📊 Integration Summary:")
print("1. ✅ Exchange frontend updated to show real GPUs")
print("2. 📝 See above for API endpoint code")
print("3. 🌐 Access the exchange at: http://localhost:3002")
print("4. 🎯 GPU Registry available at: http://localhost:8091/miners/list")
print("\n🔄 To see the integrated GPU marketplace:")
print("1. Restart the trade exchange if needed:")
print(" cd /home/oib/windsurf/aitbc/apps/trade-exchange")
print(" python simple_exchange_api.py")
print("2. Open http://localhost:3002 in browser")
print("3. Click 'Browse GPU Marketplace'")
if __name__ == "__main__":
main()

View File

@@ -1,32 +0,0 @@
#!/bin/bash
# Start GPU Miner Client
echo "=== AITBC GPU Miner Client Startup ==="
echo "Starting GPU miner client..."
echo ""
# Check if GPU is available
if ! command -v nvidia-smi &> /dev/null; then
echo "WARNING: nvidia-smi not found, GPU may not be available"
fi
# Show GPU info
if command -v nvidia-smi &> /dev/null; then
echo "=== GPU Status ==="
nvidia-smi --query-gpu=name,memory.used,memory.total,utilization.gpu,temperature.gpu --format=csv,noheader,nounits
echo ""
fi
# Check if coordinator is running
echo "=== Checking Coordinator API ==="
if curl -s http://localhost:8000/health > /dev/null 2>&1; then
echo "✓ Coordinator API is running on port 8000"
else
echo "✗ Coordinator API is not accessible on port 8000"
echo " The miner will wait for the coordinator to start..."
fi
echo ""
echo "=== Starting GPU Miner ==="
cd /home/oib/windsurf/aitbc
python3 gpu_miner_with_wait.py

View File

@@ -0,0 +1,52 @@
#!/bin/bash
# AITBC GPU Miner Startup Script
# Copy to start_gpu_miner.sh and adjust variables for your environment
set -e
# === CONFIGURE THESE ===
COORDINATOR_URL="http://YOUR_COORDINATOR_IP:18000"
MINER_API_KEY="your_miner_api_key"
OLLAMA_HOST="http://127.0.0.1:11434"
GPU_ID="gpu-0"
echo "🔧 Starting AITBC GPU Miner"
echo "Coordinator: $COORDINATOR_URL"
echo "Ollama: $OLLAMA_HOST"
echo ""
# Check Ollama is running
if ! curl -s "$OLLAMA_HOST/api/tags" > /dev/null 2>&1; then
echo "❌ Ollama not running at $OLLAMA_HOST"
echo "Start it with: ollama serve"
exit 1
fi
echo "✅ Ollama is running"
# Check GPU
if command -v nvidia-smi &> /dev/null; then
echo "GPU detected:"
nvidia-smi --query-gpu=name,memory.total --format=csv,noheader
else
echo "⚠️ No NVIDIA GPU detected (CPU-only mode)"
fi
# Register miner
echo ""
echo "Registering miner with coordinator..."
curl -s -X POST "$COORDINATOR_URL/v1/miners/register" \
-H "X-Api-Key: $MINER_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"gpu_id\": \"$GPU_ID\", \"ollama_url\": \"$OLLAMA_HOST\"}"
echo ""
echo "✅ Miner registered. Starting heartbeat loop..."
# Heartbeat + job polling loop
while true; do
curl -s -X POST "$COORDINATOR_URL/v1/miners/heartbeat" \
-H "X-Api-Key: $MINER_API_KEY" > /dev/null 2>&1
sleep 10
done

View File

@@ -1,72 +0,0 @@
#!/bin/bash
# Check what's running in the aitbc container
echo "🔍 Checking AITBC Container Status"
echo "================================="
# First, let's see if we can access the container
if ! groups | grep -q incus; then
echo "❌ You're not in the incus group!"
echo "Run: sudo usermod -aG incus \$USER"
echo "Then log out and log back in"
exit 1
fi
echo "📋 Container Info:"
incus list | grep aitbc
echo ""
echo "🔧 Services in container:"
incus exec aitbc -- ps aux | grep -E "(uvicorn|python)" | grep -v grep || echo "No services running"
echo ""
echo "🌐 Ports listening in container:"
incus exec aitbc -- ss -tlnp | grep -E "(8000|9080|3001|3002)" || echo "No ports listening"
echo ""
echo "📁 Nginx status:"
incus exec aitbc -- systemctl status nginx --no-pager -l | head -20
echo ""
echo "🔍 Nginx config test:"
incus exec aitbc -- nginx -t
echo ""
echo "📝 Nginx sites enabled:"
incus exec aitbc -- ls -la /etc/nginx/sites-enabled/
echo ""
echo "🚀 Starting services if needed..."
# Start the services
incus exec aitbc -- bash -c "
cd /home/oib/aitbc
pkill -f uvicorn 2>/dev/null || true
pkill -f server.py 2>/dev/null || true
# Start blockchain node
cd apps/blockchain-node
source ../../.venv/bin/activate
python -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 9080 &
# Start coordinator API
cd ../coordinator-api
source ../../.venv/bin/activate
python -m uvicorn src.app.main:app --host 0.0.0.0 --port 8000 &
# Start marketplace UI
cd ../marketplace-ui
python server.py --port 3001 &
# Start trade exchange
cd ../trade-exchange
python server.py --port 3002 &
sleep 3
echo 'Services started!'
"
echo ""
echo "✅ Done! Check services:"
echo "incus exec aitbc -- ps aux | grep uvicorn"

View File

@@ -1,65 +0,0 @@
#!/bin/bash
# Diagnose AITBC services
echo "🔍 Diagnosing AITBC Services"
echo "=========================="
echo ""
# Check local services
echo "📋 Local Services:"
echo "Port 8000 (Coordinator API):"
lsof -i :8000 2>/dev/null || echo " ❌ Not running"
echo "Port 9080 (Blockchain Node):"
lsof -i :9080 2>/dev/null || echo " ❌ Not running"
echo "Port 3001 (Marketplace UI):"
lsof -i :3001 2>/dev/null || echo " ❌ Not running"
echo "Port 3002 (Trade Exchange):"
lsof -i :3002 2>/dev/null || echo " ❌ Not running"
echo ""
echo "🌐 Testing Endpoints:"
# Test local endpoints
echo "Local API Health:"
curl -s http://127.0.0.1:8000/v1/health 2>/dev/null && echo " ✅ OK" || echo " ❌ Failed"
echo "Local Blockchain:"
curl -s http://127.0.0.1:9080/rpc/head 2>/dev/null | head -c 50 && echo "..." || echo " ❌ Failed"
echo "Local Admin:"
curl -s http://127.0.0.1:8000/v1/admin/stats 2>/dev/null | head -c 50 && echo "..." || echo " ❌ Failed"
echo ""
echo "🌐 Remote Endpoints (via domain):"
echo "Domain API Health:"
curl -s https://aitbc.bubuit.net/health 2>/dev/null && echo " ✅ OK" || echo " ❌ Failed"
echo "Domain Admin:"
curl -s https://aitbc.bubuit.net/admin/stats 2>/dev/null | head -c 50 && echo "..." || echo " ❌ Failed"
echo ""
echo "🔧 Fixing common issues..."
# Stop any conflicting services
echo "Stopping local services..."
sudo fuser -k 8000/tcp 2>/dev/null || true
sudo fuser -k 9080/tcp 2>/dev/null || true
sudo fuser -k 3001/tcp 2>/dev/null || true
sudo fuser -k 3002/tcp 2>/dev/null || true
echo ""
echo "📝 Instructions:"
echo "1. Make sure you're in the incus group: sudo usermod -aG incus \$USER"
echo "2. Log out and log back in"
echo "3. Run: incus exec aitbc -- bash"
echo "4. Inside container, run: /home/oib/start_aitbc.sh"
echo "5. Check services: ps aux | grep uvicorn"
echo ""
echo "If services are running in container but not accessible:"
echo "1. Check port forwarding to 10.1.223.93"
echo "2. Check nginx config in container"
echo "3. Check firewall rules"

View File

@@ -1,58 +0,0 @@
#!/bin/bash
# Quick fix to start AITBC services in container
echo "🔧 Starting AITBC Services in Container"
echo "====================================="
# First, let's manually start the services
echo "1. Starting Coordinator API..."
cd /home/oib/windsurf/aitbc/apps/coordinator-api
source ../../.venv/bin/activate 2>/dev/null || source .venv/bin/activate
python -m uvicorn src.app.main:app --host 0.0.0.0 --port 8000 &
COORD_PID=$!
echo "2. Starting Blockchain Node..."
cd ../blockchain-node
python -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 9080 &
NODE_PID=$!
echo "3. Starting Marketplace UI..."
cd ../marketplace-ui
python server.py --port 3001 &
MARKET_PID=$!
echo "4. Starting Trade Exchange..."
cd ../trade-exchange
python server.py --port 3002 &
EXCHANGE_PID=$!
echo ""
echo "✅ Services started!"
echo "Coordinator API: http://127.0.0.1:8000"
echo "Blockchain: http://127.0.0.1:9080"
echo "Marketplace: http://127.0.0.1:3001"
echo "Exchange: http://127.0.0.1:3002"
echo ""
echo "PIDs:"
echo "Coordinator: $COORD_PID"
echo "Blockchain: $NODE_PID"
echo "Marketplace: $MARKET_PID"
echo "Exchange: $EXCHANGE_PID"
echo ""
echo "To stop: kill $COORD_PID $NODE_PID $MARKET_PID $EXCHANGE_PID"
# Wait a bit for services to start
sleep 3
# Test endpoints
echo ""
echo "🧪 Testing endpoints:"
echo "API Health:"
curl -s http://127.0.0.1:8000/v1/health | head -c 100
echo -e "\n\nAdmin Stats:"
curl -s http://127.0.0.1:8000/v1/admin/stats -H "X-Api-Key: ${ADMIN_API_KEY}" | head -c 100
echo -e "\n\nMarketplace Offers:"
curl -s http://127.0.0.1:8000/v1/marketplace/offers | head -c 100

View File

@@ -1,129 +0,0 @@
#!/bin/bash
# Run AITBC services locally for domain access
set -e
echo "🚀 Starting AITBC Services for Domain Access"
echo "=========================================="
# Kill any existing services
echo "Cleaning up existing services..."
sudo fuser -k 8000/tcp 2>/dev/null || true
sudo fuser -k 9080/tcp 2>/dev/null || true
sudo fuser -k 3001/tcp 2>/dev/null || true
sudo fuser -k 3002/tcp 2>/dev/null || true
pkill -f "uvicorn.*aitbc" 2>/dev/null || true
pkill -f "server.py" 2>/dev/null || true
# Wait for ports to be free
sleep 2
# Create logs directory
mkdir -p logs
echo ""
echo "📦 Starting Services..."
# Start Coordinator API
echo "1. Starting Coordinator API (port 8000)..."
cd apps/coordinator-api
source ../.venv/bin/activate 2>/dev/null || python -m venv ../.venv && source ../.venv/bin/activate
pip install -q -e . 2>/dev/null || true
nohup python -m uvicorn src.app.main:app --host 0.0.0.0 --port 8000 > ../../logs/api.log 2>&1 &
API_PID=$!
echo " PID: $API_PID"
# Start Blockchain Node
echo "2. Starting Blockchain Node (port 9080)..."
cd ../blockchain-node
nohup python -m uvicorn aitbc_chain.app:app --host 0.0.0.0 --port 9080 > ../../logs/blockchain.log 2>&1 &
NODE_PID=$!
echo " PID: $NODE_PID"
# Start Marketplace UI
echo "3. Starting Marketplace UI (port 3001)..."
cd ../marketplace-ui
nohup python server.py --port 3001 > ../../logs/marketplace.log 2>&1 &
MARKET_PID=$!
echo " PID: $MARKET_PID"
# Start Trade Exchange
echo "4. Starting Trade Exchange (port 3002)..."
cd ../trade-exchange
nohup python server.py --port 3002 > ../../logs/exchange.log 2>&1 &
EXCHANGE_PID=$!
echo " PID: $EXCHANGE_PID"
# Save PIDs for cleanup
echo "$API_PID $NODE_PID $MARKET_PID $EXCHANGE_PID" > ../.service_pids
cd ..
# Wait for services to start
echo ""
echo "⏳ Waiting for services to initialize..."
sleep 5
# Test services
echo ""
echo "🧪 Testing Services..."
echo -n "API Health: "
if curl -s http://127.0.0.1:8000/v1/health > /dev/null; then
echo "✅ OK"
else
echo "❌ Failed"
fi
echo -n "Admin API: "
if curl -s http://127.0.0.1:8000/v1/admin/stats -H "X-Api-Key: ${ADMIN_API_KEY}" > /dev/null; then
echo "✅ OK"
else
echo "❌ Failed"
fi
echo -n "Blockchain: "
if curl -s http://127.0.0.1:9080/rpc/head > /dev/null; then
echo "✅ OK"
else
echo "❌ Failed"
fi
echo -n "Marketplace: "
if curl -s http://127.0.0.1:3001 > /dev/null; then
echo "✅ OK"
else
echo "❌ Failed"
fi
echo -n "Exchange: "
if curl -s http://127.0.0.1:3002 > /dev/null; then
echo "✅ OK"
else
echo "❌ Failed"
fi
echo ""
echo "✅ All services started!"
echo ""
echo "📋 Local URLs:"
echo " API: http://127.0.0.1:8000/v1"
echo " RPC: http://127.0.0.1:9080/rpc"
echo " Marketplace: http://127.0.0.1:3001"
echo " Exchange: http://127.0.0.1:3002"
echo ""
echo "🌐 Domain URLs (if nginx is configured):"
echo " API: https://aitbc.bubuit.net/api"
echo " Admin: https://aitbc.bubuit.net/admin"
echo " RPC: https://aitbc.bubuit.net/rpc"
echo " Marketplace: https://aitbc.bubuit.net/Marketplace"
echo " Exchange: https://aitbc.bubuit.net/Exchange"
echo ""
echo "📝 Logs: ./logs/"
echo "🛑 Stop services: ./stop-services.sh"
echo ""
echo "Press Ctrl+C to stop monitoring (services will keep running)"
# Monitor logs
tail -f logs/*.log

View File

@@ -1,40 +0,0 @@
#!/bin/bash
# Download production assets locally
echo "Setting up production assets..."
# Create assets directory
mkdir -p /home/oib/windsurf/aitbc/assets/{css,js,icons}
# Download Tailwind CSS (production build)
echo "Downloading Tailwind CSS..."
curl -L https://unpkg.com/tailwindcss@3.4.0/lib/tailwind.js -o /home/oib/windsurf/aitbc/assets/js/tailwind.js
# Download Axios
echo "Downloading Axios..."
curl -L https://unpkg.com/axios@1.6.2/dist/axios.min.js -o /home/oib/windsurf/aitbc/assets/js/axios.min.js
# Download Lucide icons
echo "Downloading Lucide..."
curl -L https://unpkg.com/lucide@latest/dist/umd/lucide.js -o /home/oib/windsurf/aitbc/assets/js/lucide.js
# Create a custom Tailwind build with only used classes
cat > /home/oib/windsurf/aitbc/assets/tailwind.config.js << 'EOF'
module.exports = {
content: [
"./apps/trade-exchange/index.html",
"./apps/marketplace-ui/index.html"
],
darkMode: 'class',
theme: {
extend: {},
},
plugins: [],
}
EOF
echo "Assets downloaded to /home/oib/windsurf/aitbc/assets/"
echo "Update your HTML files to use local paths:"
echo " - /assets/js/tailwind.js"
echo " - /assets/js/axios.min.js"
echo " - /assets/js/lucide.js"

View File

@@ -1,39 +0,0 @@
#!/bin/bash
echo "=== Starting AITBC Miner Dashboard ==="
echo ""
# Find available port
PORT=8080
while [ $PORT -le 8090 ]; do
if ! netstat -tuln 2>/dev/null | grep -q ":$PORT "; then
echo "✓ Found available port: $PORT"
break
fi
echo "Port $port is in use, trying next..."
PORT=$((PORT + 1))
done
if [ $PORT -gt 8090 ]; then
echo "❌ No available ports found between 8080-8090"
exit 1
fi
# Start the dashboard
echo "Starting dashboard on port $PORT..."
nohup python3 -m http.server $PORT --bind 0.0.0.0 > dashboard.log 2>&1 &
PID=$!
echo ""
echo "✅ Dashboard is running!"
echo ""
echo "Access URLs:"
echo " Local: http://localhost:$PORT"
echo " Network: http://$(hostname -I | awk '{print $1}'):$PORT"
echo ""
echo "Dashboard file: miner-dashboard.html"
echo "Process ID: $PID"
echo "Log file: dashboard.log"
echo ""
echo "To stop: kill $PID"
echo "To view logs: tail -f dashboard.log"

View File

@@ -1,30 +0,0 @@
#!/bin/bash
# Stop all AITBC services
echo "🛑 Stopping AITBC Services"
echo "========================"
# Stop by PID if file exists
if [ -f .service_pids ]; then
PIDS=$(cat .service_pids)
echo "Found PIDs: $PIDS"
for PID in $PIDS; do
if kill -0 $PID 2>/dev/null; then
echo "Stopping PID $PID..."
kill $PID
fi
done
rm -f .service_pids
fi
# Force kill any remaining services
echo "Cleaning up any remaining processes..."
sudo fuser -k 8000/tcp 2>/dev/null || true
sudo fuser -k 9080/tcp 2>/dev/null || true
sudo fuser -k 3001/tcp 2>/dev/null || true
sudo fuser -k 3002/tcp 2>/dev/null || true
pkill -f "uvicorn.*aitbc" 2>/dev/null || true
pkill -f "server.py" 2>/dev/null || true
echo "✅ All services stopped!"

View File

@@ -229,7 +229,7 @@
</a>
</div>
<div class="link-item">
<a href="documentation.html">
<a href="docs/index.html">
<i class="fas fa-book"></i> Documentation
</a>
</div>

View File

@@ -1,37 +0,0 @@
# AITBC Website
This folder contains the complete AITBC platform website, updated to reflect the current production-ready state.
## Files Structure
- `index.html` - Main homepage with platform components and achievements
- `docs/` - Documentation folder (moved to container docs directory)
- `docs-index.html` - Documentation landing page
- `docs-miners.html` - Miner-specific documentation
- `docs-clients.html` - Client-specific documentation
- `docs-developers.html` - Developer-specific documentation
- `documentation.html` - Legacy full documentation page
- `full-documentation.html` - Comprehensive technical documentation
- `404.html` - Custom error page
- `aitbc-proxy.conf` - Nginx reverse proxy configuration
## Deployment
The website is deployed in the AITBC Incus container at:
- Container IP: 10.1.223.93
- Domain: aitbc.bubuit.net
- Documentation: aitbc.bubuit.net/docs/
## Key Updates Made
1. **Production-Ready Messaging**: Changed from concept to actual platform state
2. **Platform Components**: Showcases 7 live components (Blockchain Node, Coordinator API, Marketplace, Explorer, Wallet, Pool Hub, GPU Services)
3. **Achievements Section**: Real metrics (30+ GPU services, Stages 1-7 complete)
4. **Updated Roadmap**: Reflects current development progress
5. **Documentation Structure**: Split by audience (Miners, Clients, Developers)
## Next Steps
- Configure SSL certificate for HTTPS
- Set up DNS for full domain accessibility
- Consider adding live network statistics dashboard

54
website/README.md.example Normal file
View File

@@ -0,0 +1,54 @@
# 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,11 +1,14 @@
# 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 aitbc.bubuit.net localhost;
server_name YOUR_DOMAIN localhost;
# Forward all requests to the AITBC container
location / {
proxy_pass http://10.1.223.93;
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;
@@ -29,7 +32,7 @@ server {
# Health check endpoint
location /health {
proxy_pass http://10.1.223.93/health;
proxy_pass http://YOUR_CONTAINER_IP/health;
access_log off;
}
@@ -38,17 +41,17 @@ server {
error_log /var/log/nginx/aitbc-proxy.error.log;
}
# HTTPS configuration (for future SSL setup)
# HTTPS configuration (uncomment and configure for production)
# server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
# server_name aitbc.bubuit.net;
# server_name YOUR_DOMAIN;
#
# ssl_certificate /etc/ssl/certs/aitbc.bubuit.net.crt;
# ssl_certificate_key /etc/ssl/private/aitbc.bubuit.net.key;
# ssl_certificate /etc/ssl/certs/YOUR_DOMAIN.crt;
# ssl_certificate_key /etc/ssl/private/YOUR_DOMAIN.key;
#
# location / {
# proxy_pass http://10.1.223.93;
# 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;

View File

@@ -1,798 +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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
--code-bg: #1f2937;
--code-text: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
text-align: center;
margin-bottom: 3rem;
}
.doc-header h1 {
font-size: 3rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
}
/* Audience Badge */
.audience-badge {
display: inline-block;
background: var(--success-color);
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: 600;
margin-bottom: 1rem;
}
/* Feature Cards */
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
text-align: center;
transition: transform 0.3s;
}
.feature-card:hover {
transform: translateY(-5px);
}
.feature-icon {
font-size: 3rem;
color: var(--primary-color);
margin-bottom: 1rem;
}
.feature-card h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.feature-card p {
color: var(--text-light);
}
/* Content Sections */
.content-section {
background: var(--bg-white);
border-radius: 10px;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 1.5rem 0 1rem;
color: var(--primary-color);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-light);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
/* Code Blocks */
.code-block {
background: var(--code-bg);
color: var(--code-text);
padding: 1.5rem;
border-radius: 5px;
overflow-x: auto;
margin: 1rem 0;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
}
/* Alert Boxes */
.alert {
padding: 1rem;
border-radius: 5px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid #3b82f6;
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid #f59e0b;
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid #10b981;
color: #065f46;
}
.alert-danger {
background: #fee2e2;
border-left: 4px solid #ef4444;
color: #991b1b;
}
/* Steps */
.step {
display: flex;
align-items: flex-start;
margin-bottom: 2rem;
}
.step-number {
background: var(--success-color);
color: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
margin-right: 1rem;
flex-shrink: 0;
}
.step-content {
flex-grow: 1;
}
.step-content h4 {
color: var(--text-dark);
margin-bottom: 0.5rem;
}
/* Use Case Cards */
.use-case-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.use-case-card {
background: var(--bg-light);
padding: 1.5rem;
border-radius: 10px;
border-top: 4px solid var(--primary-color);
}
.use-case-card h4 {
color: var(--primary-color);
margin-bottom: 1rem;
}
/* Pricing Table */
.pricing-table {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.pricing-card {
background: var(--bg-white);
border-radius: 10px;
padding: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
text-align: center;
}
.pricing-card.featured {
border: 2px solid var(--primary-color);
transform: scale(1.05);
}
.pricing-card h3 {
font-size: 1.5rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.pricing-card .price {
font-size: 3rem;
font-weight: bold;
color: var(--primary-color);
margin-bottom: 1rem;
}
.pricing-card .price-unit {
font-size: 1rem;
color: var(--text-light);
}
.pricing-card ul {
list-style: none;
padding: 0;
margin-bottom: 2rem;
}
.pricing-card li {
padding: 0.5rem 0;
color: var(--text-light);
}
.pricing-card li:before {
content: "✓";
color: var(--success-color);
margin-right: 0.5rem;
}
.btn {
display: inline-block;
padding: 12px 24px;
background: var(--primary-color);
color: white;
text-decoration: none;
border-radius: 5px;
font-weight: 600;
transition: all 0.3s;
border: none;
cursor: pointer;
}
.btn:hover {
background: var(--secondary-color);
transform: translateY(-2px);
}
.btn-outline {
background: transparent;
color: var(--primary-color);
border: 2px solid var(--primary-color);
}
.btn-outline:hover {
background: var(--primary-color);
color: white;
}
/* Footer */
footer {
background: var(--text-dark);
color: white;
padding: 40px 0;
text-align: center;
margin-top: 40px;
}
/* Responsive */
@media (max-width: 768px) {
.doc-header h1 {
font-size: 2rem;
}
.pricing-card.featured {
transform: none;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="docs-miners.html">Miners</a></li>
<li><a href="docs-clients.html" class="active">Clients</a></li>
<li><a href="docs-developers.html">Developers</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<!-- 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>
<!-- 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">
<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>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>
<li><strong>CLI Tool</strong>: For power users</li>
</ul>
<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</h4>
<p>Run inference on pre-trained models including GPT, Stable Diffusion, and custom models</p>
<ul>
<li>Text generation</li>
<li>Image generation</li>
<li>Audio processing</li>
<li>Video analysis</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}")</code-block>
<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);</code-block>
<h3>REST API</h3>
<div class="code-block">
# Submit a job
curl -X POST https://api.aitbc.io/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://api.aitbc.io/v1/jobs/JOB_ID \
-H "Authorization: Bearer YOUR_TOKEN"</code-block>
</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:support@aitbc.io">support@aitbc.io</a></li>
<li><strong>Status</strong>: <a href="https://status.aitbc.io">System status</a></li>
</ul>
<h3>Tutorials</h3>
<ul>
<li><a href="#">Getting Started with AI Inference</a></li>
<li><a href="#">Building a Chat Application</a></li>
<li><a href="#">Image Generation Guide</a></li>
<li><a href="#">Privacy-Preserving ML</a></li>
<li><a href="#">API Integration Best Practices</a></li>
</ul>
<h3>Examples</h3>
<ul>
<li><a href="#">GitHub Repository</a></li>
<li><a href="#">Code Examples</a></li>
<li><a href="#">Sample Applications</a></li>
<li><a href="#">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:support@aitbc.io">support@aitbc.io</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; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -1,839 +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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
--code-bg: #1f2937;
--code-text: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
text-align: center;
margin-bottom: 3rem;
}
.doc-header h1 {
font-size: 3rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
}
/* Audience Badge */
.audience-badge {
display: inline-block;
background: var(--warning-color);
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: 600;
margin-bottom: 1rem;
}
/* Tech Stack Grid */
.tech-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.tech-item {
background: var(--bg-light);
padding: 1rem;
border-radius: 10px;
text-align: center;
transition: transform 0.3s;
}
.tech-item:hover {
transform: translateY(-5px);
background: var(--bg-white);
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.tech-icon {
font-size: 2rem;
color: var(--primary-color);
margin-bottom: 0.5rem;
}
/* Content Sections */
.content-section {
background: var(--bg-white);
border-radius: 10px;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 1.5rem 0 1rem;
color: var(--primary-color);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-light);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
/* Code Blocks */
.code-block {
background: var(--code-bg);
color: var(--code-text);
padding: 1.5rem;
border-radius: 5px;
overflow-x: auto;
margin: 1rem 0;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
}
/* Alert Boxes */
.alert {
padding: 1rem;
border-radius: 5px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid #3b82f6;
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid #f59e0b;
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid #10b981;
color: #065f46;
}
.alert-danger {
background: #fee2e2;
border-left: 4px solid #ef4444;
color: #991b1b;
}
/* Steps */
.step {
display: block;
margin-bottom: 2rem;
}
.step-number {
background: var(--warning-color);
color: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: block;
text-align: center;
line-height: 30px;
font-weight: bold;
margin-bottom: 1rem;
}
.step-content {
flex-grow: 1;
}
.step-content h4 {
color: var(--text-dark);
margin-bottom: 0.5rem;
}
/* Contribution Areas */
.contribution-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.contribution-card {
background: var(--bg-light);
padding: 1.5rem;
border-radius: 10px;
border-left: 4px solid var(--primary-color);
}
.contribution-card h4 {
color: var(--primary-color);
margin-bottom: 1rem;
font-size: 1.2rem;
}
.contribution-card ul {
list-style: none;
padding: 0;
}
.contribution-card li {
padding: 0.3rem 0;
position: relative;
padding-left: 1.5rem;
}
.contribution-card li:before {
content: "→";
position: absolute;
left: 0;
color: var(--primary-color);
}
/* Button */
.btn {
display: inline-block;
padding: 12px 24px;
background: var(--primary-color);
color: white;
text-decoration: none;
border-radius: 5px;
font-weight: 600;
transition: all 0.3s;
border: none;
cursor: pointer;
}
.btn:hover {
background: var(--secondary-color);
transform: translateY(-2px);
}
.btn-outline {
background: transparent;
color: var(--primary-color);
border: 2px solid var(--primary-color);
}
.btn-outline:hover {
background: var(--primary-color);
color: white;
}
/* Footer */
footer {
background: var(--text-dark);
color: white;
padding: 40px 0;
text-align: center;
margin-top: 40px;
}
/* Responsive */
@media (max-width: 768px) {
.doc-header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="docs-miners.html">Miners</a></li>
<li><a href="docs-clients.html">Clients</a></li>
<li><a href="docs-developers.html" class="active">Developers</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<!-- 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>
<!-- 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</code-block>
</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</code-block>
</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</code-block>
</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"</code-block>
</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</code-block>
</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</code>
<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>
<h3Recognition</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="#">Architecture Guide</a></li>
<li><a href="#">Protocol Specification</a></li>
<li><a href="#">Security Best Practices</a></li>
</ul>
<h3>Tools & SDKs</h3>
<ul>
<li><a href="#">Python SDK</a></li>
<li><a href="#">JavaScript SDK</a></li>
<li><a href="#">Go SDK</a></li>
<li><a href="#">Rust SDK</a></li>
<li><a href="#">CLI Tools</a></li>
</ul>
<h3>Development Environment</h3>
<ul>
<li><a href="#">Docker Compose Setup</a></li>
<li><a href="#">Local Testnet</a></li>
<li><a href="#">Faucet for Test Tokens</a></li>
<li><a href="#">Block Explorer</a></li>
</ul>
<h3>Learning Resources</h3>
<ul>
<li><a href="#">Video Tutorials</a></li>
<li><a href="#">Workshop Materials</a></li>
<li><a href="#">Blog Posts</a></li>
<li><a href="#">Research Papers</a></li>
</ul>
</section>
<!-- Contributing Code Example -->
<section class="content-section">
<h2>Example: Adding a New API Endpoint</h2>
<div class="code-block">
// File: coordinator-api/internal/handler/new_endpoint.go
package handler
import (
"net/http"
"github.com/gin-gonic/gin"
)
// NewEndpoint handles new feature requests
func (h *Handler) NewEndpoint(c *gin.Context) {
var req NewEndpointRequest
if err := c.ShouldBindJSON(&req); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
// Validate request
if err := req.Validate(); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
// Process request
result, err := h.service.ProcessNewEndpoint(req)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, result)
}</code>
<h3>Test Your Changes</h3>
<div class="code-block">
// File: coordinator-api/internal/handler/new_endpoint_test.go
package handler
import (
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestNewEndpoint(t *testing.T) {
// Setup
h := setupTestHandler(t)
// Test request
req := NewEndpointRequest{
Field1: "test",
Field2: 123,
}
// Create HTTP request
body, _ := json.Marshal(req)
w := httptest.NewRecorder()
r := httptest.NewRequest("POST", "/api/v1/new-endpoint", bytes.NewReader(body))
// Execute
h.NewEndpoint(w, r)
// Assert
require.Equal(t, http.StatusOK, w.Code)
var response NewEndpointResponse
err := json.Unmarshal(w.Body.Bytes(), &response)
require.NoError(t, err)
assert.Equal(t, "expected_value", response.Result)
}</code>
</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; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -1,585 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-light);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 60px 0;
}
.doc-header {
text-align: center;
margin-bottom: 4rem;
}
.doc-header h1 {
font-size: 3.5rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
font-size: 1.3rem;
color: var(--text-light);
max-width: 600px;
margin: 0 auto;
}
/* Search Bar */
.search-container {
max-width: 600px;
margin: 0 auto 4rem;
position: relative;
}
.search-bar {
width: 100%;
padding: 1rem 3rem 1rem 1.5rem;
font-size: 1.1rem;
border: 2px solid var(--border-color);
border-radius: 50px;
outline: none;
transition: all 0.3s;
}
.search-bar:focus {
border-color: var(--primary-color);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.search-icon {
position: absolute;
right: 1.5rem;
top: 50%;
transform: translateY(-50%);
color: var(--text-light);
font-size: 1.2rem;
}
/* Reader Level Cards */
.reader-levels {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 2rem;
margin-bottom: 4rem;
}
.reader-card {
background: var(--bg-white);
border-radius: 15px;
padding: 2.5rem;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
transition: all 0.3s;
position: relative;
overflow: hidden;
}
.reader-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 5px;
}
.reader-card.miner::before {
background: var(--primary-color);
}
.reader-card.client::before {
background: var(--success-color);
}
.reader-card.developer::before {
background: var(--warning-color);
}
.reader-card:hover {
transform: translateY(-10px);
box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.reader-icon {
width: 80px;
height: 80px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
color: white;
margin-bottom: 1.5rem;
}
.reader-card.miner .reader-icon {
background: var(--primary-color);
}
.reader-card.client .reader-icon {
background: var(--success-color);
}
.reader-card.developer .reader-icon {
background: var(--warning-color);
}
.reader-card.full-doc .reader-icon {
background: var(--danger-color);
}
.reader-card h3 {
font-size: 1.8rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.reader-card p {
color: var(--text-light);
margin-bottom: 2rem;
line-height: 1.8;
}
.reader-features {
list-style: none;
margin-bottom: 2rem;
}
.reader-features li {
padding: 0.5rem 0;
color: var(--text-light);
position: relative;
padding-left: 1.5rem;
}
.reader-features li::before {
content: "✓";
position: absolute;
left: 0;
color: var(--success-color);
font-weight: bold;
}
.reader-card.miner .reader-features li::before {
color: var(--primary-color);
}
.reader-card.client .reader-features li::before {
color: var(--success-color);
}
.reader-card.developer .reader-features li::before {
color: var(--warning-color);
}
.btn {
display: inline-block;
padding: 12px 30px;
background: var(--primary-color);
color: white;
text-decoration: none;
border-radius: 50px;
font-weight: 600;
transition: all 0.3s;
border: none;
cursor: pointer;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.btn-outline {
background: transparent;
color: var(--primary-color);
border: 2px solid var(--primary-color);
}
.btn-outline:hover {
background: var(--primary-color);
color: white;
}
.reader-card.miner .btn {
background: var(--primary-color);
}
.reader-card.client .btn {
background: var(--success-color);
}
.reader-card.developer .btn {
background: var(--warning-color);
}
.reader-card.full-doc .btn {
background: var(--danger-color);
}
.reader-card.full-doc::before {
background: var(--danger-color);
}
/* Quick Links */
.quick-links {
background: var(--bg-white);
border-radius: 15px;
padding: 3rem;
margin-bottom: 4rem;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.quick-links h2 {
font-size: 2rem;
margin-bottom: 2rem;
color: var(--text-dark);
text-align: center;
}
.links-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
}
.link-item {
display: flex;
align-items: center;
padding: 1rem;
background: var(--bg-light);
border-radius: 10px;
text-decoration: none;
color: var(--text-dark);
transition: all 0.3s;
}
.link-item:hover {
background: var(--primary-color);
color: white;
transform: translateX(5px);
}
.link-item i {
font-size: 1.5rem;
margin-right: 1rem;
color: var(--primary-color);
}
.link-item:hover i {
color: white;
}
/* Help Section */
.help-section {
text-align: center;
padding: 3rem;
background: var(--bg-white);
border-radius: 15px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.help-section h2 {
font-size: 2rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.help-section p {
color: var(--text-light);
margin-bottom: 2rem;
}
.help-buttons {
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
}
/* Footer */
footer {
background: var(--text-dark);
color: white;
padding: 40px 0;
text-align: center;
margin-top: 60px;
}
/* Responsive */
@media (max-width: 768px) {
.doc-header h1 {
font-size: 2.5rem;
}
.reader-levels {
grid-template-columns: 1fr;
}
.help-buttons {
flex-direction: column;
align-items: center;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<!-- 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>
<!-- 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>Mining setup and configuration</li>
<li>Hardware requirements</li>
<li>Profit calculations</li>
<li>Security best practices</li>
<li>Troubleshooting guide</li>
</ul>
<a href="docs-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>Quick start guide</li>
<li>API and SDK documentation</li>
<li>Use case examples</li>
<li>Pricing information</li>
<li>Privacy & security features</li>
</ul>
<a href="docs-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="docs-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>
</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://aitbc.bubuit.net/Exchange/" class="link-item">
<i class="fas fa-exchange-alt"></i>
<span>Trade Exchange</span>
</a>
<a href="browser-wallet.html" class="link-item">
<i class="fas fa-wallet"></i>
<span>Browser Wallet</span>
</a>
<a href="https://github.com/oib/AITBC" class="link-item">
<i class="fab fa-git-alt"></i>
<span>Source Code</span>
</a>
<a href="https://discord.gg/aitbc" class="link-item">
<i class="fab fa-discord"></i>
<span>Community</span>
</a>
<a href="mailto:support@aitbc.io" class="link-item">
<i class="fas fa-envelope"></i>
<span>Support</span>
</a>
<a href="#" class="link-item">
<i class="fas fa-graduation-cap"></i>
<span>Tutorials</span>
</a>
<a href="#" class="link-item">
<i class="fas fa-video"></i>
<span>Video Guides</span>
</a>
</div>
</section>
<!-- Help Section -->
<section class="help-section">
<h2>Need Help?</h2>
<p>Can't find what you're looking for? Our community is here to help!</p>
<div class="help-buttons">
<a href="https://discord.gg/aitbc" class="btn">
<i class="fab fa-discord"></i> Join Discord
</a>
<a href="mailto:support@aitbc.io" class="btn btn-outline">
<i class="fas fa-envelope"></i> Email Support
</a>
<a href="#" class="btn btn-outline">
<i class="fas fa-comments"></i> Live Chat
</a>
</div>
</section>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
<script>
// Search functionality
document.getElementById('searchInput').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
const searchTerm = e.target.value.toLowerCase();
if (searchTerm) {
// Simple search logic - in real implementation, this would search actual docs
alert(`Searching for: ${searchTerm}\n\nIn a full implementation, this would search through all documentation pages and show relevant results.`);
}
}
});
// Add some interactivity
document.querySelectorAll('.reader-card').forEach(card => {
card.addEventListener('mouseenter', function() {
this.style.cursor = 'pointer';
});
});
</script>
</body>
</html>

View File

@@ -1,727 +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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
--code-bg: #1f2937;
--code-text: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
text-align: center;
margin-bottom: 3rem;
}
.doc-header h1 {
font-size: 3rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
}
/* Audience Badge */
.audience-badge {
display: inline-block;
background: var(--primary-color);
color: white;
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: 600;
margin-bottom: 1rem;
}
/* Quick Stats */
.quick-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.stat-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
text-align: center;
}
.stat-value {
font-size: 2rem;
font-weight: bold;
color: var(--primary-color);
}
.stat-label {
color: var(--text-light);
margin-top: 0.5rem;
}
/* Content Sections */
.content-section {
background: var(--bg-white);
border-radius: 10px;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 1.5rem 0 1rem;
color: var(--primary-color);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-light);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
/* Code Blocks */
.code-block {
background: var(--code-bg);
color: var(--code-text);
padding: 1.5rem;
border-radius: 5px;
overflow-x: auto;
margin: 1rem 0;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
}
/* Alert Boxes */
.alert {
padding: 1rem;
border-radius: 5px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid #3b82f6;
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid #f59e0b;
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid #10b981;
color: #065f46;
}
.alert-danger {
background: #fee2e2;
border-left: 4px solid #ef4444;
color: #991b1b;
}
/* Requirements Grid */
.requirements-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
margin: 1rem 0;
}
.requirement-card {
background: var(--bg-light);
padding: 1rem;
border-radius: 5px;
border-left: 4px solid var(--primary-color);
}
.requirement-card h4 {
color: var(--primary-color);
margin-bottom: 0.5rem;
}
/* Steps */
.step {
display: flex;
align-items: flex-start;
margin-bottom: 2rem;
}
.step-number {
background: var(--primary-color);
color: white;
width: 30px;
height: 30px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
margin-right: 1rem;
flex-shrink: 0;
}
.step-content {
flex-grow: 1;
}
.step-content h4 {
color: var(--text-dark);
margin-bottom: 0.5rem;
}
/* Profit Calculator */
.calculator {
background: var(--bg-light);
padding: 2rem;
border-radius: 10px;
margin: 2rem 0;
}
.calculator h3 {
margin-bottom: 1.5rem;
color: var(--text-dark);
}
.calc-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
margin-bottom: 1rem;
}
.calc-input {
display: flex;
flex-direction: column;
}
.calc-input label {
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--text-dark);
}
.calc-input input {
padding: 0.5rem;
border: 1px solid var(--border-color);
border-radius: 5px;
font-size: 1rem;
}
.calc-result {
background: var(--bg-white);
padding: 1rem;
border-radius: 5px;
margin-top: 1rem;
text-align: center;
}
.calc-result-value {
font-size: 2rem;
font-weight: bold;
color: var(--success-color);
}
/* FAQ */
.faq-item {
background: var(--bg-light);
padding: 1rem;
border-radius: 5px;
margin-bottom: 1rem;
}
.faq-question {
font-weight: 600;
color: var(--text-dark);
margin-bottom: 0.5rem;
}
.faq-answer {
color: var(--text-light);
}
/* Footer */
footer {
background: var(--text-dark);
color: white;
padding: 40px 0;
text-align: center;
margin-top: 40px;
}
/* Responsive */
@media (max-width: 768px) {
.doc-header h1 {
font-size: 2rem;
}
.calc-row {
grid-template-columns: 1fr;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="docs-miners.html" class="active">Miners</a></li>
<li><a href="docs-clients.html">Clients</a></li>
<li><a href="docs-developers.html">Developers</a></li>
<li><a href="https://github.com/oib/AITBC">GitHub</a></li>
</ul>
</nav>
</header>
<!-- 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>
<!-- 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">
<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>: Provide compute power for AI/ML workloads</li>
<li><strong>Hybrid Mining</strong>: Combine staking with compute provision</li>
</ul>
<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://releases.aitbc.io/aitbc-miner-v1.0.0.tar.gz
tar -xzf aitbc-miner-v1.0.0.tar.gz
cd aitbc-miner
# Windows
# Download from https://releases.aitbc.io/windows</code-block>
</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</code-block>
</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</code-block>
</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</code-block>
</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 (Optional)</h4>
<p>NVIDIA RTX 3080+ or AMD RX 6800+</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>Note:</strong> GPU mining requires additional setup but offers higher rewards through AI/ML workload processing.
</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: miners@aitbc.io</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; 2025 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>
</body>
</html>

View File

@@ -5,183 +5,26 @@
<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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.api-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.api-card {
background: var(--bg-white);
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 2rem;
transition: all 0.3s;
}
.api-card:hover {
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
transform: translateY(-5px);
}
.api-card h3 {
margin-top: 0;
color: var(--primary-color);
font-size: 1.5rem;
}
.api-card .endpoint {
font-family: monospace;
background: var(--bg-light);
padding: 0.5rem 1rem;
border-radius: 4px;
margin: 1rem 0;
color: var(--text-dark);
}
.method {
display: inline-block;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-size: 0.875rem;
font-weight: 600;
margin-right: 0.5rem;
}
.method.get { background: #10b981; color: white; }
.method.post { background: #3b82f6; color: white; }
.method.put { background: #f59e0b; color: white; }
.method.delete { background: #ef4444; color: white; }
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="../docs/index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<!-- Header -->
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<main>
@@ -328,12 +171,12 @@
</div>
<!-- Authentication -->
<section style="margin-top: 3rem;">
<section class="content-section">
<h2>Authentication</h2>
<p>All API requests must include an API key in the header:</p>
<pre style="background: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 8px; overflow-x: auto;"><code>X-Api-Key: your_api_key_here</code></pre>
<pre class="code-inline"><code>X-Api-Key: your_api_key_here</code></pre>
<h3 style="margin-top: 2rem;">Getting API Keys</h3>
<h3>Getting API Keys</h3>
<ul>
<li>Clients: Register through the web interface or contact support</li>
<li>Miners: Generated upon registration</li>
@@ -342,23 +185,23 @@
</section>
<!-- Base URL -->
<section style="margin-top: 3rem;">
<section class="content-section">
<h2>Base URL</h2>
<p>All API endpoints are relative to the base URL:</p>
<pre style="background: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 8px; overflow-x: auto;"><code>https://aitbc.bubuit.net/api</code></pre>
<pre class="code-inline"><code>https://aitbc.bubuit.net/api</code></pre>
<p>For development:</p>
<pre style="background: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 8px; overflow-x: auto;"><code>http://localhost:18000</code></pre>
<pre class="code-inline"><code>http://localhost:18000</code></pre>
</section>
<!-- WebSocket -->
<section style="margin-top: 3rem;">
<section class="content-section">
<h2>WebSocket API</h2>
<p>Real-time updates are available through WebSocket connections:</p>
<pre style="background: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 8px; overflow-x: auto;"><code>ws://aitbc.bubuit.net:18001/ws</code></pre>
<pre class="code-inline"><code>ws://aitbc.bubuit.net:18001/ws</code></pre>
<p>Subscribe to events:</p>
<pre style="background: #1f2937; color: #f9fafb; padding: 1rem; border-radius: 8px; overflow-x: auto;"><code>{
<pre class="code-inline"><code>{
"method": "subscribe",
"params": ["job_updates", "miner_heartbeats"]
}</code></pre>
@@ -368,8 +211,9 @@
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -1,488 +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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: #10b98120;
color: var(--success-color);
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
margin-top: 1rem;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.feature-card h4 {
margin-top: 0;
color: var(--primary-color);
}
.api-endpoint {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
border-left: 4px solid var(--primary-color);
}
.api-endpoint code {
display: block;
font-weight: bold;
margin-bottom: 0.5rem;
color: var(--primary-color);
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">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</span>
</div>
<!-- Overview -->
<section class="content-section">
<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>
<!-- Running a Node -->
<section class="content-section">
<h2>Running a Node</h2>
<h3>Development Mode</h3>
<pre><code># Initialize devnet
python -m blockchain.scripts.init_devnet
# Start node
python -m blockchain.main --config devnet.yaml</code></pre>
<h3>Production Mode</h3>
<pre><code># Using Docker
docker run -d \
-v /data/blockchain:/data \
-p 9080:9080 \
-p 9081:9081 \
-p 9090:9090 \
aitbc/blockchain-node:latest</code></pre>
</section>
<!-- Monitoring -->
<section class="content-section">
<h2>Monitoring</h2>
<h3>Prometheus Metrics</h3>
<p>Available at <code>http://localhost:9090/metrics</code></p>
<p>Key metrics:</p>
<ul>
<li><code>blockchain_blocks_total</code> - Total blocks produced</li>
<li><code>blockchain_transactions_total</code> - Total transactions processed</li>
<li><code>blockchain_consensus_rounds</code> - Consensus rounds completed</li>
<li><code>blockchain_network_peers</code> - Active peer connections</li>
</ul>
<h3>Health Checks</h3>
<pre><code># Node status
curl http://localhost:9080/health
# Sync status
curl http://localhost:9080/sync_status</code></pre>
</section>
<!-- Troubleshooting -->
<section class="content-section">
<h2>Troubleshooting</h2>
<h3>Common Issues</h3>
<ol>
<li><strong>Node not syncing</strong>
<ul>
<li>Check peer connections: <code>curl /rpc/peers</code></li>
<li>Verify network connectivity</li>
<li>Check logs for consensus errors</li>
</ul>
</li>
<li><strong>High memory usage</strong>
<ul>
<li>Reduce <code>block_cache_size</code> in config</li>
<li>Enable block pruning</li>
</ul>
</li>
<li><strong>RPC timeouts</strong>
<ul>
<li>Increase <code>rpc_timeout</code> setting</li>
<li>Check system resources</li>
</ul>
</li>
</ol>
</section>
<!-- Development -->
<section class="content-section">
<h2>Development</h2>
<h3>Building from Source</h3>
<pre><code>git clone https://github.com/aitbc/blockchain
cd blockchain
pip install -e .</code></pre>
<h3>Running Tests</h3>
<pre><code># Unit tests
pytest tests/
# Integration tests
pytest tests/integration/</code></pre>
</section>
<!-- Security Considerations -->
<section class="content-section">
<h2>Security Considerations</h2>
<ul>
<li>Validator keys should be kept secure</li>
<li>Use HTTPS in production</li>
<li>Implement rate limiting on RPC endpoints</li>
<li>Regular security updates for dependencies</li>
</ul>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -5,272 +5,26 @@
<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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-light);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
background: var(--bg-white);
padding: 3rem 0;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.doc-header h1 {
font-size: 2.5rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
color: var(--text-light);
font-size: 1.1rem;
}
.breadcrumb {
margin-bottom: 2rem;
}
.breadcrumb a {
color: var(--primary-color);
text-decoration: none;
}
.breadcrumb span {
color: var(--text-light);
margin: 0 0.5rem;
}
/* Content Sections */
.content-section {
background: var(--bg-white);
padding: 2.5rem;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
display: flex;
align-items: center;
gap: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-light);
}
.content-section ul {
margin-left: 2rem;
margin-bottom: 1rem;
}
.content-section li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
.content-section code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-family: 'Courier New', monospace;
color: var(--primary-color);
}
.content-section pre {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
.content-section pre code {
background: none;
padding: 0;
color: var(--text-dark);
}
/* Feature Grid */
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
padding: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-light);
}
.feature-card h4 {
color: var(--primary-color);
margin-bottom: 0.5rem;
}
/* API Endpoints */
.api-endpoint {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
border-left: 4px solid var(--primary-color);
}
.api-endpoint code {
display: block;
font-weight: bold;
margin-bottom: 0.5rem;
}
/* Status Badge */
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
}
.status-badge.live {
background: #10b98120;
color: var(--success-color);
}
/* Back Button */
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
/* Responsive */
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
.content-section {
padding: 1.5rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html" class="active">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<!-- Main Content -->
@@ -280,7 +34,7 @@
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">Components</a>
<a href="components.html">Components</a>
<span></span>
<span>Blockchain Node</span>
</div>
@@ -450,5 +204,6 @@ python -m aitbc_chain.node</code></pre>
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -1,417 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<html>
<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>
<style>
.hero-gradient {
background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
.feature-card {
transition: all 0.3s ease;
border: 1px solid #e5e7eb;
}
.feature-card:hover {
transform: translateY(-4px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.browser-button {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
padding: 16px 32px;
border-radius: 12px;
font-size: 18px;
font-weight: 600;
transition: all 0.3s ease;
text-decoration: none;
color: white;
}
.browser-button:hover {
transform: scale(1.05);
}
.chrome-button {
background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
}
.firefox-button {
background: linear-gradient(135deg, #ff9500 0%, #ff6611 100%);
}
.step-number {
width: 40px;
height: 40px;
background: #f97316;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
flex-shrink: 0;
}
.code-block {
background: #1e293b;
color: #e2e8f0;
padding: 16px;
border-radius: 8px;
font-family: monospace;
overflow-x: auto;
}
.security-icon {
width: 64px;
height: 64px;
margin: 0 auto 16px;
}
</style>
<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 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; 2025 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>
<body>
<p>Redirecting to <a href="/wallet/">AITBC Browser Wallet</a></p>
</body>
</html>

View File

@@ -1,586 +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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.feature-card h4 {
margin-top: 0;
color: var(--primary-color);
}
.pricing-table {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.pricing-card {
background: var(--bg-white);
padding: 2rem;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
text-align: center;
}
.pricing-card h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--primary-color);
}
.pricing-card .price {
font-size: 2.5rem;
font-weight: bold;
margin-bottom: 1rem;
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.inline-code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.9rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
.alert {
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid var(--primary-color);
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid var(--warning-color);
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid var(--success-color);
color: #065f46;
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<span>Client Documentation</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="fa fa-users"></i> Client Documentation</h1>
<p>Use AITBC for your AI/ML workloads with privacy and verifiable computation. Ideal for businesses and developers using AI services.</p>
</div>
<!-- Getting Started -->
<section class="content-section">
<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>: 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>
<pre><code># Install the CLI wrapper
curl -O https://github.com/oib/AITBC/releases/download/latest/aitbc-cli.sh
chmod +x aitbc-cli.sh
# Check available services
./aitbc-cli.sh status
# Submit a job
./aitbc-cli.sh submit "Your prompt here" --model llama3.2</code></pre>
<h3>Web Interface</h3>
<p>Visit the <a href="../marketplace/">marketplace</a> to access the web interface.</p>
</section>
<!-- Python SDK -->
<section class="content-section">
<h2>Python SDK</h2>
<p>Install the Python SDK for easy integration into your applications:</p>
<pre><code># Install
pip install aitbc-client
# Basic usage
from aitbc import AITBCClient
client = AITBCClient(api_key="your-api-key")
# Submit a job
job = client.submit_job(
type="inference",
model="llama3.2",
prompt="Explain quantum computing",
max_tokens=500
)
# Wait for completion
result = client.wait_for_job(job.id)
print(result.output)</code></pre>
<h3>Advanced Features</h3>
<ul>
<li>Async/await support</li>
<li>Batch job submission</li>
<li>Streaming responses</li>
<li>Zero-knowledge proof verification</li>
</ul>
</section>
<!-- JavaScript SDK -->
<section class="content-section">
<h2>JavaScript SDK</h2>
<p>For web applications and Node.js:</p>
<pre><code># Install
npm install @aitbc/client
# Usage
import { AITBCClient } from '@aitbc/client';
const client = new AITBCClient({
apiKey: 'your-api-key',
endpoint: 'https://aitbc.bubuit.net/api'
});
// Submit job
const job = await client.submit({
type: 'inference',
model: 'llama3.2',
input: {
prompt: 'Hello, AITBC!',
max_tokens: 100
}
});
// Get result
const result = await client.getResult(job.id);
console.log(result.output);</code></pre>
</section>
<!-- REST API -->
<section class="content-section">
<h2>REST API</h2>
<p>Direct API access for any programming language:</p>
<pre><code># 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": {
"zk_proof": true
}
}'
# Check job status
curl -X GET https://aitbc.bubuit.net/api/v1/jobs/JOB_ID \
-H "Authorization: Bearer YOUR_TOKEN"</code></pre>
</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/1K tokens</div>
<ul style="text-align: left;">
<li>No minimum commitment</li>
<li>Pay for what you use</li>
<li>All models available</li>
</ul>
</div>
<div class="pricing-card">
<h3>Professional</h3>
<div class="price">$99/month</div>
<ul style="text-align: left;">
<li>10M tokens included</li>
<li>Priority processing</li>
<li>SLA guarantee</li>
</ul>
</div>
<div class="pricing-card">
<h3>Enterprise</h3>
<div class="price">Custom</div>
<ul style="text-align: left;">
<li>Unlimited tokens</li>
<li>Dedicated infrastructure</li>
<li>24/7 support</li>
</ul>
</div>
</div>
</section>
<!-- Privacy & Security -->
<section class="content-section">
<h2>Privacy & Security</h2>
<p>Your data is protected with enterprise-grade security:</p>
<div class="feature-grid">
<div class="feature-card">
<h4><i class="fas fa-shield-alt"></i> Zero-Knowledge Proofs</h4>
<p>Computation is verified without revealing your data</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-lock"></i> End-to-End Encryption</h4>
<p>Your prompts and results are encrypted in transit and at rest</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-certificate"></i> Verifiable Computation</h4>
<p>Every result includes a cryptographic proof of correct execution</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-user-secret"></i> Privacy-Preserving</h4>
<p>Optional privacy mode keeps your data completely confidential</p>
</div>
</div>
</section>
<!-- Supported Models -->
<section class="content-section">
<h2>Supported Models</h2>
<p>Access a wide range of state-of-the-art AI models:</p>
<h3>Language Models</h3>
<ul>
<li>LLaMA 3.2 (8B, 70B)</li>
<li>Mistral (7B, 8x7B)</li>
<li>DeepSeek (67B)</li>
<li>Code Llama (34B)</li>
<li>GPT-4 (via API)</li>
</ul>
<h3>Image Models</h3>
<ul>
<li>Stable Diffusion XL</li>
<li>DALL-E 3 (via API)</li>
<li>Midjourney (via API)</li>
</ul>
<h3>Specialized Models</h3>
<ul>
<li>Embedding models for search</li>
<li>Speech-to-text (Whisper)</li>
<li>Text-to-speech</li>
<li>Translation models</li>
</ul>
</section>
<!-- Best Practices -->
<section class="content-section">
<h2>Best Practices</h2>
<div class="alert alert-info">
<strong>💡 Tip:</strong> Use batch processing for multiple requests to reduce latency and costs.
</div>
<h3>Performance Optimization</h3>
<ul>
<li>Use appropriate model sizes for your task</li>
<li>Implement caching for repeated requests</li>
<li>Use streaming for long responses</li>
<li>Monitor token usage to control costs</li>
<li>Consider subscription plans for regular use</li>
</ul>
<h3>Security Best Practices</h3>
<ul>
<li>Keep your API keys secure</li>
<li>Use environment variables for credentials</li>
<li>Implement proper error handling</li>
<li>Validate inputs before submission</li>
<li>Use HTTPS for all API calls</li>
</ul>
</section>
<!-- Support & Resources -->
<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:aitbc@bubuit.net">aitbc@bubuit.net</a></li>
<li><strong>Status</strong>: System status available in monitoring dashboard</li>
</ul>
<h3>Tutorials</h3>
<ul>
<li><a href="#">Getting Started with AI Inference</a></li>
<li><a href="#">Building a Chat Application</a></li>
<li><a href="#">Image Generation Guide</a></li>
<li><a href="#">Privacy-Preserving ML</a></li>
<li><a href="#">API Integration Best Practices</a></li>
</ul>
<h3>Examples</h3>
<ul>
<li><a href="#">Python Examples Repository</a></li>
<li><a href="#">JavaScript Examples</a></li>
<li><a href="#">API Postman Collection</a></li>
<li><a href="#">Sample Applications</a></li>
</ul>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -9,19 +9,19 @@
</head>
<body>
<!-- Header -->
<header class="shadow-lg" style="background: var(--bg-white); position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
<div class="container" style="max-width: 1200px; margin: 0 auto; padding: 0 20px;">
<div style="display: flex; align-items: center; justify-content: space-between; padding: 1rem 0;">
<div style="display: flex; align-items: center; gap: 0.75rem;">
<i class="fa fa-cube" style="font-size: 2rem; color: var(--primary-color);"></i>
<h1 style="font-size: 1.5rem; font-weight: bold; margin: 0; color: var(--text-dark);">AITBC</h1>
</div>
<nav style="display: flex; align-items: center; gap: 1.5rem;">
<a href="/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Home</a>
<a href="/explorer/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Explorer</a>
<a href="/Exchange/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Exchange</a>
<a href="/docs/index.html" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Documentation</a>
<button id="themeToggle" class="theme-toggle" style="background: rgba(59, 130, 246, 0.1) !important; color: var(--primary-color) !important; border: 2px solid var(--primary-color); padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; font-size: 1rem;">🌞</button>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
@@ -34,9 +34,12 @@
<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 style="margin-top: 2rem; padding: 1.5rem; background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%); border-radius: 15px; border: 2px solid rgba(16, 185, 129, 0.2);">
<h3 style="color: var(--success-color); margin-bottom: 0.5rem; font-size: 1.2rem;">✅ Now Available: CLI Wrapper Tool</h3>
<p style="color: var(--text-light); margin: 0;">Submit jobs, check status, and verify receipts with our new bash CLI wrapper. Supporting 13+ Ollama models with real-time blockchain verification!</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>
@@ -104,7 +107,7 @@
</div>
</div>
<div class="alert alert-info" style="margin: 1.5rem 0; padding: 1rem; background: rgba(59, 130, 246, 0.1); border-left: 4px solid var(--primary-color); border-radius: 8px;">
<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>
@@ -391,19 +394,19 @@ curl -X GET https://aitbc.bubuit.net/api/v1/jobs/JOB_ID \
<h3>Tutorials</h3>
<ul>
<li><a href="#">Getting Started with AI Inference</a></li>
<li><a href="#">Building a Chat Application</a></li>
<li><a href="#">Image Generation Guide</a></li>
<li><a href="#">Privacy-Preserving ML</a></li>
<li><a href="#">API Integration Best Practices</a></li>
<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="#">GitHub Repository</a></li>
<li><a href="#">Code Examples</a></li>
<li><a href="#">Sample Applications</a></li>
<li><a href="#">SDK Documentation</a></li>
<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>
@@ -449,28 +452,8 @@ curl -X GET https://aitbc.bubuit.net/api/v1/jobs/JOB_ID \
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script>
// Check for saved theme preference or default to dark mode
const currentTheme = localStorage.getItem('theme') || 'dark';
if (currentTheme === 'light') {
document.body.classList.add('light');
const btn = document.getElementById('themeToggle');
if (btn) btn.textContent = '🌙';
}
// Theme toggle functionality
const themeBtn = document.getElementById('themeToggle');
if (themeBtn) {
themeBtn.addEventListener('click', function() {
document.body.classList.toggle('light');
const isLight = document.body.classList.contains('light');
localStorage.setItem('theme', isLight ? 'light' : 'dark');
this.textContent = isLight ? '🌙' : '🌞';
});
}
</script></body>
</footer> <script src="js/theme.js"></script>
</body>
</html>

View File

@@ -1,495 +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 System Components - Documentation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 3rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.components-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.component-card {
background: var(--bg-white);
padding: 2rem;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
transition: transform 0.3s, box-shadow 0.3s;
}
.component-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.component-icon {
font-size: 2.5rem;
color: var(--primary-color);
margin-bottom: 1rem;
}
.component-card h3 {
margin-top: 0;
margin-bottom: 1rem;
color: var(--text-dark);
}
.component-status {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--success-color);
font-weight: 600;
margin: 1rem 0;
}
.component-status.live::before {
content: "●";
color: var(--success-color);
}
.component-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
margin-top: 1rem;
}
.component-link:hover {
color: var(--secondary-color);
}
.architecture-diagram {
background: var(--bg-light);
padding: 2rem;
border-radius: 12px;
margin: 2rem 0;
text-align: center;
font-family: monospace;
font-size: 0.9rem;
color: var(--text-dark);
overflow-x: auto;
}
.quick-links {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.quick-link {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 1rem;
background: var(--bg-light);
border-radius: 8px;
text-decoration: none;
color: var(--text-dark);
transition: all 0.3s;
}
.quick-link:hover {
background: var(--primary-color);
color: white;
transform: translateX(5px);
}
.quick-link i {
font-size: 1.2rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<span>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>AITBC System Components</h1>
<p>Overview of all components in the AITBC platform, their status, and documentation links.</p>
</div>
<!-- Core Components -->
<section class="content-section">
<h2>Core Components</h2>
<div class="components-grid">
<!-- 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">Live</div>
<a href="blockchain-node-md.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">Live</div>
<a href="coordinator-api-md.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">Live</div>
<a href="marketplace-web-md.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">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">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">Live</div>
<a href="trade-exchange-md.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">Live</div>
<a href="pool-hub.html" class="component-link">
Learn More <i class="fas fa-arrow-right"></i>
</a>
</div>
</div>
</section>
<!-- Architecture Overview -->
<section class="content-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="architecture-diagram">
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Clients │────▶│ Coordinator │────▶│ Blockchain │
│ │ │ API │ │ Node │
└─────────────┘ └──────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Wallet │ │ Pool Hub │ │ Miners │
│ Daemon │ │ │ │ │
└─────────────┘ └──────────────┘ └─────────────┘
</div>
<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>
</section>
<!-- Quick Links -->
<section class="content-section">
<h2>Quick Links</h2>
<div class="quick-links">
<a href="../Exchange/" class="quick-link">
<i class="fas fa-exchange-alt"></i>
<span>Trade Exchange</span>
</a>
<a href="../marketplace/" class="quick-link">
<i class="fas fa-store"></i>
<span>Marketplace</span>
</a>
<a href="../explorer/" class="quick-link">
<i class="fas fa-search"></i>
<span>Explorer</span>
</a>
<a href="../api/docs" class="quick-link">
<i class="fas fa-code"></i>
<span>API Docs</span>
</a>
</div>
</section>
<!-- Status Legend -->
<section class="content-section">
<h2>Status Legend</h2>
<ul>
<li><span class="component-status live">● Live</span> - Production ready and deployed</li>
<li><span class="component-status" style="color: var(--warning-color);">● Beta</span> - In testing, limited availability</li>
<li><span class="component-status" style="color: var(--text-light);">● Development</span> - Under active development</li>
</ul>
</section>
<!-- Deployment Information -->
<section class="content-section">
<h2>Deployment Information</h2>
<p>All components are containerized and can be deployed using Docker Compose:</p>
<pre style="background: #1f2937; color: #f9fafb; padding: 1.5rem; border-radius: 8px; overflow-x: auto;">
# Deploy all components
docker-compose up -d
# Check status
docker-compose ps
# View logs
docker-compose logs -f</pre>
</section>
<!-- Support -->
<section class="content-section">
<h2>Support</h2>
<p>For component-specific issues:</p>
<ul>
<li>Check individual documentation pages</li>
<li>Contact: <a href="mailto:aitbc@bubuit.net">aitbc@bubuit.net</a></li>
</ul>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -5,266 +5,26 @@
<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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-light);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
background: var(--bg-white);
padding: 3rem 0;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.doc-header h1 {
font-size: 2.5rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
color: var(--text-light);
font-size: 1.1rem;
}
.breadcrumb {
margin-bottom: 2rem;
}
.breadcrumb a {
color: var(--primary-color);
text-decoration: none;
}
.breadcrumb span {
color: var(--text-light);
margin: 0 0.5rem;
}
/* Components Grid */
.components-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
margin-bottom: 3rem;
}
.component-card {
background: var(--bg-white);
border-radius: 15px;
padding: 2rem;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
transition: all 0.3s;
position: relative;
overflow: hidden;
}
.component-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: var(--primary-color);
}
.component-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.component-icon {
width: 70px;
height: 70px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.8rem;
color: white;
margin-bottom: 1.5rem;
background: var(--primary-color);
}
.component-card h3 {
font-size: 1.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.component-card p {
color: var(--text-light);
margin-bottom: 1.5rem;
line-height: 1.8;
}
.component-status {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
margin-bottom: 1rem;
}
.component-status.live {
background: #10b98120;
color: var(--success-color);
}
.component-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
transition: all 0.3s;
}
.component-link:hover {
color: var(--secondary-color);
transform: translateX(5px);
}
/* Section */
.section {
background: var(--bg-white);
padding: 2.5rem;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
}
/* Back Button */
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
/* Responsive */
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
.components-grid {
grid-template-columns: 1fr;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html" class="active">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<!-- Main Content -->
@@ -285,8 +45,8 @@
<!-- Header -->
<div class="doc-header">
<h1>Platform Components</h1>
<p>Explore the 7 core components that make up the AITBC platform</p>
<h1>Architecture &amp; Components</h1>
<p>Explore the core components and system architecture of the AITBC platform</p>
</div>
<!-- Component Cards -->
@@ -408,16 +168,16 @@
<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 style="margin-top: 2rem;">
<div class="mt-4">
<h3>Infrastructure Layer</h3>
<ul style="margin-left: 2rem; color: var(--text-light);">
<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 style="margin-top: 1.5rem;">Application Layer</h3>
<ul style="margin-left: 2rem; color: var(--text-light);">
<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>
@@ -429,17 +189,17 @@
<!-- Quick Links -->
<section class="section">
<h2>Quick Links</h2>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem;">
<a href="../Exchange/" style="padding: 1rem; background: var(--bg-light); border-radius: 8px; text-decoration: none; color: var(--text-dark); transition: all 0.3s;" onmouseover="this.style.background='var(--primary-color)'; this.style.color='white';" onmouseout="this.style.background='var(--bg-light)'; this.style.color='var(--text-dark)';">
<div class="quicklink-grid">
<a href="../Exchange/">
<i class="fas fa-exchange-alt"></i> Trade Exchange
</a>
<a href="../marketplace/" style="padding: 1rem; background: var(--bg-light); border-radius: 8px; text-decoration: none; color: var(--text-dark); transition: all 0.3s;" onmouseover="this.style.background='var(--primary-color)'; this.style.color='white';" onmouseout="this.style.background='var(--bg-light)'; this.style.color='var(--text-dark)';">
<a href="../marketplace/">
<i class="fas fa-store"></i> Marketplace
</a>
<a href="../explorer/" style="padding: 1rem; background: var(--bg-light); border-radius: 8px; text-decoration: none; color: var(--text-dark); transition: all 0.3s;" onmouseover="this.style.background='var(--primary-color)'; this.style.color='white';" onmouseout="this.style.background='var(--bg-light)'; this.style.color='var(--text-dark)';">
<a href="../explorer/">
<i class="fas fa-search"></i> Explorer
</a>
<a href="../api/docs" style="padding: 1rem; background: var(--bg-light); border-radius: 8px; text-decoration: none; color: var(--text-dark); transition: all 0.3s;" onmouseover="this.style.background='var(--primary-color)'; this.style.color='white';" onmouseout="this.style.background='var(--bg-light)'; this.style.color='var(--text-dark)';">
<a href="../api/docs">
<i class="fas fa-code"></i> API Docs
</a>
</div>
@@ -450,5 +210,6 @@
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,272 +5,26 @@
<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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-light);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
background: var(--bg-white);
padding: 3rem 0;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.doc-header h1 {
font-size: 2.5rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
color: var(--text-light);
font-size: 1.1rem;
}
.breadcrumb {
margin-bottom: 2rem;
}
.breadcrumb a {
color: var(--primary-color);
text-decoration: none;
}
.breadcrumb span {
color: var(--text-light);
margin: 0 0.5rem;
}
/* Content Sections */
.content-section {
background: var(--bg-white);
padding: 2.5rem;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
display: flex;
align-items: center;
gap: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-light);
}
.content-section ul {
margin-left: 2rem;
margin-bottom: 1rem;
}
.content-section li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
.content-section code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-family: 'Courier New', monospace;
color: var(--primary-color);
}
.content-section pre {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
.content-section pre code {
background: none;
padding: 0;
color: var(--text-dark);
}
/* Feature Grid */
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
padding: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-light);
}
.feature-card h4 {
color: var(--primary-color);
margin-bottom: 0.5rem;
}
/* API Endpoints */
.api-endpoint {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
border-left: 4px solid var(--primary-color);
}
.api-endpoint code {
display: block;
font-weight: bold;
margin-bottom: 0.5rem;
}
/* Status Badge */
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
}
.status-badge.live {
background: #10b98120;
color: var(--success-color);
}
/* Back Button */
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
/* Responsive */
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
.content-section {
padding: 1.5rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html" class="active">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<!-- Main Content -->
@@ -280,7 +34,7 @@
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">Components</a>
<a href="components.html">Components</a>
<span></span>
<span>Coordinator API</span>
</div>
@@ -502,5 +256,6 @@ sudo journalctl -u aitbc-coordinator -f</code></pre>
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -150,6 +150,72 @@ nav {
color: var(--primary-color);
}
/* Site Header (unified) */
.site-header {
background: var(--bg-white);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.site-header .header-inner {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 0;
}
.site-header .brand {
display: flex;
align-items: center;
gap: 0.75rem;
text-decoration: none;
}
.site-header .brand i {
font-size: 2rem;
color: var(--primary-color);
}
.site-header .brand span {
font-size: 1.5rem;
font-weight: bold;
color: var(--text-dark);
}
.site-header .header-nav {
display: flex;
align-items: center;
gap: 1.5rem;
list-style: none;
}
.site-header .header-nav a {
color: var(--text-dark);
padding: 0.5rem 0.75rem;
border-radius: 0.5rem;
font-weight: 500;
text-decoration: none;
transition: color 0.3s;
}
.site-header .header-nav a:hover,
.site-header .header-nav a.active {
color: var(--primary-color);
}
@media (max-width: 768px) {
.site-header .header-nav {
gap: 0.5rem;
}
.site-header .header-nav a {
padding: 0.4rem 0.5rem;
font-size: 0.85rem;
}
}
/* Theme Toggle Button */
.theme-toggle {
background: none;
@@ -1235,4 +1301,570 @@ footer p {
flex-direction: column;
align-items: center;
}
.doc-grid {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
max-height: none;
}
.components-grid {
grid-template-columns: 1fr;
}
.api-grid {
grid-template-columns: 1fr;
}
}
/* ============================================
Component Pages: Layout
============================================ */
.breadcrumb {
margin-bottom: 2rem;
}
.breadcrumb a {
color: var(--primary-color);
text-decoration: none;
}
.breadcrumb span {
color: var(--text-light);
margin: 0 0.5rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
.doc-grid {
display: grid;
grid-template-columns: 280px 1fr;
gap: 2rem;
align-items: start;
}
.sidebar {
background: var(--bg-white);
border-radius: 10px;
padding: 1.5rem;
position: sticky;
top: 100px;
max-height: calc(100vh - 120px);
overflow-y: auto;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.sidebar h3 {
font-size: 1.1rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.sidebar ul {
list-style: none;
padding: 0;
}
.sidebar li {
margin-bottom: 0.25rem;
}
.sidebar a {
display: block;
padding: 0.4rem 0.75rem;
color: var(--text-light);
text-decoration: none;
border-radius: 6px;
font-size: 0.9rem;
transition: all 0.2s;
}
.sidebar a:hover,
.sidebar a.active {
background: rgba(59, 130, 246, 0.1);
color: var(--primary-color);
}
.sidebar .sub-item {
padding-left: 1.5rem;
font-size: 0.85rem;
}
.sidebar ul ul {
margin-top: 0.25rem;
}
/* ============================================
Component Pages: Cards
============================================ */
.components-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
margin-bottom: 3rem;
}
.component-card {
background: var(--bg-white);
border-radius: 12px;
padding: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
transition: all 0.3s ease;
border: 1px solid var(--border-color);
}
.component-card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
border-color: var(--primary-color);
}
.component-icon {
width: 60px;
height: 60px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: #fff;
background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
margin-bottom: 1.5rem;
}
.component-card h3 {
font-size: 1.4rem;
margin-bottom: 0.75rem;
color: var(--text-dark);
}
.component-card p {
color: var(--text-light);
margin-bottom: 1rem;
line-height: 1.7;
}
.component-status {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 600;
margin-bottom: 1rem;
}
.component-status.live {
background: rgba(16, 185, 129, 0.15);
color: var(--success-color);
}
.component-status.live i {
font-size: 0.5rem;
}
.component-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
font-weight: 600;
transition: all 0.3s;
}
.component-link:hover {
color: var(--secondary-color);
transform: translateX(5px);
}
/* ============================================
Component Pages: Section blocks
============================================ */
.section {
background: var(--bg-white);
padding: 2.5rem;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
}
.inline-code {
background: var(--bg-light);
padding: 0.2rem 0.5rem;
border-radius: 4px;
font-family: 'Fira Code', 'JetBrains Mono', monospace;
font-size: 0.9em;
color: var(--accent-color);
}
/* ============================================
API Pages
============================================ */
.api-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5rem;
margin: 1.5rem 0;
}
.api-card {
background: var(--bg-light);
border-radius: 10px;
padding: 1.5rem;
border-left: 4px solid var(--primary-color);
}
.api-card h4 {
color: var(--primary-color);
margin-bottom: 0.5rem;
}
.api-endpoint,
.endpoint {
background: var(--bg-light);
border-radius: 8px;
padding: 1.25rem;
margin: 1rem 0;
border: 1px solid var(--border-color);
}
.method {
display: inline-block;
padding: 0.2rem 0.6rem;
border-radius: 4px;
font-weight: 700;
font-size: 0.8rem;
color: #fff;
margin-right: 0.5rem;
}
.method.get, .get { background: var(--success-color); }
.method.post, .post { background: var(--primary-color); }
.method.delete, .delete { background: var(--danger-color); }
.http-request {
font-family: 'Fira Code', monospace;
font-size: 0.9rem;
}
.error-box {
background: rgba(239, 68, 68, 0.1);
border: 1px solid var(--danger-color);
border-radius: 8px;
padding: 1rem;
margin: 1rem 0;
}
.status-badge {
display: inline-block;
padding: 0.2rem 0.6rem;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 600;
}
/* ============================================
Tabs
============================================ */
.tabs {
margin: 1.5rem 0;
}
.tab-buttons {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
border-bottom: 2px solid var(--border-color);
padding-bottom: 0;
}
.tab-button {
padding: 0.75rem 1.5rem;
background: none;
border: none;
color: var(--text-light);
cursor: pointer;
font-weight: 600;
border-bottom: 2px solid transparent;
margin-bottom: -2px;
transition: all 0.3s;
}
.tab-button:hover,
.tab-button.active {
color: var(--primary-color);
border-bottom-color: var(--primary-color);
}
.tab-content {
display: none;
padding: 1rem 0;
}
.tab-content.active {
display: block;
}
/* ============================================
Code Groups
============================================ */
.code-group {
margin: 1rem 0;
border: 1px solid var(--border-color);
border-radius: 5px;
overflow: hidden;
}
.code-group-header {
background: var(--bg-light);
padding: 0.5rem 1rem;
font-weight: 600;
color: var(--text-dark);
}
.code-group-content {
padding: 0;
}
/* ============================================
Mermaid Diagrams
============================================ */
.mermaid {
text-align: center;
margin: 2rem 0;
}
/* ============================================
Flow Diagram
============================================ */
.flow-diagram {
background: var(--bg-white);
border-radius: 10px;
padding: 2rem;
margin: 2rem 0;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
overflow-x: auto;
}
/* ============================================
Misc: Timeline, Security, CTA, Browser
============================================ */
.timeline {
position: relative;
padding-left: 2rem;
margin: 1.5rem 0;
}
.timeline::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: var(--primary-color);
}
.security-icon {
font-size: 2rem;
color: var(--primary-color);
margin-bottom: 1rem;
}
.cta-button {
display: inline-block;
padding: 1rem 2rem;
background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
color: #fff;
border-radius: 50px;
font-weight: 600;
text-decoration: none;
transition: all 0.3s;
}
.cta-button:hover {
transform: translateY(-2px);
box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
color: #fff;
}
.hero-gradient {
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
border-radius: 15px;
padding: 2rem;
margin: 2rem 0;
}
.browser-button, .chrome-button, .firefox-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
border-radius: 8px;
font-weight: 600;
text-decoration: none;
transition: all 0.3s;
}
.chrome-button {
background: #4285f4;
color: #fff;
}
.firefox-button {
background: #ff7139;
color: #fff;
}
/* ============================================
Announcement Banners
============================================ */
.announce-banner {
margin-top: 2rem;
padding: 1.5rem;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
border-radius: 15px;
border: 2px solid rgba(59, 130, 246, 0.2);
}
.announce-banner.green {
border-color: rgba(16, 185, 129, 0.2);
}
.announce-banner h3 {
color: var(--success-color);
margin-bottom: 0.5rem;
font-size: 1.2rem;
}
.announce-banner p {
color: var(--text-light);
margin: 0;
}
/* ============================================
Markdown Source Links
============================================ */
.source-links {
margin-top: 1rem;
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.source-links a {
color: var(--primary-color);
font-size: 0.9rem;
text-decoration: none;
}
.source-links a:hover {
text-decoration: underline;
}
/* ============================================
Search Results
============================================ */
.search-results {
max-width: 600px;
margin: -3rem auto 2rem;
background: var(--bg-white);
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
overflow: hidden;
}
.search-results a {
display: block;
padding: 0.75rem 1rem;
border-bottom: 1px solid var(--border-color);
color: var(--text-dark);
text-decoration: none;
}
.search-results a:hover {
background: rgba(59, 130, 246, 0.05);
}
.search-results small {
color: var(--text-light);
}
.search-results .no-results {
padding: 1rem;
color: var(--text-light);
}
/* ============================================
Inline Code Blocks (pre/code in content)
============================================ */
.code-inline {
background: #1f2937;
color: #f9fafb;
padding: 1rem;
border-radius: 8px;
overflow-x: auto;
font-family: 'Fira Code', 'JetBrains Mono', monospace;
font-size: 0.9rem;
}
/* ============================================
Quick-link Grid (components page)
============================================ */
.quicklink-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin-top: 1.5rem;
}
.quicklink-grid a {
padding: 1rem;
background: var(--bg-light);
border-radius: 8px;
text-decoration: none;
color: var(--text-dark);
transition: all 0.3s;
}
.quicklink-grid a:hover {
background: var(--primary-color);
color: #fff;
}

View File

@@ -1,633 +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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.tech-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.tech-item {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
text-align: center;
font-weight: 600;
}
.tech-icon {
font-size: 2rem;
color: var(--primary-color);
margin-bottom: 0.5rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.feature-card h4 {
margin-top: 0;
color: var(--primary-color);
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.inline-code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.9rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
.alert {
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid var(--primary-color);
color: #1e40af;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid var(--success-color);
color: #065f46;
}
.bounty-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.bounty-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
border-top: 4px solid var(--warning-color);
}
.bounty-amount {
font-size: 1.5rem;
font-weight: bold;
color: var(--warning-color);
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<span>Developer Documentation</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="fa fa-code"></i> Developer Documentation</h1>
<p>Build on AITBC and contribute to the protocol. Designed for developers wanting to extend the platform or integrate with it.</p>
</div>
<!-- Technology Stack -->
<section class="content-section">
<h2>Technology Stack</h2>
<p>AITBC is built with modern technologies to ensure performance, security, and developer productivity.</p>
<div class="tech-grid">
<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-rust"></i>
</div>
<div>Rust</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="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="alert alert-info">
<strong>Prerequisites:</strong> Python 3.9+, Node.js 18+, Docker, Git
</div>
<pre><code># Fork & Clone
git clone https://github.com/YOUR_USERNAME/AITBC.git
cd aitbc
# Set up Python environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Set up frontend
cd website
npm install
npm run dev</code></pre>
<h3>Project Structure</h3>
<pre><code>aitbc/
├── blockchain/ # Blockchain node (Rust)
├── coordinator/ # Coordinator API (Python/FastAPI)
├── miner/ # Miner daemon (Python)
├── wallet/ # Wallet daemon (Python)
├── website/ # Frontend applications
│ ├── marketplace/ # Marketplace UI (React/TypeScript)
│ ├── explorer/ # Blockchain explorer
│ └── exchange/ # Trade exchange
├── docker-compose.yml # Development environment
└── docs/ # Documentation</code></pre>
</section>
<!-- Contributing -->
<section class="content-section">
<h2>Contributing</h2>
<p>We welcome contributions from the community! Here's how you can help:</p>
<h3>Contribution Areas</h3>
<div class="feature-grid">
<div class="feature-card">
<h4><i class="fas fa-bug"></i> Bug Fixes</h4>
<p>Find and fix bugs in any component</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-plus"></i> New Features</h4>
<p>Implement new functionality</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-book"></i> Documentation</h4>
<p>Improve documentation and examples</p>
</div>
<div class="feature-card">
<h4><i class="fas fa-vial"></i> Testing</h4>
<p>Write tests and improve coverage</p>
</div>
</div>
<h3>Pull Request Process</h3>
<ol>
<li>Create an issue describing your proposed change</li>
<li>Fork the repository and create a feature branch</li>
<li>Make your changes with proper tests</li>
<li>Ensure all tests pass and code follows style guidelines</li>
<li>Submit a pull request with detailed description</li>
<li>Respond to code review feedback</li>
</ol>
</section>
<!-- Bounty Program -->
<section class="content-section">
<h2>Bounty Program</h2>
<p>Earn AITBC tokens by contributing to the platform through our bounty program.</p>
<div class="bounty-grid">
<div class="bounty-card">
<h4>Critical Bug</h4>
<div class="bounty-amount">1000-5000 AITBC</div>
<p>Security vulnerabilities or critical issues</p>
</div>
<div class="bounty-card">
<h4>Feature Implementation</h4>
<div class="bounty-amount">500-2000 AITBC</div>
<p>New features as outlined in issues</p>
</div>
<div class="bounty-card">
<h4>Documentation</h4>
<div class="bounty-amount">100-500 AITBC</div>
<p>Comprehensive guides and tutorials</p>
</div>
<div class="bounty-card">
<h4>Performance</h4>
<div class="bounty-amount">300-1500 AITBC</div>
<p>Optimizations and improvements</p>
</div>
</div>
<h3>How to Participate</h3>
<ul>
<li>Check the <a href="full-documentation-md.html">Issues page</a> for bounty-labeled items</li>
<li>Claim an issue by commenting on it</li>
<li>Complete the work and submit a PR</li>
<li>Receive bounty upon merge</li>
</ul>
</section>
<!-- APIs -->
<section class="content-section">
<h2>APIs & SDKs</h2>
<p>Integrate AITBC into your applications using our APIs and SDKs.</p>
<h3>REST APIs</h3>
<ul>
<li><strong>Coordinator API</strong>: Job submission and management</li>
<li><strong>Blockchain RPC</strong>: Blockchain interaction</li>
<li><strong>Wallet API</strong>: Wallet operations</li>
<li><strong>Pool Hub API</strong>: Miner coordination</li>
</ul>
<h3>SDKs</h3>
<ul>
<li><strong>Python SDK</strong>: <code>pip install aitbc-client</code></li>
<li><strong>JavaScript SDK</strong>: <code>npm install @aitbc/client</code></li>
<li><strong>Rust Crate</strong>: <code>cargo add aitbc-rust</code></li>
<li><strong>Go Client</strong>: <code>go get github.com/aitbc/go-client</code></li>
</ul>
<h3>Example: Submitting a Job</h3>
<pre><code>from aitbc import AITBCClient
client = AITBCClient(api_key="your-key")
# Submit inference job
job = client.submit_job(
type="inference",
model="llama3.2",
prompt="Explain AI in simple terms",
max_tokens=500
)
# Wait for result
result = client.wait_for_job(job.id)
print(result.output)</code></pre>
</section>
<!-- Example: Adding an API Endpoint -->
<section class="content-section">
<h2>Example: Adding an API Endpoint</h2>
<p>Here's how to add a new endpoint to the Coordinator API:</p>
<h3>1. Define the Endpoint</h3>
<pre><code># coordinator/api/endpoints/jobs.py
from fastapi import APIRouter, Depends
from ..dependencies import get_current_user
from ..schemas import JobResponse
router = APIRouter(prefix="/jobs", tags=["jobs"])
@router.get("/stats", response_model=JobStats)
async def get_job_stats(
current_user: User = Depends(get_current_user)
):
"""Get job statistics for current user"""
stats = await job_service.get_user_stats(current_user.id)
return stats</code></pre>
<h3>2. Add Tests</h3>
<pre><code># tests/api/test_jobs.py
async def test_get_job_stats(client, auth_headers):
response = await client.get(
"/api/jobs/stats",
headers=auth_headers
)
assert response.status_code == 200
assert "total_jobs" in response.json()</code></pre>
<h3>3. Update Documentation</h3>
<pre><code># docs/api/jobs.md
## Job Statistics
Get statistics about your submitted jobs.
### Request
```
GET /api/jobs/stats
Authorization: Bearer YOUR_TOKEN
```
### Response
```json
{
"total_jobs": 42,
"completed_jobs": 38,
"failed_jobs": 2,
"pending_jobs": 2
}
```</code></pre>
</section>
<!-- Development Tools -->
<section class="content-section">
<h2>Development Tools</h2>
<h3>Local Development</h3>
<pre><code># Start all services
docker-compose up -d
# View logs
docker-compose logs -f coordinator
# Run tests
pytest tests/
# Lint code
flake8 coordinator/
black coordinator/</code></pre>
<h3>Debugging</h3>
<ul>
<li>Use VS Code with Python and Rust extensions</li>
<li>Enable debug mode: <code>DEBUG=true python -m coordinator.main</code></li>
<li>Use the built-in admin dashboard at <code>/admin</code></li>
</ul>
</section>
<!-- Community -->
<section class="content-section">
<h2>Community & Support</h2>
<h3>Get in Touch</h3>
<ul>
<li><strong>Discord</strong>: <a href="#">#dev channel</a></li>
<li><strong>GitHub</strong>: <a href="full-documentation-md.html">Create issues</a></li>
<li><strong>Email</strong>: <a href="mailto:aitbc@bubuit.net">aitbc@bubuit.net</a></li>
</ul>
<h3>Developer Events</h3>
<ul>
<li>Weekly dev standups - Tuesdays 14:00 UTC</li>
<li>Monthly hackathons - First weekend of each month</li>
<li>Quarterly roadmap reviews</li>
</ul>
</section>
<!-- Resources -->
<section class="content-section">
<h2>Additional Resources</h2>
<ul>
<li><a href="blockchain-node-md.html">Blockchain Node Documentation</a></li>
<li><a href="coordinator-api-md.html">Coordinator API Reference</a></li>
<li><a href="full-documentation-md.html">Full Technical Documentation</a></li>
<li><a href="full-documentation-md.html">Developer Wiki</a></li>
<li><a href="full-documentation-md.html">Release Notes</a></li>
</ul>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -9,19 +9,19 @@
</head>
<body>
<!-- Header -->
<header class="text-white shadow-lg" style="background: var(--bg-white); position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
<div class="container" style="max-width: 1200px; margin: 0 auto; padding: 0 20px;">
<div style="display: flex; align-items: center; justify-content: space-between; padding: 1rem 0;">
<div style="display: flex; align-items: center; gap: 0.75rem;">
<i class="fas fa-cube" style="font-size: 2rem; color: var(--primary-color);"></i>
<h1 style="font-size: 1.5rem; font-weight: bold; margin: 0; color: var(--text-dark);">AITBC</h1>
</div>
<nav style="display: flex; align-items: center; gap: 1.5rem;">
<a href="/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Home</a>
<a href="/explorer/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Explorer</a>
<a href="/Exchange/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Exchange</a>
<a href="/docs/index.html" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Documentation</a>
<button id="themeToggle" class="theme-toggle" style="background: rgba(59, 130, 246, 0.1) !important; color: var(--primary-color) !important; border: 2px solid var(--primary-color); padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; font-size: 1rem;">🌞</button>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
@@ -34,6 +34,10 @@
<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 -->
@@ -364,34 +368,34 @@ make benchmark</div>
<h3>Documentation</h3>
<ul>
<li><a href="full-documentation.html">Full API Documentation</a></li>
<li><a href="#">Architecture Guide</a></li>
<li><a href="#">Protocol Specification</a></li>
<li><a href="#">Security Best Practices</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="#">Python SDK</a></li>
<li><a href="#">JavaScript SDK</a></li>
<li><a href="#">Go SDK</a></li>
<li><a href="#">Rust SDK</a></li>
<li><a href="#">CLI Tools</a></li>
<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="#">Docker Compose Setup</a></li>
<li><a href="#">Local Testnet</a></li>
<li><a href="#">Faucet for Test Tokens</a></li>
<li><a href="#">Block Explorer</a></li>
<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="#">Video Tutorials</a></li>
<li><a href="#">Workshop Materials</a></li>
<li><a href="#">Blog Posts</a></li>
<li><a href="#">Research Papers</a></li>
<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>
@@ -510,28 +514,8 @@ def test_create_feature_invalid():
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script>
// Check for saved theme preference or default to dark mode
const currentTheme = localStorage.getItem('theme') || 'dark';
if (currentTheme === 'light') {
document.body.classList.add('light');
const btn = document.getElementById('themeToggle');
if (btn) btn.textContent = '🌙';
}
// Theme toggle functionality
const themeBtn = document.getElementById('themeToggle');
if (themeBtn) {
themeBtn.addEventListener('click', function() {
document.body.classList.toggle('light');
const isLight = document.body.classList.contains('light');
localStorage.setItem('theme', isLight ? 'light' : 'dark');
this.textContent = isLight ? '🌙' : '🌞';
});
}
</script></body>
</footer> <script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,230 +5,26 @@
<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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: #10b98120;
color: var(--success-color);
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
margin-top: 1rem;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.feature-card h4 {
margin-top: 0;
color: var(--primary-color);
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<!-- Header -->
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<main>
@@ -237,7 +33,7 @@
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">Components</a>
<a href="components.html">Components</a>
<span></span>
<span>Explorer Web</span>
</div>
@@ -415,8 +211,9 @@ npm test</code></pre>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,278 +5,26 @@
<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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
font-size: 0.9rem;
}
code {
font-family: 'Courier New', Courier, monospace;
}
pre code {
background: none;
padding: 0;
}
.inline-code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.9rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
.flow-diagram {
background: var(--bg-light);
padding: 2rem;
border-radius: 8px;
margin: 2rem 0;
overflow-x: auto;
font-family: monospace;
font-size: 0.9rem;
}
.http-request {
background: #e0f2fe;
border-left: 4px solid var(--primary-color);
padding: 1rem;
margin: 1rem 0;
border-radius: 4px;
}
.http-request h4 {
margin-top: 0;
color: var(--primary-color);
}
.timeline {
background: var(--bg-light);
padding: 1.5rem;
border-radius: 8px;
margin: 2rem 0;
font-family: monospace;
white-space: pre;
line-height: 1.4;
}
table {
width: 100%;
border-collapse: collapse;
margin: 2rem 0;
}
th, td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
th {
background: var(--bg-light);
font-weight: 600;
}
.error-box {
background: #fef2f2;
border: 1px solid #fecaca;
border-radius: 8px;
padding: 1rem;
margin: 1rem 0;
}
.error-box h4 {
color: var(--danger-color);
margin-top: 0;
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<!-- Header -->
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<main>
@@ -724,8 +472,8 @@ Cost: 0.25 AITBC</code></pre>
<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="miner-documentation-md.html">Miner Documentation</a> - Guide to setting up and running a miner</li>
<li><a href="client-documentation-md.html">Client Documentation</a> - Using the CLI and Python client</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>
@@ -746,8 +494,9 @@ Cost: 0.25 AITBC</code></pre>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -1,643 +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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.toc {
background: var(--bg-light);
padding: 2rem;
border-radius: 8px;
margin-bottom: 3rem;
}
.toc h3 {
margin-top: 0;
color: var(--text-dark);
}
.toc ul {
list-style: none;
padding-left: 0;
}
.toc li {
margin-bottom: 0.5rem;
}
.toc a {
color: var(--primary-color);
text-decoration: none;
}
.toc a:hover {
text-decoration: underline;
}
.component-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
margin: 2rem 0;
}
.component-card {
background: var(--bg-white);
padding: 2rem;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.component-card h3 {
margin-top: 0;
color: var(--primary-color);
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.inline-code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.9rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
.alert {
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid var(--primary-color);
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid var(--warning-color);
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid var(--success-color);
color: #065f46;
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<span>Full Documentation</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-file-alt"></i> AITBC Full Documentation</h1>
<p>Complete technical documentation for the AI Training & Blockchain Computing platform</p>
</div>
<!-- Table of Contents -->
<div class="toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#introduction">1. Introduction</a></li>
<li><a href="#architecture">2. Architecture</a></li>
<li><a href="#installation">3. Installation</a></li>
<li><a href="#apis">4. APIs</a></li>
<li><a href="#components">5. Components</a></li>
<li><a href="#guides">6. Guides</a></li>
<li><a href="#advanced">7. Advanced Topics</a></li>
<li><a href="#troubleshooting">8. Troubleshooting</a></li>
<li><a href="#security">9. Security</a></li>
</ul>
</div>
<!-- Introduction -->
<section class="content-section" id="introduction">
<h2>1. Introduction</h2>
<p>AITBC (AI Training & Blockchain Computing) is a decentralized platform that combines blockchain technology with AI/ML computing resources. It enables privacy-preserving AI computations with verifiable results on the blockchain.</p>
<h3>Key Features</h3>
<ul>
<li>Privacy-preserving AI computations with zero-knowledge proofs</li>
<li>Decentralized GPU marketplace for AI/ML workloads</li>
<li>Blockchain-based verification and receipt system</li>
<li>Hybrid Proof-of-Authority/Proof-of-Stake consensus</li>
<li>Native token (AITBC) for payments and staking</li>
</ul>
<h3>Use Cases</h3>
<ul>
<li>Private AI inference without data exposure</li>
<li>Verifiable ML model training</li>
<li>Decentralized GPU resource sharing</li>
<li>Cryptographic proof of computation</li>
</ul>
</section>
<!-- Architecture -->
<section class="content-section" id="architecture">
<h2>2. Architecture</h2>
<p>AITBC consists of multiple components working together to provide a complete AI blockchain computing solution.</p>
<h3>System Architecture</h3>
<pre><code>┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Clients │────▶│ Coordinator │────▶│ Blockchain │
│ │ │ API │ │ Node │
└─────────────┘ └──────────────┘ └─────────────┘
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Wallet │ │ Pool Hub │ │ Miners │
│ Daemon │ │ │ │ │
└─────────────┘ └──────────────┘ └─────────────┘</code></pre>
<h3>Core Components</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>
<li><strong>Miner Daemon</strong>: GPU compute provider</li>
<li><strong>Pool Hub</strong>: Miner coordination and matching</li>
<li><strong>Marketplace Web</strong>: GPU compute marketplace UI</li>
<li><strong>Trade Exchange</strong>: Token trading platform</li>
</ul>
</section>
<!-- Installation -->
<section class="content-section" id="installation">
<h2>3. Installation</h2>
<h3>Prerequisites</h3>
<ul>
<li>Docker & Docker Compose</li>
<li>Python 3.9+ (for development)</li>
<li>Node.js 18+ (for frontend development)</li>
<li>Rust 1.70+ (for blockchain node)</li>
</ul>
<h3>Quick Start with Docker</h3>
<pre><code># Clone the repository
git clone https://github.com/oib/AITBC.git
cd aitbc
# Start all services
docker-compose up -d
# Check status
docker-compose ps</code></pre>
<h3>Development Setup</h3>
<pre><code># Backend services
cd coordinator
pip install -r requirements.txt
python -m coordinator.main
# Frontend
cd website/marketplace
npm install
npm run dev
# Blockchain node
cd blockchain
cargo run</code></pre>
</section>
<!-- APIs -->
<section class="content-section" id="apis">
<h2>4. APIs</h2>
<h3>Coordinator API</h3>
<p>RESTful API for job submission and management</p>
<pre><code># Submit a job
POST /api/v1/jobs
{
"type": "inference",
"model": "llama3.2",
"input": {
"prompt": "Hello, AITBC!"
}
}
# Get job status
GET /api/v1/jobs/{job_id}
# Get job result
GET /api/v1/jobs/{job_id}/result</code></pre>
<h3>Blockchain RPC</h3>
<p>JSON-RPC API for blockchain interaction</p>
<pre><code># Get latest block
curl -X POST http://localhost:9080 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"get_head","params":[],"id":1}'
# Submit transaction
curl -X POST http://localhost:9080 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"send_tx","params":[tx],"id":1}'</code></pre>
<h3>WebSocket API</h3>
<p>Real-time updates for blocks, transactions, and jobs</p>
<pre><code># Connect to WebSocket
ws://localhost:9081/ws
# Subscribe to events
{
"method": "subscribe",
"params": ["new_blocks", "job_updates"]
}</code></pre>
</section>
<!-- Components -->
<section class="content-section" id="components">
<h2>5. Components</h2>
<div class="component-grid">
<div class="component-card">
<h3>Blockchain Node</h3>
<p>PoA/PoS consensus blockchain with REST/WebSocket RPC, real-time gossip layer, and comprehensive observability.</p>
<a href="blockchain-node-md.html" style="color: var(--primary-color);">Learn more →</a>
</div>
<div class="component-card">
<h3>Coordinator API</h3>
<p>FastAPI service for job submission, miner registration, and receipt management with SQLite persistence.</p>
<a href="coordinator-api-md.html" style="color: var(--primary-color);">Learn more →</a>
</div>
<div class="component-card">
<h3>Marketplace Web</h3>
<p>Vite/TypeScript marketplace with offer/bid functionality, stats dashboard, and mock/live data toggle.</p>
<a href="marketplace-web-md.html" style="color: var(--primary-color);">Learn more →</a>
</div>
<div class="component-card">
<h3>Wallet Daemon</h3>
<p>Encrypted keystore with Argon2id + XChaCha20-Poly1305, REST/JSON-RPC APIs, and receipt verification.</p>
<a href="wallet-documentation-md.html" style="color: var(--primary-color);">Learn more →</a>
</div>
<div class="component-card">
<h3>Trade Exchange</h3>
<p>Bitcoin-to-AITBC exchange with QR payments, user management, and real-time trading capabilities.</p>
<a href="trade-exchange-md.html" style="color: var(--primary-color);">Learn more →</a>
</div>
<div class="component-card">
<h3>Pool Hub</h3>
<p>Miner registry with scoring engine, Redis/PostgreSQL backing, and comprehensive metrics.</p>
<a href="pool-hub.html" style="color: var(--primary-color);">Learn more →</a>
</div>
</div>
</section>
<!-- Guides -->
<section class="content-section" id="guides">
<h2>6. Guides</h2>
<h3>Client Guide</h3>
<p>Learn how to use AITBC as a client:</p>
<ul>
<li><a href="client-documentation-md.html">Client Documentation</a></li>
<li>Job submission workflow</li>
<li>Privacy features</li>
<li>Result verification</li>
</ul>
<h3>Miner Guide</h3>
<p>Learn how to become a miner:</p>
<ul>
<li><a href="miner-documentation-md.html">Miner Documentation</a></li>
<li>Hardware requirements</li>
<li>Setup and configuration</li>
<li>Earning rewards</li>
</ul>
<h3>Developer Guide</h3>
<p>Learn how to build on AITBC:</p>
<ul>
<li><a href="developer-documentation-md.html">Developer Documentation</a></li>
<li>API integration</li>
<li>SDK usage</li>
<li>Contributing</li>
</ul>
</section>
<!-- Advanced Topics -->
<section class="content-section" id="advanced">
<h2>7. Advanced Topics</h2>
<h3>Zero-Knowledge Proofs</h3>
<p>AITBC uses zk-SNARKs to provide privacy-preserving computations:</p>
<ul>
<li>Input privacy: Your data never leaves your device</li>
<li>Computation verification: Proofs are verified on-chain</li>
<li>Efficient verification: Sub-second proof verification</li>
</ul>
<h3>Consensus Mechanism</h3>
<p>Hybrid PoA/PoS consensus provides:</p>
<ul>
<li>Fast finality: Blocks confirmed in seconds</li>
<li>Energy efficiency: No proof-of-work mining</li>
<li>Security: Multi-layer validation</li>
</ul>
<h3>Tokenomics</h3>
<p>AITBC token utilities:</p>
<ul>
<li>Payment for AI computations</li>
<li>Staking for network security</li>
<li>Governance voting rights</li>
<li>Reward distribution</li>
</ul>
</section>
<!-- Troubleshooting -->
<section class="content-section" id="troubleshooting">
<h2>8. Troubleshooting</h2>
<h3>Common Issues</h3>
<div class="alert alert-warning">
<strong>Node not syncing?</strong> Check peer connections and network connectivity.
</div>
<ol>
<li><strong>Connection Issues</strong>
<ul>
<li>Verify all services are running: <code>docker-compose ps</code></li>
<li>Check logs: <code>docker-compose logs [service]</code></li>
<li>Ensure ports are not blocked by firewall</li>
</ul>
</li>
<li><strong>Job Submission Fails</strong>
<ul>
<li>Check API key is valid</li>
<li>Verify model is available</li>
<li>Check wallet balance</li>
</ul>
</li>
<li><strong>GPU Mining Issues</strong>
<ul>
<li>Install latest NVIDIA drivers</li>
<li>Verify CUDA installation</li>
<li>Check GPU memory availability</li>
</ul>
</li>
</ol>
</section>
<!-- Security -->
<section class="content-section" id="security">
<h2>9. Security</h2>
<h3>Security Features</h3>
<ul>
<li>End-to-end encryption for all data</li>
<li>Zero-knowledge proofs for privacy</li>
<li>Multi-signature wallet support</li>
<li>Hardware wallet integration</li>
<li>Audited smart contracts</li>
</ul>
<h3>Best Practices</h3>
<ul>
<li>Keep private keys secure</li>
<li>Use hardware wallets for large amounts</li>
<li>Enable two-factor authentication</li>
<li>Regular security updates</li>
</ul>
<h3>Reporting Issues</h3>
<div class="alert alert-info">
For security issues, please email: <a href="mailto:aitbc@bubuit.net">aitbc@bubuit.net</a>
</div>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -5,466 +5,26 @@
<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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Dark mode (default) */
:root {
--primary-color: #3b82f6;
--secondary-color: #2563eb;
--accent-color: #60a5fa;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #f3f4f6;
--text-light: #9ca3af;
--bg-light: #111827;
--bg-white: #1f2937;
--border-color: #374151;
--code-bg: #0d1117;
--code-text: #e5e7eb;
}
/* Light mode */
body.light {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
--code-bg: #1f2937;
--code-text: #e5e7eb;
}
/* Theme toggle button */
.theme-toggle {
background: none;
border: 2px solid var(--border-color);
border-radius: 0.5rem;
padding: 0.5rem 0.75rem;
cursor: pointer;
font-size: 1.1rem;
color: var(--text-dark);
transition: all 0.3s ease;
}
.theme-toggle:hover {
background: var(--bg-white);
border-color: var(--primary-color);
transform: scale(1.05);
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-light);
transition: background 0.3s ease, color 0.3s ease;
}
.container {
max-width: 1400px;
margin: 0 auto;
padding: 0 20px;
}
/* Header with gradient border */
header {
background: var(--bg-white);
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
border-bottom: 3px solid transparent;
background-image: linear-gradient(var(--bg-white), var(--bg-white)),
linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--success-color));
background-origin: border-box;
background-clip: padding-box, border-box;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
text-decoration: none;
transition: transform 0.3s ease;
}
.logo:hover {
transform: scale(1.05);
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
align-items: center;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: all 0.3s ease;
padding: 0.5rem 0;
position: relative;
}
.nav-links a::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
width: 100%;
}
.nav-links a:hover {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
text-align: center;
margin-bottom: 3rem;
}
.doc-header h1 {
font-size: 3rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
}
/* Documentation Grid */
.doc-grid {
display: grid;
grid-template-columns: 300px 1fr;
gap: 2rem;
}
/* Sidebar */
.sidebar {
background: var(--bg-light);
border-radius: 10px;
padding: 1.5rem;
height: fit-content;
position: sticky;
top: 100px;
max-height: calc(100vh - 120px);
overflow-y: auto;
}
.sidebar h3 {
font-size: 1.2rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.sidebar ul {
list-style: none;
}
.sidebar li {
margin-bottom: 0.3rem;
}
.sidebar a {
color: var(--text-light);
text-decoration: none;
display: block;
padding: 0.5rem;
border-radius: 5px;
transition: all 0.3s;
font-size: 0.9rem;
}
.sidebar a:hover,
.sidebar a.active {
background: var(--bg-white);
color: var(--primary-color);
}
.sidebar .sub-item {
padding-left: 1.5rem;
font-size: 0.85rem;
}
/* Content */
.content {
background: var(--bg-white);
border-radius: 10px;
padding: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
border-bottom: 3px solid var(--primary-color);
padding-bottom: 0.5rem;
}
.content h2 {
font-size: 2rem;
margin: 2.5rem 0 1rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content h3 {
font-size: 1.5rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--primary-color);
}
.content p {
margin-bottom: 1rem;
color: var(--text-light);
text-align: justify;
}
.content ul,
.content ol {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
.content code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
color: var(--primary-color);
}
.content pre {
background: var(--code-bg);
color: var(--code-text);
padding: 1.5rem;
border-radius: 5px;
overflow-x: auto;
margin: 1rem 0;
font-family: 'Fira Code', 'Courier New', monospace;
font-size: 0.9rem;
line-height: 1.5;
}
.content pre code {
background: none;
padding: 0;
color: inherit;
}
.content blockquote {
border-left: 4px solid var(--primary-color);
padding-left: 1rem;
margin: 1rem 0;
color: var(--text-light);
font-style: italic;
background: var(--bg-light);
padding: 1rem;
border-radius: 0 5px 5px 0;
}
.content table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
.content th,
.content td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.content th {
background: var(--bg-light);
font-weight: 600;
color: var(--text-dark);
}
/* Alert Boxes */
.alert {
padding: 1rem;
border-radius: 5px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid #3b82f6;
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid #f59e0b;
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid #10b981;
color: #065f46;
}
.alert-danger {
background: #fee2e2;
border-left: 4px solid #ef4444;
color: #991b1b;
}
/* Tabs */
.tabs {
margin: 2rem 0;
}
.tab-buttons {
display: flex;
gap: 0.5rem;
border-bottom: 2px solid var(--border-color);
}
.tab-button {
padding: 0.75rem 1.5rem;
background: none;
border: none;
color: var(--text-light);
cursor: pointer;
border-bottom: 2px solid transparent;
transition: all 0.3s;
}
.tab-button.active {
color: var(--primary-color);
border-bottom-color: var(--primary-color);
}
.tab-content {
display: none;
padding: 1rem 0;
}
.tab-content.active {
display: block;
}
/* Mermaid Diagrams */
.mermaid {
text-align: center;
margin: 2rem 0;
}
/* Code Groups */
.code-group {
margin: 1rem 0;
border: 1px solid var(--border-color);
border-radius: 5px;
overflow: hidden;
}
.code-group-header {
background: var(--bg-light);
padding: 0.5rem 1rem;
font-weight: 600;
color: var(--text-dark);
}
.code-group-content {
padding: 0;
}
/* Footer */
footer {
background: var(--text-dark);
color: white;
padding: 40px 0;
text-align: center;
margin-top: 40px;
}
/* Responsive */
@media (max-width: 768px) {
.doc-grid {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
max-height: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="full-documentation.html" class="active">Full Documentation</a></li>
<li><a href="#contact">Contact</a></li>
<li><button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button></li>
</ul>
</nav>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<!-- Main Content -->
@@ -525,6 +85,19 @@
</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 -->
@@ -1085,24 +658,7 @@ gosec ./...</code></pre>
<script src="/js/mermaid.min.js"></script>
<script src="/js/mermaid-init.js"></script>
<script>
// Theme toggle functionality
const themeToggle = document.getElementById('theme-toggle');
if (themeToggle) {
themeToggle.addEventListener('click', () => {
document.body.classList.toggle('light');
const isLight = document.body.classList.contains('light');
themeToggle.innerHTML = isLight ? '<i class="fas fa-moon"></i>' : '<i class="fas fa-sun"></i>';
localStorage.setItem('theme', isLight ? 'light' : 'dark');
});
// Load saved theme
const savedTheme = localStorage.getItem('theme');
if (savedTheme === 'light') {
document.body.classList.add('light');
themeToggle.innerHTML = '<i class="fas fa-moon"></i>';
}
}
</script>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,23 +5,23 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/docs.css">
<title>Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<!-- Header -->
<header class="text-white shadow-lg" style="background: var(--bg-white); position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
<div class="container" style="max-width: 1200px; margin: 0 auto; padding: 0 20px;">
<div style="display: flex; align-items: center; justify-content: space-between; padding: 1rem 0;">
<div style="display: flex; align-items: center; gap: 0.75rem;">
<i class="fa fa-cube" style="font-size: 2rem; color: var(--primary-color);"></i>
<h1 style="font-size: 1.5rem; font-weight: bold; margin: 0; color: var(--text-dark);">AITBC</h1>
</div>
<nav style="display: flex; align-items: center; gap: 1.5rem;">
<a href="/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Home</a>
<a href="/explorer/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Explorer</a>
<a href="/Exchange/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Exchange</a>
<a href="/docs/index.html" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Documentation</a>
<button id="themeToggle" class="theme-toggle" style="background: rgba(59, 130, 246, 0.1) !important; color: var(--primary-color) !important; border: 2px solid var(--primary-color); padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; font-size: 1rem;">🌞</button>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
@@ -33,16 +33,16 @@
<div class="doc-header">
<h1>Documentation</h1>
<p>Choose your reader level to access tailored documentation for your needs</p>
<div style="margin-top: 2rem; padding: 1.5rem; background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%); border-radius: 15px; border: 2px solid rgba(59, 130, 246, 0.2);">
<h3 style="color: var(--success-color); margin-bottom: 0.5rem; font-size: 1.2rem;">✅ Latest Update (January 2026)</h3>
<p style="color: var(--text-light); margin: 0;">End-to-end Ollama GPU inference testing completed! Real GPU miner operational with RTX 4060 Ti, processing jobs in 11-25 seconds with verified receipt generation and blockchain recording.</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="fa fa-search search-icon"></i>
<i class="fas fa-search search-icon"></i>
</div>
<!-- Reader Level Cards -->
@@ -50,7 +50,7 @@
<!-- Miners Card -->
<div class="reader-card miner">
<div class="reader-icon">
<i class="fa fa-hammer"></i>
<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>
@@ -61,13 +61,13 @@
<li>Real-time job processing & earnings</li>
<li>Performance monitoring & troubleshooting</li>
</ul>
<a href="docs-miners.html" class="btn">Miner Documentation</a>
<a href="miners.html" class="btn">Miner Documentation</a>
</div>
<!-- Clients Card -->
<div class="reader-card client">
<div class="reader-icon">
<i class="fa fa-users"></i>
<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>
@@ -78,13 +78,13 @@
<li>Transparent pricing: 0.02 AITBC/gpu_second</li>
<li>Cryptographic receipts & blockchain verification</li>
</ul>
<a href="docs-clients.html" class="btn">Client Documentation</a>
<a href="clients.html" class="btn">Client Documentation</a>
</div>
<!-- Developers Card -->
<div class="reader-card developer">
<div class="reader-icon">
<i class="fa fa-code"></i>
<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>
@@ -95,13 +95,13 @@
<li>Bounty programs</li>
<li>Community resources</li>
</ul>
<a href="docs-developers.html" class="btn">Developer Documentation</a>
<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="fa fa-file-alt"></i>
<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>
@@ -118,26 +118,26 @@
<!-- Components Card -->
<div class="reader-card components">
<div class="reader-icon">
<i class="fa fa-cube"></i>
<i class="fas fa-cube"></i>
</div>
<h3>System Components</h3>
<p>Explore the 7 core components that make up the AITBC platform. Understand how each part works together to create a complete AI blockchain computing solution.</p>
<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>Blockchain Node with PoA/PoS consensus</li>
<li>End-to-end system flow diagram</li>
<li>Coordinator API for job orchestration</li>
<li>Wallet Daemon for secure key management</li>
<li>Miner Daemon for GPU compute</li>
<li>Blockchain Node with PoA/PoS consensus</li>
<li>Marketplace Web for compute trading</li>
<li>Explorer Web for blockchain viewing</li>
<li>Pool Hub for miner coordination</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 Components</a>
<a href="components.html" class="btn">View Architecture</a>
</div>
<!-- System Flow Card -->
<div class="reader-card flow">
<div class="reader-icon">
<i class="fa fa-sitemap"></i>
<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>
@@ -157,19 +157,19 @@
<h2>Quick Links</h2>
<div class="links-grid">
<a href="full-documentation.html" class="link-item">
<i class="fa fa-book"></i>
<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="fa fa-file-alt"></i>
<i class="fas fa-file-alt"></i>
<span>Markdown Docs</span>
</a>
<a href="https://aitbc.bubuit.net/Exchange/" class="link-item">
<i class="fa fa-exchange"></i>
<i class="fas fa-exchange"></i>
<span>Trade Exchange</span>
</a>
<a href="https://github.com/oib/AITBC" class="link-item">
<i class="fa fa-git"></i>
<i class="fas fa-git"></i>
<span>Source Code</span>
</a>
<a href="https://discord.gg/aitbc" class="link-item">
@@ -177,7 +177,7 @@
<span>Community</span>
</a>
<a href="mailto:aitbc@bubuit.net" class="link-item">
<i class="fa fa-envelope"></i>
<i class="fas fa-envelope"></i>
<span>Support</span>
</a>
</div>
@@ -192,10 +192,10 @@
<i class="fab fa-discord"></i> Join Discord
</a>
<a href="mailto:aitbc@bubuit.net" class="btn btn-outline">
<i class="fa fa-envelope"></i> Email Support
<i class="fas fa-envelope"></i> Email Support
</a>
<a href="#" class="btn btn-outline">
<i class="fa fa-comments"></i> Live Chat
<a href="https://discord.gg/aitbc" class="btn btn-outline">
<i class="fas fa-comments"></i> Live Chat
</a>
</div>
</section>
@@ -205,44 +205,50 @@
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2026 AITBC. All rights reserved. | Last updated: January 24, 2026</p>
<p>&copy; 2026 AITBC. All rights reserved. | Last updated: February 13, 2026</p>
</div>
</footer>
<script>
// Search functionality
document.getElementById('searchInput').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
const searchTerm = e.target.value.toLowerCase();
if (searchTerm) {
// Simple search logic - in real implementation, this would search actual docs
alert(`Searching for: ${searchTerm}\n\nIn a full implementation, this would search through all documentation pages and show relevant results.`);
}
// 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('');
}
});
// Add some interactivity
document.querySelectorAll('.reader-card').forEach(card => {
card.addEventListener('mouseenter', function() {
this.style.cursor = 'pointer';
});
});
</script>
<script>
// Check for saved theme preference or default to dark mode
const currentTheme = localStorage.getItem('theme') || 'dark';
if (currentTheme === 'light') {
document.body.classList.add('light');
document.getElementById('themeToggle').textContent = '🌙';
}
// Theme toggle functionality
document.getElementById('themeToggle').addEventListener('click', function() {
document.body.classList.toggle('light');
const isLight = document.body.classList.contains('light');
localStorage.setItem('theme', isLight ? 'light' : 'dark');
this.textContent = isLight ? '🌙' : '🌞';
});
</script></body>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,245 +5,26 @@
<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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: #10b98120;
color: var(--success-color);
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
margin-top: 1rem;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.tech-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.tech-item {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
text-align: center;
}
.tech-item strong {
display: block;
color: var(--primary-color);
margin-bottom: 0.5rem;
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
.alert {
background: #dbeafe;
border: 1px solid #3b82f6;
border-radius: 8px;
padding: 1rem;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-color: #3b82f6;
color: #1e40af;
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<!-- Header -->
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<main>
@@ -252,7 +33,7 @@
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">Components</a>
<a href="components.html">Components</a>
<span></span>
<span>Marketplace Web</span>
</div>
@@ -478,7 +259,7 @@ docker run -d \
<p>For marketplace-specific issues:</p>
<ul>
<li>Check the <a href="full-documentation.html">issue tracker</a></li>
<li>Join our <a href="#">Discord</a></li>
<li>Join our <a href="https://discord.gg/aitbc">Discord</a></li>
<li>Contact: <a href="mailto:aitbc@bubuit.net">aitbc@bubuit.net</a></li>
</ul>
</section>
@@ -487,8 +268,9 @@ docker run -d \
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -1,585 +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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.feature-card h4 {
margin-top: 0;
color: var(--primary-color);
}
.requirements-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
margin: 2rem 0;
}
.requirement-card {
background: var(--bg-light);
padding: 1.5rem;
border-radius: 8px;
text-align: center;
}
.requirement-card h4 {
margin-top: 0;
color: var(--primary-color);
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.inline-code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.9rem;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
.alert {
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid var(--primary-color);
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid var(--warning-color);
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid var(--success-color);
color: #065f46;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.stat-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
text-align: center;
}
.stat-value {
font-size: 2rem;
font-weight: bold;
color: var(--primary-color);
}
.stat-label {
color: var(--text-light);
margin-top: 0.5rem;
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
</header>
<main>
<div class="container">
<!-- Breadcrumb -->
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<span>Miner Documentation</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-hammer"></i> Miner Documentation</h1>
<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>
</div>
<!-- Mining Stats -->
<div class="stats-grid">
<div class="stat-card">
<div class="stat-value">100K+</div>
<div class="stat-label">AITBC Staked</div>
</div>
<div class="stat-card">
<div class="stat-value">30+</div>
<div class="stat-label">Active Miners</div>
</div>
<div class="stat-card">
<div class="stat-value">0.02</div>
<div class="stat-label">AITBC/GPU Second</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">
<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>
<h3>Requirements</h3>
<div class="requirements-grid">
<div class="requirement-card">
<h4><i class="fas fa-coins"></i> Minimum Stake</h4>
<p>10,000 AITBC tokens</p>
</div>
<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 (Optional)</h4>
<p><strong>✅ Tested:</strong> NVIDIA RTX 4060 Ti (16GB)</p>
</div>
</div>
</section>
<!-- Quick Start -->
<section class="content-section">
<h2>Quick Start</h2>
<h3>1. Download & Install</h3>
<p>Get the AITBC mining software for your platform</p>
<pre><code># Linux/macOS
curl -O https://github.com/oib/AITBC/releases/download/latest/aitbc-miner-linux-amd64.tar.gz
tar -xzf aitbc-miner-linux-amd64.tar.gz
cd aitbc-miner
# Windows
# Download from https://github.com/oib/AITBC/releases</code></pre>
<h3>2. Configure Your Node</h3>
<p>Set up your mining configuration</p>
<pre><code># Create configuration
./aitbc-miner init
# Edit config file
nano ~/.aitbc/miner/config.toml</code></pre>
<h3>3. Start Mining</h3>
<pre><code># Start the miner
./aitbc-miner start
# Check status
./aitbc-miner status
# View logs
./aitbc-miner logs</code></pre>
</section>
<!-- Configuration -->
<section class="content-section">
<h2>Configuration</h2>
<h3>Basic Configuration</h3>
<p>Edit <span class="inline-code">~/.aitbc/miner/config.toml</span>:</p>
<pre><code># Network settings
[network]
rpc_url = "https://aitbc.bubuit.net"
ws_url = "wss://aitbc.bubuit.net/ws"
# Mining settings
[mining]
stake_amount = 10000
compute_enabled = true
gpu_devices = [0] # GPU indices to use
# Wallet settings
[wallet]
address = "your-wallet-address"
private_key = "your-private-key"
# Performance settings
[performance]
max_concurrent_jobs = 2
memory_limit = "8GB"</code></pre>
<h3>GPU Configuration</h3>
<pre><code># GPU mining settings
[gpu]
enabled = true
devices = [0] # Use first GPU
memory_fraction = 0.8 # Use 80% of GPU memory
models = ["llama3.2", "mistral", "deepseek"] # Supported models</code></pre>
</section>
<!-- Mining Operations -->
<section class="content-section">
<h2>Mining Operations</h2>
<h3>Stake Mining</h3>
<ul>
<li>Stake your AITBC tokens to participate in consensus</li>
<li>Earn rewards from transaction fees</li>
<li>No hardware requirements beyond basic node</li>
<li>Rewards proportional to stake amount</li>
</ul>
<h3>GPU Mining</h3>
<ul>
<li>Provide AI/ML compute power to the network</li>
<li>Process inference jobs and earn AITBC</li>
<li>Supports 13+ Ollama models</li>
<li>Earnings: 0.02 AITBC per GPU second</li>
</ul>
<h3>Monitoring</h3>
<pre><code># Real-time monitoring
./aitbc-miner monitor
# Check earnings
./aitbc-miner earnings
# Performance metrics
./aitbc-miner metrics</code></pre>
</section>
<!-- Troubleshooting -->
<section class="content-section">
<h2>Troubleshooting</h2>
<h3>Common Issues</h3>
<div class="alert alert-warning">
<strong>GPU not detected?</strong> Ensure NVIDIA drivers are installed and CUDA is available.
</div>
<ol>
<li><strong>Connection Issues</strong>
<ul>
<li>Check internet connectivity</li>
<li>Verify RPC endpoint is accessible</li>
<li>Check firewall settings</li>
</ul>
</li>
<li><strong>Low Performance</strong>
<ul>
<li>Reduce concurrent jobs</li>
<li>Check GPU memory usage</li>
<li>Monitor system resources</li>
</ul>
</li>
<li><strong>Sync Issues</strong>
<ul>
<li>Wait for initial sync to complete</li>
<li>Check blockchain status</li>
<li>Restart miner if needed</li>
</ul>
</li>
</ol>
<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: aitbc@bubuit.net</li>
</ul>
</section>
<!-- FAQ -->
<section class="content-section">
<h2>Frequently Asked Questions</h2>
<h3>How much can I earn mining AITBC?</h3>
<p>Earnings vary based on:
- Stake amount (for stake mining)
- GPU performance and availability (for GPU mining)
- Network demand and transaction volume
- Current reward rates: 0.02 AITBC/GPU second</p>
<h3>What are the minimum requirements?</h3>
<p>Basic stake mining requires:
- 10,000 AITBC tokens minimum stake
- Stable internet connection
- Basic computer (4GB RAM, dual-core CPU)
GPU mining requires:
- NVIDIA GPU with 8GB+ VRAM
- 16GB+ RAM recommended
- Stable high-speed internet</p>
<h3>Is mining profitable?</h3>
<p>Profitability depends on:
- AITBC token value
- Electricity costs (for GPU mining)
- Network activity
- Your stake amount or GPU capabilities</p>
<h3>How do I become an authority node?</h3>
<p>Authority nodes require invitation based on community contribution, technical expertise, and stake amount. Apply through the community forum.</p>
</section>
<!-- Additional Resources -->
<section class="content-section">
<h2>Additional Resources</h2>
<ul>
<li><a href="blockchain-node-md.html">Blockchain Node Documentation</a></li>
<li><a href="full-documentation-md.html">Source Code</a></li>
<li>Network Statistics - available in monitoring dashboard</li>
<li>Mining Calculator - coming soon</li>
</ul>
</section>
</div>
</main>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
</body>
</html>

View File

@@ -9,19 +9,19 @@
</head>
<body>
<!-- Header -->
<header class="text-white shadow-lg" style="background: var(--bg-white); position: fixed; width: 100%; top: 0; z-index: 1000; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
<div class="container" style="max-width: 1200px; margin: 0 auto; padding: 0 20px;">
<div style="display: flex; align-items: center; justify-content: space-between; padding: 1rem 0;">
<div style="display: flex; align-items: center; gap: 0.75rem;">
<i class="fas fa-cube" style="font-size: 2rem; color: var(--primary-color);"></i>
<h1 style="font-size: 1.5rem; font-weight: bold; margin: 0; color: var(--text-dark);">AITBC</h1>
</div>
<nav style="display: flex; align-items: center; gap: 1.5rem;">
<a href="/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Home</a>
<a href="/explorer/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Explorer</a>
<a href="/Exchange/" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Exchange</a>
<a href="/docs/index.html" style="background: transparent !important; color: var(--text-dark) !important; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center;">Documentation</a>
<button id="themeToggle" class="theme-toggle" style="background: rgba(59, 130, 246, 0.1) !important; color: var(--primary-color) !important; border: 2px solid var(--primary-color); padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; font-size: 1rem;">🌞</button>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
@@ -34,6 +34,9 @@
<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 -->
@@ -74,8 +77,8 @@
<li><strong>Hybrid Mining</strong>: Combine staking with compute provision</li>
</ul>
<div class="alert alert-info" style="margin-top: 1.5rem; padding: 1rem; background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%); border-left: 4px solid var(--success-color); border-radius: 8px;">
<strong>🎉 Latest Achievement (January 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 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>
@@ -361,7 +364,7 @@ nano ~/.aitbc/miner.toml</div>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
@@ -383,26 +386,6 @@ nano ~/.aitbc/miner.toml</div>
// Initialize calculator
calculateProfit();
</script>
<script>
// Check for saved theme preference or default to dark mode
const currentTheme = localStorage.getItem('theme') || 'dark';
if (currentTheme === 'light') {
document.body.classList.add('light');
const btn = document.getElementById('themeToggle');
if (btn) btn.textContent = '🌙';
}
// Theme toggle functionality
const themeBtn = document.getElementById('themeToggle');
if (themeBtn) {
themeBtn.addEventListener('click', function() {
document.body.classList.toggle('light');
const isLight = document.body.classList.contains('light');
localStorage.setItem('theme', isLight ? 'light' : 'dark');
this.textContent = isLight ? '🌙' : '🌞';
});
}
</script></body>
</script> <script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,230 +5,26 @@
<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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: #10b98120;
color: var(--success-color);
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
margin-top: 1rem;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.feature-card h4 {
margin-top: 0;
color: var(--primary-color);
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<!-- Header -->
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<main>
@@ -237,7 +33,7 @@
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">Components</a>
<a href="components.html">Components</a>
<span></span>
<span>Pool Hub</span>
</div>
@@ -471,8 +267,9 @@ GET /metrics</code></pre>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,293 +5,26 @@
<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">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-light);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover,
.nav-links a.active {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
background: var(--bg-white);
padding: 3rem 0;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.doc-header h1 {
font-size: 2.5rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
color: var(--text-light);
font-size: 1.1rem;
}
.breadcrumb {
margin-bottom: 2rem;
}
.breadcrumb a {
color: var(--primary-color);
text-decoration: none;
}
.breadcrumb span {
color: var(--text-light);
margin: 0 0.5rem;
}
/* Content Sections */
.content-section {
background: var(--bg-white);
padding: 2.5rem;
margin-bottom: 2rem;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
display: flex;
align-items: center;
gap: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-light);
}
.content-section ul {
margin-left: 2rem;
margin-bottom: 1rem;
}
.content-section li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
.content-section code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-family: 'Courier New', monospace;
color: var(--primary-color);
}
.content-section pre {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
.content-section pre code {
background: none;
padding: 0;
color: var(--text-dark);
}
/* Feature Grid */
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
padding: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--bg-light);
}
.feature-card h4 {
color: var(--primary-color);
margin-bottom: 0.5rem;
}
/* API Endpoints */
.api-endpoint {
background: var(--bg-light);
padding: 1rem;
border-radius: 8px;
margin: 1rem 0;
border-left: 4px solid var(--primary-color);
}
.api-endpoint code {
display: block;
font-weight: bold;
margin-bottom: 0.5rem;
}
/* Status Badge */
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
}
.status-badge.live {
background: #10b98120;
color: var(--success-color);
}
/* Back Button */
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
/* CTA Button */
.cta-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: var(--primary-color);
color: white;
padding: 12px 30px;
border-radius: 50px;
text-decoration: none;
font-weight: 600;
transition: all 0.3s;
margin: 1rem 0;
}
.cta-button:hover {
background: var(--secondary-color);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
/* Responsive */
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
.content-section {
padding: 1.5rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html" class="active">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<!-- Main Content -->
@@ -301,7 +34,7 @@
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">Components</a>
<a href="components.html">Components</a>
<span></span>
<span>Trade Exchange</span>
</div>
@@ -537,5 +270,6 @@ BITCOIN_RPC_PASS=password</code></pre>
<script>
// Add any interactive functionality here
</script>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -5,230 +5,26 @@
<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">
<style>
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
background: var(--bg-white);
margin: 0;
padding: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
header {
background: var(--text-dark);
color: white;
padding: 1rem 0;
position: sticky;
top: 0;
z-index: 100;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: white;
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
margin: 0;
padding: 0;
}
.nav-links a {
color: white;
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
.breadcrumb {
padding: 1rem 0;
color: var(--text-light);
font-size: 0.9rem;
}
.breadcrumb a {
color: var(--text-light);
text-decoration: none;
}
.breadcrumb a:hover {
color: var(--primary-color);
}
.doc-header {
padding: 3rem 0;
background: var(--bg-light);
margin-bottom: 2rem;
}
.doc-header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.doc-header p {
font-size: 1.2rem;
color: var(--text-light);
max-width: 800px;
}
.status-badge {
display: inline-block;
padding: 0.25rem 0.75rem;
background: #10b98120;
color: var(--success-color);
border-radius: 20px;
font-size: 0.875rem;
font-weight: 600;
margin-top: 1rem;
}
.content-section {
margin-bottom: 3rem;
}
.content-section h2 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content-section h3 {
font-size: 1.4rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content-section p {
margin-bottom: 1rem;
color: var(--text-dark);
}
.content-section ul {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content-section li {
margin-bottom: 0.5rem;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1.5rem;
margin: 2rem 0;
}
.feature-card {
background: var(--bg-white);
padding: 1.5rem;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.feature-card h4 {
margin-top: 0;
color: var(--primary-color);
}
pre {
background: #1f2937;
color: #f9fafb;
padding: 1.5rem;
border-radius: 8px;
overflow-x: auto;
margin: 1rem 0;
}
code {
font-family: 'Courier New', Courier, monospace;
font-size: 0.9rem;
}
pre code {
background: none;
padding: 0;
}
.back-button {
display: inline-flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-color);
text-decoration: none;
margin-bottom: 2rem;
font-weight: 600;
}
.back-button:hover {
color: var(--secondary-color);
}
footer {
background: var(--text-dark);
color: white;
padding: 2rem 0;
text-align: center;
margin-top: 4rem;
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.doc-header h1 {
font-size: 2rem;
}
}
</style>
<link rel="stylesheet" href="css/docs.css">
</head>
<body>
<header>
<nav class="container">
<a href="../index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="../index.html">Home</a></li>
<li><a href="index.html">Documentation</a></li>
<li><a href="mailto:aitbc@bubuit.net">Contact</a></li>
</ul>
</nav>
<!-- Header -->
<header class="site-header">
<div class="container">
<div class="header-inner">
<a href="/" class="brand">
<i class="fas fa-cube"></i>
<span>AITBC</span>
</a>
<nav class="header-nav">
<a href="/">Home</a>
<a href="/explorer/">Explorer</a>
<a href="/Exchange/">Exchange</a>
<a href="/docs/index.html" class="active">Docs</a>
<button id="theme-toggle" class="theme-toggle" title="Toggle theme"><i class="fas fa-sun"></i></button>
</nav>
</div>
</div>
</header>
<main>
@@ -237,7 +33,7 @@
<div class="breadcrumb">
<a href="index.html">Documentation</a>
<span></span>
<a href="#">Components</a>
<a href="components.html">Components</a>
<span></span>
<span>Wallet Daemon</span>
</div>
@@ -421,8 +217,9 @@ console.log('Balance:', balance);</code></pre>
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
<p>&copy; 2026 AITBC. All rights reserved.</p>
</div>
</footer>
<script src="js/theme.js"></script>
</body>
</html>

View File

@@ -1,613 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation - AITBC</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--accent-color: #3b82f6;
--text-dark: #1f2937;
--text-light: #6b7280;
--bg-light: #f9fafb;
--bg-white: #ffffff;
--border-color: #e5e7eb;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text-dark);
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Header */
header {
background: var(--bg-white);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 0;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
color: var(--primary-color);
text-decoration: none;
}
.nav-links {
display: flex;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--text-dark);
text-decoration: none;
transition: color 0.3s;
}
.nav-links a:hover {
color: var(--primary-color);
}
/* Main Content */
main {
margin-top: 80px;
padding: 40px 0;
}
.doc-header {
text-align: center;
margin-bottom: 3rem;
}
.doc-header h1 {
font-size: 2.5rem;
color: var(--text-dark);
margin-bottom: 1rem;
}
.doc-header p {
font-size: 1.1rem;
color: var(--text-light);
}
/* Documentation Grid */
.doc-grid {
display: grid;
grid-template-columns: 250px 1fr;
gap: 2rem;
}
/* Sidebar */
.sidebar {
background: var(--bg-light);
border-radius: 10px;
padding: 1.5rem;
height: fit-content;
position: sticky;
top: 100px;
}
.sidebar h3 {
font-size: 1.2rem;
margin-bottom: 1rem;
color: var(--text-dark);
}
.sidebar ul {
list-style: none;
}
.sidebar li {
margin-bottom: 0.5rem;
}
.sidebar a {
color: var(--text-light);
text-decoration: none;
display: block;
padding: 0.5rem;
border-radius: 5px;
transition: all 0.3s;
}
.sidebar a:hover,
.sidebar a.active {
background: var(--bg-white);
color: var(--primary-color);
}
/* Content */
.content {
background: var(--bg-white);
border-radius: 10px;
padding: 2rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.content h2 {
font-size: 2rem;
margin-bottom: 1rem;
color: var(--text-dark);
border-bottom: 2px solid var(--border-color);
padding-bottom: 0.5rem;
}
.content h3 {
font-size: 1.5rem;
margin: 2rem 0 1rem;
color: var(--text-dark);
}
.content h4 {
font-size: 1.2rem;
margin: 1.5rem 0 0.5rem;
color: var(--primary-color);
}
.content p {
margin-bottom: 1rem;
color: var(--text-light);
}
.content ul,
.content ol {
margin-bottom: 1rem;
padding-left: 2rem;
}
.content li {
margin-bottom: 0.5rem;
color: var(--text-light);
}
.content code {
background: var(--bg-light);
padding: 0.2rem 0.4rem;
border-radius: 3px;
font-family: 'Courier New', monospace;
font-size: 0.9rem;
}
.content pre {
background: var(--bg-light);
padding: 1rem;
border-radius: 5px;
overflow-x: auto;
margin-bottom: 1rem;
}
.content pre code {
background: none;
padding: 0;
}
.content blockquote {
border-left: 4px solid var(--primary-color);
padding-left: 1rem;
margin: 1rem 0;
color: var(--text-light);
font-style: italic;
}
.content table {
width: 100%;
border-collapse: collapse;
margin: 1rem 0;
}
.content th,
.content td {
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid var(--border-color);
}
.content th {
background: var(--bg-light);
font-weight: 600;
color: var(--text-dark);
}
/* Alert Boxes */
.alert {
padding: 1rem;
border-radius: 5px;
margin: 1rem 0;
}
.alert-info {
background: #dbeafe;
border-left: 4px solid #3b82f6;
color: #1e40af;
}
.alert-warning {
background: #fef3c7;
border-left: 4px solid #f59e0b;
color: #92400e;
}
.alert-success {
background: #d1fae5;
border-left: 4px solid #10b981;
color: #065f46;
}
/* Footer */
footer {
background: var(--text-dark);
color: white;
padding: 40px 0;
text-align: center;
margin-top: 40px;
}
/* Responsive */
@media (max-width: 768px) {
.doc-grid {
grid-template-columns: 1fr;
}
.sidebar {
position: static;
}
}
</style>
</head>
<body>
<!-- Header -->
<header>
<nav class="container">
<a href="index.html" class="logo">AITBC</a>
<ul class="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="documentation.html" class="active">Documentation</a></li>
<li><a href="#roadmap">Roadmap</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<!-- Main Content -->
<main>
<div class="container">
<div class="doc-header">
<h1>AITBC Documentation</h1>
<p>Comprehensive guides and technical documentation for the AITBC platform</p>
</div>
<div class="doc-grid">
<!-- Sidebar -->
<aside class="sidebar">
<h3>Quick Links</h3>
<ul>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="#architecture">Architecture</a></li>
<li><a href="#api-reference">API Reference</a></li>
<li><a href="#developer-guide">Developer Guide</a></li>
<li><a href="#deployment">Deployment</a></li>
<li><a href="#security">Security</a></li>
<li><a href="#faq">FAQ</a></li>
</ul>
</aside>
<!-- Content -->
<div class="content">
<section id="getting-started">
<h2>Getting Started</h2>
<p>Welcome to AITBC! This guide will help you get started with the AI Training & Blockchain Computing platform.</p>
<h3>Prerequisites</h3>
<ul>
<li>Linux or macOS operating system</li>
<li>Docker installed (version 20.10+)</li>
<li>Git</li>
<li>Node.js (version 16+) for frontend development</li>
<li>Python (version 3.8+) for backend development</li>
</ul>
<h3>Quick Installation</h3>
<div class="alert alert-info">
<strong>Note:</strong> For production deployments, please refer to the <a href="#deployment">Deployment Guide</a>.
</div>
<pre><code># Clone the repository
git clone https://github.com/aitbc/aitbc.git
cd aitbc
# Run the setup script
./scripts/setup.sh
# Start the development environment
docker-compose up -d</code></pre>
<h3>Verify Installation</h3>
<p>Once the services are running, you can verify the installation by checking:</p>
<ul>
<li>Blockchain Node: <code>http://localhost:8545</code></li>
<li>Coordinator API: <code>http://localhost:8080</code></li>
<li>Marketplace UI: <code>http://localhost:3000</code></li>
</ul>
</section>
<section id="architecture">
<h2>Architecture</h2>
<p>AITBC is built with a modular architecture consisting of several key components:</p>
<h3>Core Components</h3>
<h4>1. Blockchain Node</h4>
<p>The blockchain node implements a hybrid Proof of Authority/Proof of Stake consensus mechanism with dynamic mode switching:</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>
<h4>2. Coordinator API</h4>
<p>The coordinator acts as the central hub for marketplace operations:</p>
<ul>
<li>Job management and scheduling</li>
<li>Receipt verification and storage</li>
<li>Provider registration and reputation</li>
<li>Multi-tenant support</li>
</ul>
<h4>3. GPU Service Provider</h4>
<p>Decentralized compute providers offer AI/ML services:</p>
<ul>
<li>Model inference</li>
<li>Training and fine-tuning</li>
<li>Result verification</li>
<li>Cross-chain compatibility</li>
</ul>
<h3>Data Flow</h3>
<ol>
<li>Client submits job request to Coordinator</li>
<li>Coordinator matches with suitable provider</li>
<li>Provider executes computation</li>
<li>Results submitted with cryptographic proof</li>
<li>Verification and settlement on blockchain</li>
</ol>
</section>
<section id="api-reference">
<h2>API Reference</h2>
<p>AITBC provides REST APIs for interacting with the platform:</p>
<h3>Coordinator API</h3>
<h4>Authentication</h4>
<p>All API requests require authentication using JWT tokens:</p>
<pre><code>Authorization: Bearer &lt;your-jwt-token&gt;</code></pre>
<h4>Endpoints</h4>
<table>
<tr>
<th>Method</th>
<th>Endpoint</th>
<th>Description</th>
</tr>
<tr>
<td>POST</td>
<td>/api/v1/jobs</td>
<td>Create a new job</td>
</tr>
<tr>
<td>GET</td>
<td>/api/v1/jobs/{id}</td>
<td>Get job details</td>
</tr>
<tr>
<td>GET</td>
<td>/api/v1/jobs</td>
<td>List jobs</td>
</tr>
<tr>
<td>POST</td>
<td>/api/v1/receipts/verify</td>
<td>Verify a receipt</td>
</tr>
</table>
<h3>Example: Create a Job</h3>
<pre><code>curl -X POST http://localhost:8080/api/v1/jobs \
-H "Authorization: Bearer &lt;token&gt;" \
-H "Content-Type: application/json" \
-d '{
"type": "inference",
"model_id": "gpt-4",
"input_data": "Hello, world!",
"requirements": {
"max_tokens": 100,
"temperature": 0.7
}
}'</code></pre>
</section>
<section id="developer-guide">
<h2>Developer Guide</h2>
<p>This section provides detailed information for developers building on AITBC.</p>
<h3>SDKs</h3>
<p>AITBC provides SDKs for multiple languages:</p>
<ul>
<li><strong>Python SDK:</strong> <code>pip install aitbc</code></li>
<li><strong>JavaScript SDK:</strong> <code>npm install @aitbc/client</code></li>
<li><strong>Go SDK:</strong> <code>go get github.com/aitbc/go-sdk</code></li>
</ul>
<h3>Building Extensions</h3>
<p>Developers can extend AITBC functionality through:</p>
<ol>
<li>Custom marketplace extensions</li>
<li>New compute provider implementations</li>
<li>Alternative consensus mechanisms</li>
<li>Cross-chain bridges</li>
</ol>
<h3>Contributing</h3>
<p>We welcome contributions! Please see our <a href="https://github.com/oib/AITBC/blob/main/CONTRIBUTING.md">contributing guide</a> for details.</p>
</section>
<section id="deployment">
<h2>Deployment Guide</h2>
<p>This guide covers deploying AITBC in production environments.</p>
<h3>System Requirements</h3>
<div class="alert alert-warning">
<strong>Minimum Requirements:</strong>
<ul>
<li>4 CPU cores</li>
<li>8GB RAM</li>
<li>100GB storage</li>
<li>Stable internet connection</li>
</ul>
</div>
<h3>Production Deployment</h3>
<pre><code># Clone the repository
git clone https://github.com/aitbc/aitbc.git
cd aitbc
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Deploy with Docker Compose
docker-compose -f docker-compose.prod.yml up -d</code></pre>
<h3>Monitoring</h3>
<p>AITBC includes built-in monitoring capabilities:</p>
<ul>
<li>Prometheus metrics endpoint</li>
<li>Grafana dashboards</li>
<li>Health check endpoints</li>
<li>Log aggregation</li>
</ul>
</section>
<section id="security">
<h2>Security</h2>
<p>Security is a top priority for AITBC. Here are the key security features:</p>
<h3>Cryptography</h3>
<ul>
<li>Zero-knowledge proofs for privacy</li>
<li>Threshold signatures for security</li>
<li>End-to-end encryption</li>
<li>Secure multi-party computation</li>
</ul>
<h3>Audit Reports</h3>
<p>Our smart contracts have been audited by:</p>
<ul>
<li>Trail of Bits (2024)</li>
<li>CertiK (2024)</li>
<li>OpenZeppelin (2023)</li>
</ul>
<h3>Bug Bounty</h3>
<p>We offer a bug bounty program with rewards up to $100,000. Report vulnerabilities at <a href="mailto:aitbc@bubuit.net">security@aitbc.io</a>.</p>
</section>
<section id="faq">
<h2>Frequently Asked Questions</h2>
<h3>General</h3>
<h4>What is AITBC?</h4>
<p>AITBC is a decentralized platform for AI/ML workloads that combines blockchain technology with artificial intelligence to create a trustless marketplace for computational resources.</p>
<h4>How does AITBC ensure privacy?</h4>
<p>We use zero-knowledge proofs and secure enclaves to protect sensitive data while enabling verification of computation.</p>
<h4>What blockchains does AITBC support?</h4>
<p>AITBC currently supports Ethereum, Polygon, and Binance Smart Chain, with more chains being added.</p>
<h3>Technical</h3>
<h4>What is the maximum TPS?</h4>
<p>AITBC can achieve up to 100,000 TPS through sharding and rollup architectures.</p>
<h4>How long does finality take?</h4>
<p>Finality time depends on the consensus mode: 100ms (FAST), 1s (BALANCED), or 5s (SECURE).</p>
<h3>Economic</h3>
<h4>How are providers rewarded?</h4>
<p>Providers earn AITBC tokens for completing computations, with rewards based on performance and reputation.</p>
<h4>What are the fees?</h4>
<p>Transaction fees are dynamic and depend on network load, typically ranging from 0.1% to 1% of the transaction value.</p>
</section>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer>
<div class="container">
<p>&copy; 2025 AITBC. All rights reserved.</p>
</div>
</footer>
<script>
// Smooth scrolling for sidebar links
document.querySelectorAll('.sidebar a').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Update active sidebar link on scroll
const sections = document.querySelectorAll('section[id]');
const sidebarLinks = document.querySelectorAll('.sidebar a');
window.addEventListener('scroll', () => {
let current = '';
sections.forEach(section => {
const sectionTop = section.offsetTop;
const sectionHeight = section.clientHeight;
if (scrollY >= (sectionTop - 100)) {
current = section.getAttribute('id');
}
});
sidebarLinks.forEach(link => {
link.classList.remove('active');
if (link.getAttribute('href') === '#' + current) {
link.classList.add('active');
}
});
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -690,7 +690,7 @@
</div>
<h3>Miners</h3>
<p>Learn mining, staking, and earning rewards</p>
<a href="docs/docs-miners.html" class="doc-link">Miner Docs <i class="fas fa-arrow-right"></i></a>
<a href="docs/miners.html" class="doc-link">Miner Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="doc-card">
@@ -699,7 +699,7 @@
</div>
<h3>Clients</h3>
<p>Use AITBC for AI/ML workloads</p>
<a href="docs/docs-clients.html" class="doc-link">Client Docs <i class="fas fa-arrow-right"></i></a>
<a href="docs/clients.html" class="doc-link">Client Docs <i class="fas fa-arrow-right"></i></a>
</div>
<div class="doc-card">
@@ -708,7 +708,7 @@
</div>
<h3>Developers</h3>
<p>Build on AITBC and contribute</p>
<a href="docs/docs-developers.html" class="doc-link">Developer Docs <i class="fas fa-arrow-right"></i></a>
<a href="docs/developers.html" class="doc-link">Developer Docs <i class="fas fa-arrow-right"></i></a>
</div>
</div>

358
website/wallet/index.html Normal file
View File

@@ -0,0 +1,358 @@
<!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>