docs: update documentation links to use relative paths and add system flow references

- Replace absolute aitbc.bubuit.net URLs with relative paths in documentation pages
- Update markdown documentation links from /main/ to /master/ branch
- Add system flow diagram references to component documentation pages
- Remove redundant "Also available in Markdown" notices from HTML docs
- Update Font Awesome CDN link in index.html
- Simplify quick links section and remove unused tutorial/video guide plac
This commit is contained in:
oib
2026-02-11 20:59:05 +01:00
parent 86e5c6f1a3
commit a9f9003ad1
25 changed files with 5146 additions and 655 deletions

View File

@@ -0,0 +1,633 @@
<!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://gitea.bubuit.net/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>