```
chore: update genesis timestamp, fix import paths, clean compiled JS files, and adjust mock path - Update devnet genesis timestamp to 1766400877 - Add Receipt model for zk-proof generation with receiptId, miner, coordinator fields - Fix import paths from settings to config across service modules (access_control, audit_logging, encryption, hsm_key_manager, key_management, zk_proofs) - Remove compiled JavaScript files from explorer-web components and lib directories - Update mock data base path
This commit is contained in:
839
website/docs-developers.html
Normal file
839
website/docs-developers.html
Normal file
@ -0,0 +1,839 @@
|
||||
<!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 Gitea
|
||||
git clone https://gitea.bubuit.net/YOUR_USERNAME/aitbc.git
|
||||
cd aitbc
|
||||
|
||||
# Add upstream remote
|
||||
git remote add upstream https://gitea.bubuit.net/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>© 2025 AITBC. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user