refactor: consolidate blockchain explorer into single app and update backup ignore patterns

- Remove standalone explorer-web app (README, HTML, package files)
- Add /web endpoint to blockchain-explorer for web interface access
- Update .gitignore to exclude application backup archives (*.tar.gz, *.zip)
- Add backup documentation files to .gitignore (BACKUP_INDEX.md, README.md)
- Consolidate explorer functionality into main blockchain-explorer application
This commit is contained in:
oib
2026-03-06 18:14:49 +01:00
parent dc1561d457
commit bb5363bebc
295 changed files with 35501 additions and 3734 deletions

View File

@@ -2,7 +2,7 @@
This document describes the current organization and status of files and folders in the repository.
Last updated: 2026-03-04
Last updated: 2026-03-06
---
@@ -13,11 +13,10 @@ Last updated: 2026-03-04
| Path | Status | Notes |
|------|--------|-------|
| `apps/coordinator-api/` | ✅ Active | Main API service, standardized (Mar 2026) |
| `apps/explorer-web/` | ✅ Active | Blockchain explorer, recently updated |
| `apps/blockchain-explorer/` | ✅ Active | Agent-first blockchain explorer, recently optimized (Mar 2026) |
| `apps/blockchain-node/` | ✅ Active | Blockchain node, standardized (Mar 2026) |
| `apps/trade-exchange/` | ✅ Active | Bitcoin exchange, deployed |
| `apps/marketplace-web/` | ✅ Active | Marketplace frontend, deployed |
| `apps/blockchain-explorer/` | ✅ Active | Blockchain explorer UI, standardized (Mar 2026) |
| `apps/coordinator-api/src/app/domain/gpu_marketplace.py` | ✅ Active | GPURegistry, GPUBooking, GPUReview SQLModel tables (Feb 2026) |
| `apps/coordinator-api/tests/test_gpu_marketplace.py` | ✅ Active | 22 GPU marketplace tests (Feb 2026) |
| `apps/coordinator-api/tests/test_billing.py` | ✅ Active | 21 billing/usage-tracking tests (Feb 2026) |
@@ -125,6 +124,7 @@ Last updated: 2026-03-04
| Path | Status | Notes |
|------|--------|-------|
| `dev/` | ✅ Active | Development environment (reorganized, Mar 2026) |
| `dev/cli/` | ✅ Active | CLI development environment (moved from cli-dev, Mar 2026) |
| `dev/scripts/` | ✅ Active | Development scripts (79 Python files) |
| `dev/cache/` | ✅ Active | Development cache files |
| `dev/env/` | ✅ Active | Environment configurations |
@@ -158,6 +158,14 @@ Last updated: 2026-03-04
| `CLEANUP_SUMMARY.md` | ✅ Active | Documentation of directory cleanup |
| `test_block_import.py` | ✅ Resolved | Moved to `tests/verification/test_block_import.py` |
### Backup Directory (`backup/`)
| Path | Status | Notes |
|------|--------|-------|
| `backup/` | ✅ Active | Backup archive storage (organized, Mar 2026) |
| `backup/explorer_backup_20260306_162316.tar.gz` | ✅ Active | Explorer TypeScript source backup (15.2 MB) |
| `backup/BACKUP_INDEX.md` | ✅ Active | Backup inventory and restoration instructions |
---
### Blockchain Node (`apps/blockchain-node/`)
@@ -221,12 +229,13 @@ These empty folders are intentional scaffolding for planned future work per the
| Category | Count | Status |
|----------|-------|--------|
| **Whitelist ✅** | ~80 items | Active and maintained (Mar 2026) |
| **Whitelist ✅** | ~85 items | Active and maintained (Mar 2026) |
| **Placeholders 📋** | 12 folders | All complete (Stage 19) |
| **Standardized Services** | 19+ services | 100% standardized (Mar 2026) |
| **Development Scripts** | 79 files | Organized in dev/scripts/ (Mar 2026) |
| **Deployment Scripts** | 35 files | Organized in scripts/deploy/ (Mar 2026) |
| **Documentation Files** | 200+ files | Updated and current (Mar 2026) |
| **Backup Archives** | 1+ files | Organized in backup/ (Mar 2026) |
| **Debug prints** | 17 statements | Replace with logger |
## Recent Major Updates (March 2026)
@@ -250,6 +259,18 @@ These empty folders are intentional scaffolding for planned future work per the
- **Workflows documented** for repeatable processes
- **File organization prevention** system implemented
### ✅ CLI Development Environment Optimization (March 6, 2026)
- **CLI development tools** moved from `cli-dev` to `dev/cli`
- **Centralized development** environment in unified `/dev/` structure
- **Improved project organization** with reduced root-level clutter
- **Backup system** implemented with proper git exclusion
### ✅ Explorer Architecture Simplification (March 6, 2026)
- **TypeScript explorer** merged into Python blockchain-explorer
- **Agent-first architecture** strengthened with single service
- **Source code deleted** with proper backup (15.2 MB archive)
- **Documentation updated** across all reference files
---
## Folder Structure Recommendation
@@ -267,11 +288,15 @@ aitbc/
├── cli/ # ✅ CLI tools
├── contracts/ # ✅ Smart contracts
├── dev/ # ✅ Development environment (Mar 2026)
│ ├── cli/ # ✅ CLI development environment (moved Mar 2026)
│ ├── scripts/ # Development scripts (79 files)
│ ├── cache/ # Development cache
│ ├── env/ # Environment configs
│ ├── multi-chain/ # Multi-chain files
│ └── tests/ # Development tests
├── backup/ # ✅ Backup archive storage (Mar 2026)
│ ├── explorer_backup_*.tar.gz # Application backups
│ └── BACKUP_INDEX.md # Backup inventory
├── docs/ # ✅ Numbered documentation structure
│ ├── infrastructure/ # ✅ Infrastructure docs (Mar 2026)
│ ├── 0_getting_started/ # Getting started guides
@@ -314,5 +339,8 @@ This structure represents the current clean state of the AITBC repository with a
- **Enhanced documentation** with comprehensive infrastructure guides
- **Automated verification tools** for maintaining standards
- **Production-ready infrastructure** with all services operational
- **Optimized CLI development** with centralized dev/cli environment
- **Agent-first architecture** with simplified explorer service
- **Comprehensive backup system** with proper git exclusion
**Note**: Redundant `apps/logs/` directory removed - central `logs/` directory at root level is used for all logging. Redundant `assets/` directory removed - Firefox extension assets are properly organized in `extensions/aitbc-wallet-firefox/`.
**Note**: Redundant `apps/logs/` directory removed - central `logs/` directory at root level is used for all logging. Redundant `assets/` directory removed - Firefox extension assets are properly organized in `extensions/aitbc-wallet-firefox/`. CLI development environment moved from `cli-dev` to `dev/cli` for better organization. Explorer TypeScript source merged into Python service and backed up.

