For Developers

# Build on AITBC

Join our developer community and help build the future of decentralized AI

Markdown Source: docs/8_development/ Technical Reference: docs/5_reference/

## Technology Stack

AITBC is built with modern technologies focused on performance and security.

Rust
Go
Python
TypeScript
React
PostgreSQL
Docker
Kubernetes

## Getting Started

Ready to contribute? Here's how to get started with AITBC development.

### Development Environment Setup

1

#### Fork & Clone

# 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
2

#### Install Dependencies

# Install development dependencies ./scripts/install-dev-deps.sh # Setup pre-commit hooks pre-commit install
3

#### Build & Run

# Build all components make build # Start development environment make dev-up # Run tests make test
4

#### Create Your Branch

# 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"
5

#### Submit PR

# Push to your fork git push origin feature/your-feature-name # Create pull request on Gitea # Fill PR template and submit

## Contribution Areas

There are many ways to contribute to AITBC. Find the area that matches your skills!

#### Core Protocol

- Consensus mechanism improvements
- Cryptographic implementations
- Performance optimizations
- Security enhancements
- Sharding implementations

Skills: Rust, Go, Cryptography, Distributed Systems

#### AI/ML Integration

- Model optimization
- ZK proof generation
- Secure enclaves
- Privacy-preserving ML
- Autonomous agents

Skills: Python, TensorFlow, PyTorch, ZK-SNARKs

#### Developer Tools

- SDK development
- CLI tools
- Testing frameworks
- Documentation
- IDE plugins

Skills: TypeScript, Python, Go, Documentation

#### Frontend & UI

- Marketplace interface
- Wallet UI
- Developer dashboard
- Mobile apps
- Design system

Skills: React, TypeScript, CSS, Design

#### Security

- Security audits
- Penetration testing
- Bug bounty
- Security tools
- Threat modeling

Skills: Security, Auditing, Cryptography

#### Documentation

- Technical guides
- Tutorials
- API docs
- Blog posts
- Translations

Skills: Writing, Technical Communication

## Development Guidelines

### Code Standards

- Follow language-specific style guides (rustfmt, gofmt, PEP8)
- Write comprehensive tests for new features
- Document all public APIs and complex logic
- Keep pull requests focused and small
- Use clear and descriptive commit messages

### Testing Requirements

# Run all tests make test # Run with coverage make test-coverage # Run integration tests make test-integration # Run benchmarks make benchmark

### Code Review Process

- All changes require review
- At least one approval needed
- CI must pass
- Documentation updated
- Tests added/updated

Pro Tip: Join our Discord #dev channel for real-time help and discussions!

## Bounties & Grants

Get paid to contribute to AITBC!

### Open Bounties

- $500 - Implement REST API rate limiting
- $750 - Add Python async SDK support
- $1000 - Optimize ZK proof generation
- $1500 - Implement cross-chain bridge
- $2000 - Build mobile wallet app

### Research Grants

- $5000 - Novel consensus mechanisms
- $7500 - Privacy-preserving ML
- $10000 - Quantum-resistant cryptography

### How to Apply

1. Check open issues on Gitea
2. Comment on the issue you want to work on
3. Submit your solution
4. Get reviewed by core team
5. Receive payment in AITBC tokens

New Contributor Bonus: First-time contributors get a 20% bonus on their first bounty!

## Join the Community

### Developer Channels

- Discord #dev - General development discussion
- Discord #core-dev - Core protocol discussions
- Discord #bounties - Bounty program updates
- Discord #research - Research discussions

### Events & Programs

- Weekly Dev Calls - Every Tuesday 14:00 UTC
- Hackathons - Quarterly with prizes
- Office Hours - Meet the core team
- Mentorship Program - Learn from experienced devs

### Recognition

- Top contributors featured on website
- Monthly contributor rewards
- Special Discord roles
- Annual developer summit invitation
- Swag and merchandise

## Developer Resources

### Documentation

- Full API Documentation
- Architecture Guide
- Protocol Specification
- Security Best Practices

### Tools & SDKs

- Python SDK
- JavaScript SDK
- Go SDK
- Rust SDK
- CLI Tools

### Development Environment

- Docker Compose Setup
- Local Testnet
- Faucet for Test Tokens
- Block Explorer

### Learning Resources

- Video Tutorials
- Workshop Materials
- Blog Posts
- Research Papers

## Example: Adding a New API Endpoint

The coordinator-api uses Python with FastAPI. Here's how to add a new endpoint:

### 1. Define the Schema

# File: coordinator-api/src/app/schemas.py from pydantic import BaseModel from typing import Optional class NewFeatureRequest(BaseModel): """Request model for new feature.""" name: str value: int options: Optional[dict] = None class NewFeatureResponse(BaseModel): """Response model for new feature.""" id: str status: str result: dict

### 2. Create the Router

# File: coordinator-api/src/app/routers/new_feature.py from fastapi import APIRouter, Depends, HTTPException from ..schemas import NewFeatureRequest, NewFeatureResponse from ..services.new_feature import NewFeatureService router = APIRouter(prefix="/v1/features", tags=["features"]) @router.post("/", response_model=NewFeatureResponse) async def create_feature( request: NewFeatureRequest, service: NewFeatureService = Depends() ): """Create a new feature.""" try: result = await service.process(request) return NewFeatureResponse( id=result.id, status="success", result=result.data ) except ValueError as e: raise HTTPException(status_code=400, detail=str(e))

### 3. Write Tests

# File: coordinator-api/tests/test_new_feature.py import pytest from fastapi.testclient import TestClient from src.app.main import app client = TestClient(app) def test_create_feature_success(): """Test successful feature creation.""" response = client.post( "/v1/features/", json={"name": "test", "value": 123} ) assert response.status_code == 200 data = response.json() assert data["status"] == "success" assert "id" in data def test_create_feature_invalid(): """Test validation error.""" response = client.post( "/v1/features/", json={"name": ""} # Missing required field ) assert response.status_code == 422
💡 Pro Tip: Run `make test` locally before pushing. The CI pipeline will also run all tests automatically on your PR.

## Frequently Asked Questions

### General

- How do I start contributing? - Check our "Getting Started" guide and pick an issue that interests you.
- Do I need to sign anything? - Yes, you'll need to sign our CLA (Contributor License Agreement).
- Can I be paid for contributions? - Yes! Check our bounty program or apply for grants.

### Technical

- What's the tech stack? - Rust for blockchain, Go for services, Python for AI, TypeScript for frontend.
- How do I run tests? - Use `make test` or check specific component documentation.
- Where can I ask questions? - Discord #dev channel is the best place.

### Process

- How long does PR review take? - Usually 1-3 business days.
- Can I work on multiple issues? - Yes, but keep PRs focused on single features.
- What if my PR is rejected? - We'll provide feedback and guidance for resubmission.