# Architecture Summary

## Overview

BitMind operates as a distributed AI content detection platform with multiple interconnected components working together to provide accurate, scalable, and privacy-compliant deepfake detection services.

## Architecture

### Architecture Flow

The BitMind platform operates through five interconnected layers:

1. **User Layer**: Multi-platform interfaces (web, mobile, browser extension, enterprise clients) provide seamless access
2. **API Gateway**: Routes requests through specialized endpoints for platform, subnet, and enterprise operations
3. **Infrastructure**: Leverages Modal for ML inference, Supabase for data management, and Cloudflare for global distribution
4. **Bittensor Network**: Powers decentralized AI with Subnet 34 for fraud detection, distributed miners, and validator nodes
5. **Storage Layer**: Manages models and datasets across R2, Modal Volumes, and HuggingFace repositories

## Core Components

### 1. AI Infrastructure (Bittensor Subnet 34)

**Purpose**: Decentralized AI (DeAI) network that realizes a continuous, dynamic, incentivized competition for producing accurate detection models and novel, high-signal training data.

**Architecture**:

* **Detection Miners**: Submit packaged models (no live endpoints) for validator-side evaluation on curated benchmarks
* **Generation Miners**: Adversarially generate high-signal synthetic media that evolves the benchmark
* **Validators**: Evaluate submitted models locally, track benchmark versions, and distribute rewards based on measured performance
* **Adversarial Loop**: Generators push realism; discriminators improve detection — both co-evolve under aligned incentives
* **Model Management**: Automated submission, testing, and deployment flows

**Key Features**:

* Fully-generalized detection (works across different generative AI models)
* Continuous evolution with new generative AI
* Economic incentives for high-quality models
* Centralized evaluation inside validators improves privacy, determinism, and reproducibility
* Open, renewable training data via shared public corpus

### 2. Infrastructure Services

| Platform                                           | ML Inference                        | API Cloud Services                           |
| -------------------------------------------------- | ----------------------------------- | -------------------------------------------- |
| Admin at [app.bitmind.ai](https://app.bitmind.ai/) | High-performance ONNX inference     | Public API layer exposing endpoints to users |
| Developer dashboard and miner performance stats    | Cost-efficient model serving        | Image and video detection                    |
| API key management and usage analytics             | Smart GPU cache with auto-recovery  | Video preprocessing and segmentation         |
| Account administration and billing                 | Processing for efficiency           | C2PA integration for content provenance      |
| Integration with Bittensor ecosystem               | Security validation for ONNX models | High-throughput processing                   |

### 3. API Services

**Purpose**: Detection interfaces for consumer and enterprise workloads.

**Architecture**:

* **Subnet API** (`api.bitmind.ai`): Image and video detection with analytics, caching, and storage
* **Enterprise API** (`enterprise.bitmind.ai`): Same detection pipeline with zero data retention
* **Security**: API key auth, per-client rate limiting, Redis-backed quota tracking

**Key Features**:

* Zero data retention (enterprise)
* C2PA content credential extraction
* Similarity matching against known AI content
* Enterprise compliance (GDPR-ready)

### 4. Consumer Applications

**Purpose**: End-user experiences for fast, trustworthy deepfake detection.

**Architecture**:

* **Mobile (iOS/Android)**: Native apps for camera/gallery input
* **Web (bitmind.ai)**: Uploads, URL-based analysis, direct image address
* **Browser Extension**: On-page scanning and one-click verification across major sites

**Key Features**:

* Instant detection UX (mobile/web)
* URL/direct-address analysis (web)
* Privacy-first design (extension)
* Push notifications and usage insights (mobile)

## Architectural Highlights

### Detection Capabilities

* **Multi-Modal**: Images and videos
* **Real-Time**: Sub-second inference for images
* **Accuracy**: State-of-the-art detection performance
* **Adversarial Benchmarking**: Continuous refresh from generator submissions to surface new edge cases

### Privacy & Compliance

* **Zero Data Retention**: No input data stored (enterprise)
* **GDPR Compliant**: Zero data retention aligns with data minimization
* **SOC2**: Via Modal infrastructure ([details](https://modal.com/blog/soc2type2))
* **Reproducible Evaluation**: Results pinned to benchmark versions and model hashes

### Scalability

* **Horizontal Scaling**: Auto-scaling via Modal infrastructure
* **Global CDN**: Low-latency worldwide access via Cloudflare
* **Load Balancing**: High availability across regions


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitmind.ai/architecture-summary.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