View File

@@ -153,11 +153,11 @@ This roadmap aggregates high-priority tasks derived from the bootstrap specifica
- ✅ Validate live mode against coordinator `/v1/marketplace/*` responses and add auth feature flags for rollout.
- ✅ Deploy to production at https://aitbc.bubuit.net/marketplace/
- **Explorer Web**
- ✅ Initialize Vite + TypeScript project scaffold (`apps/explorer-web/`).
- ✅ Add routed pages for overview, blocks, transactions, addresses, receipts.
-Seed mock datasets (`public/mock/`) and fetch helpers powering overview + blocks tables.
-Extend mock integrations to transactions, addresses, and receipts pages.
- **Blockchain Explorer**
- ✅ Initialize Python FastAPI blockchain explorer (`apps/blockchain-explorer/`).
- ✅ Add built-in HTML interface with complete API endpoints.
-Implement real-time blockchain data integration and search functionality.
-Merge TypeScript frontend and delete source for agent-first architecture.
- ✅ Implement styling system, mock/live data toggle, and coordinator API wiring scaffold.
- ✅ Render overview stats from mock block/transaction/receipt summaries with graceful empty-state fallbacks.
- ✅ Validate live mode + responsive polish:
@@ -212,6 +212,9 @@ This roadmap aggregates high-priority tasks derived from the bootstrap specifica
- ✅ Prototype cross-chain settlement hooks leveraging external bridges; document integration patterns.
- ✅ Extend SDKs (Python/JS) with pluggable transport abstractions for multi-network support.
- ✅ Evaluate third-party explorer/analytics integrations and publish partner onboarding guides.
-**COMPLETE**: Implement comprehensive cross-chain trading with atomic swaps and bridging
-**COMPLETE**: Add CLI cross-chain commands for seamless multi-chain operations
-**COMPLETE**: Deploy cross-chain exchange API with real-time rate calculation
- **Marketplace Growth**
- ✅ Launch AI agent marketplace with GPU acceleration and enterprise scaling

View File

