|
| 1 | +# TerraQura Documentation |
| 2 | + |
| 3 | +> Institutional-Grade Carbon Asset Platform with Proof-of-Physics Verification on the Aethelred Network. |
| 4 | +
|
| 5 | +--- |
| 6 | + |
| 7 | +## Quick Navigation |
| 8 | + |
| 9 | +| Section | Description | Link | |
| 10 | +|---------|-------------|------| |
| 11 | +| Architecture | System design, data flow, monorepo structure | [architecture/](architecture/) | |
| 12 | +| API Reference | REST API endpoints, authentication, webhooks | [api/](api/) | |
| 13 | +| Smart Contracts | 25 Solidity contracts, roles, upgrade process | [contracts/](contracts/) | |
| 14 | +| Compliance | ADGM, ITMO/Article 6, KYC tiers, data residency | [compliance/](compliance/) | |
| 15 | +| Disaster Recovery | RTO/RPO targets, failover procedures | [DISASTER_RECOVERY.md](DISASTER_RECOVERY.md) | |
| 16 | +| Gas Optimization | Contract gas benchmarks and optimization notes | [GAS_OPTIMIZATION_REVIEW.md](GAS_OPTIMIZATION_REVIEW.md) | |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Overview |
| 21 | + |
| 22 | +TerraQura is a full-stack, institutional-grade carbon credit platform built on **Aethelred** -- a sovereign Layer 1 EVM chain optimised for verifiable AI computation. The platform enables the complete carbon credit lifecycle: |
| 23 | + |
| 24 | +1. **Capture** -- Direct Air Capture (DAC) units report real-time telemetry via the NativeIoT Oracle. |
| 25 | +2. **Verify** -- A 3-phase Proof-of-Physics pipeline (source check, logic check, mint check) validates sensor data against on-chain thresholds. |
| 26 | +3. **Mint** -- Verified capture periods produce ERC-1155 carbon credits with immutable provenance metadata stored on IPFS/Arweave. |
| 27 | +4. **Trade** -- Credits are traded on a P2P marketplace with batch auctions, AMM liquidity pools, fractional credit support, and gasless meta-transactions. |
| 28 | +5. **Retire** -- Credits are permanently retired on-chain, producing retirement certificates linked to the ITMO registry for Article 6 compliance. |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## Platform Status |
| 33 | + |
| 34 | +| Metric | Value | |
| 35 | +|--------|-------| |
| 36 | +| Smart contracts | 25 (Solidity 0.8.28, UUPS upgradeable) | |
| 37 | +| Test coverage | 881+ tests passing across all layers | |
| 38 | +| Dashboard pages | 8 operational | |
| 39 | +| Deployment target | Aethelred Testnet (pre-mainnet) | |
| 40 | +| License | Apache 2.0 | |
| 41 | + |
| 42 | +--- |
| 43 | + |
| 44 | +## Repository Structure |
| 45 | + |
| 46 | +``` |
| 47 | +terraqura/ |
| 48 | + apps/ |
| 49 | + api/ Fastify REST API (TypeScript) |
| 50 | + web/ Next.js 16 frontend (React 19) |
| 51 | + contracts/ Solidity smart contracts (Hardhat) |
| 52 | + worker/ BullMQ background job workers |
| 53 | + docs/ Docusaurus documentation site |
| 54 | + analytics/ Python analytics service |
| 55 | + verifier/ Rust verification service |
| 56 | + indexer/ Go blockchain indexer |
| 57 | + packages/ |
| 58 | + config/ Shared ESLint and TypeScript configs |
| 59 | + contract-types/ Generated TypeChain typings |
| 60 | + database/ Drizzle ORM schema and migrations |
| 61 | + monitoring/ Prometheus metrics and alerting |
| 62 | + queue/ BullMQ queue definitions |
| 63 | + sdk/ Client SDK |
| 64 | + subgraph/ The Graph subgraph definitions |
| 65 | + types/ Shared TypeScript type definitions |
| 66 | + infrastructure/ Docker, Kubernetes, CI/CD manifests |
| 67 | + docs/ Project documentation (this directory) |
| 68 | +``` |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## Getting Started |
| 73 | + |
| 74 | +Refer to the root [README](../README.md) for quick-start instructions, environment setup, and development workflow. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Contributing |
| 79 | + |
| 80 | +See [CONTRIBUTING.md](../CONTRIBUTING.md) for contribution guidelines, branch naming conventions, and pull request requirements. |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +## Security |
| 85 | + |
| 86 | +For security reports and the responsible disclosure policy, see [SECURITY.md](../SECURITY.md). |
0 commit comments