@@ -65,7 +65,7 @@ Internet → aitbc.bubuit.net (HTTPS :443)
- **Port 8013**: Adaptive Learning Service ✅ PRODUCTION READY
- **Port 8014**: Marketplace Enhanced Service ✅ PRODUCTION READY
- **Port 8015**: OpenClaw Enhanced Service ✅ PRODUCTION READY
- **Port 8016**: Web UI Service ✅ PRODUCTION READY
- **Port 8016**: Blockchain Explorer Service ✅ PRODUCTION READY (agent-first unified interface - TypeScript merged and deleted)
- **Port 8017**: Geographic Load Balancer ✅ PRODUCTION READY
### **Mock & Test Services (8020-8029)**
@@ -151,7 +151,6 @@ On at1, `/opt/aitbc` uses individual symlinks to the Windsurf project directorie
│ ├── blockchain-explorer -> /home/oib/windsurf/aitbc/apps/blockchain-explorer/
│ ├── blockchain-node -> /home/oib/windsurf/aitbc/apps/blockchain-node/
│ ├── coordinator-api -> /home/oib/windsurf/aitbc/apps/coordinator-api/
│ ├── explorer-web -> /home/oib/windsurf/aitbc/apps/explorer-web/
│ ├── marketplace-web -> /home/oib/windsurf/aitbc/apps/marketplace-web/
│ ├── pool-hub -> /home/oib/windsurf/aitbc/apps/pool-hub/
│ ├── trade-exchange -> /home/oib/windsurf/aitbc/apps/trade-exchange/
@@ -283,9 +282,12 @@ ssh aitbc-cascade # Direct SSH to container
**Port Logic Breakdown:**
- **8000**: Coordinator API (main API gateway)
- **8001**: Exchange API (Bitcoin exchange operations)
- **8001**: Cross-Chain Exchange API (Multi-chain trading operations)
- **8002**: Blockchain Node (P2P node service)
- **8003**: Blockchain RPC (JSON-RPC interface)
- **8007**: Blockchain Service (Transaction processing and consensus)
- **8008**: Network Service (P2P block propagation)
- **8016**: Blockchain Explorer (Data aggregation and web interface)
- **8010**: Multimodal GPU (AI processing)
- **8011**: GPU Multimodal (multi-modal AI)
- **8012**: Modality Optimization (AI optimization)
@@ -581,8 +583,8 @@ curl http://aitbc.keisanki.net/rpc/head # Node 3 RPC (port 8003)
# Push website files
scp -r website/* aitbc-cascade:/var/www/aitbc.bubuit.net/
# Push app updates
scp -r apps/explorer-web/dist/* aitbc-cascade:/var/www/aitbc.bubuit.net/explorer/
# Push app updates (blockchain-explorer serves its own interface)
# No separate deployment needed - blockchain-explorer handles both API and UI
# Restart a service
ssh aitbc-cascade "systemctl restart coordinator-api"

View File

@@ -47,6 +47,27 @@ This document tracks components that have been successfully deployed and are ope
- **Circuit Registry**: 3 circuit types with performance metrics and feature flags
- **Production Deployment**: Full ZK workflow operational (compilation → witness → proof generation → verification)
-**Cross-Chain Trading Exchange** - Deployed March 6, 2026
- **Complete Cross-Chain Exchange API** (Port 8001) with atomic swaps and bridging
- **Multi-Chain Database Schema** with chain isolation for orders, trades, and swaps
- **Real-Time Exchange Rate Calculation** with liquidity pool management
- **CLI Integration** with comprehensive cross-chain commands (`aitbc cross-chain`)
- **Security Features**: Slippage protection, atomic execution, automatic refunds
- **Supported Chains**: ait-devnet ↔ ait-testnet with easy expansion capability
- **Fee Structure**: Transparent 0.3% total fee (0.1% bridge + 0.1% swap + 0.1% liquidity)
- **API Endpoints**:
- `/api/v1/cross-chain/swap` - Create cross-chain swaps
- `/api/v1/cross-chain/bridge` - Create bridge transactions
- `/api/v1/cross-chain/rates` - Get exchange rates
- `/api/v1/cross-chain/pools` - View liquidity pools
- `/api/v1/cross-chain/stats` - Trading statistics
- **CLI Commands**:
- `aitbc cross-chain swap` - Create swaps with slippage protection
- `aitbc cross-chain bridge` - Bridge tokens between chains
- `aitbc cross-chain status` - Monitor transaction status
- `aitbc cross-chain rates` - Check exchange rates
- **Production Status**: Fully operational with background processing and monitoring
-**Enhanced AI Agent Services Deployment** - Deployed February 2026
- **6 New Services**: Multi-Modal Agent (8002), GPU Multi-Modal (8003), Modality Optimization (8004), Adaptive Learning (8005), Enhanced Marketplace (8006), OpenClaw Enhanced (8007)
- **Complete CLI Tools**: 50+ commands across 5 command groups with full test coverage

View File

@@ -678,7 +678,7 @@ sudo systemctl start aitbc-*.service
- **Services**: 26 services across 3 sites
### 🛠️ **CLI Development Environment**
- **Development Directory**: `/home/oib/windsurf/aitbc/cli-dev`
- **Development Directory**: `/home/oib/windsurf/aitbc/dev/cli`
- **Testing Infrastructure**: Complete
- **Mock Server**: Implemented
- **Documentation**: Comprehensive