Amigos Technical Architecture & Development Plan
Modular development approach with clear interfaces and parallel team workstreams.
flowchart LR
subgraph Compute["Compute"]
VMInterface["VMInterface"]
VMPoC["VMPoC"]
VMOptimizations["VMOptimizations"]
VMNewFeatures["VMNewFeatures"]
GobuildPoC
end
subgraph local["local"]
LocalPoC["LocalPoC"]
NetworkInterface["NetworkInterface"]
ClientPoC["ClientPoC"]
Amigoweb["Amigoweb"]
end
subgraph paas["paas"]
PaasSimplePoC["PaasSimplePoC"]
PaasProduct["PaasProduct"]
PaasClient["PaasClientDriver"]
DeterministicPaasPoC
end
subgraph chain["chain"]
ChainSimplePoC["ChainSimplePoC"]
ChainProduct["ChainProduct"]
ChainKit["ChainKit"]
ChainClient["ChainClientDriver"]
end
subgraph internet["internet"]
InternetPoC["InternetPoC"]
InternetInterface["InternetInterface"]
P2PNodePoC["P2PNodePoC"]
AmigoEcosystem["AmigoEcosystem"]
end
subgraph dogfooding
ChainProduct --> Oracles
PaasProduct --> Oracles
ChainSimplePoC --> Dex
end
VMPoC --> VMInterface & VMOptimizations & VMNewFeatures & GobuildPoC
GobuildPoC --> PaasSimplePoC
DeterministicPaasPoC
VMInterface --> LocalPoC
LocalPoC --> NetworkInterface
NetworkInterface --> ClientPoC & Amigoweb & PaasSimplePoC & ChainSimplePoC & InternetPoC
PaasSimplePoC --> PaasProduct
ChainSimplePoC --> ChainProduct & ChainKit & ChainClient
ClientPoC --> ChainClient & PaasClient
InternetPoC --> InternetInterface
InternetInterface --> P2PNodePoC & AmigoEcosystem
ChainKit --> AmigoEcosystem
Core Architecture Overview
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Client CLI │ │ Web Explorer │ │ Applications │
│ (amigo cmd) │ │ (browser) │ │ (3rd party) │
└─────────┬───────┘ └─────────┬───────┘ └─────────┬───────┘
│ │ │
└──────────────────────┼──────────────────────┘
│
┌─────────────▼───────────────┐
│ Network Interface │
│ (standardized API) │
└─────────────┬───────────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
┌───────▼────────┐ ┌─────────▼──────────┐ ┌───────▼────────┐
│ Local/Dev Mode │ │ Web2 PaaS Mode │ │ Blockchain Mode │
│ (localhost DB) │ │ (cluster + auth) │ │ (Tendermint + │
│ │ │ │ │ crypto auth) │
└────────────────┘ └────────────────────┘ └────────────────┘
│ │ │
└───────────────────────┼────────────────────────┘
│
┌──────────▼──────────┐
│ VM Core │
│ (execution + │
│ state store) │
└─────────────────────┘
Team Structure & Component Mapping
Team 1: Compute Infrastructure
Focus: VM Core, execution engine, and build tooling
Corresponds to: Compute subgraph in architecture
Deliverables:
- VMPoC: Proof of concept virtual machine
- VMInterface: Standardized VM API for all network providers
- VMOptimizations: Performance improvements and formal verification
- VMNewFeatures: Import system, advanced state management
- GobuildPoC: Go-to-Amigos transpilation and build tools
Key Dependencies:
- VMPoC → VMInterface, VMOptimizations, VMNewFeatures, GobuildPoC
- GobuildPoC → PaasSimplePoC (enables PaaS deployment)
Team 2: Local Development Environment
Focus: Local backend, network interface, and web tooling
Corresponds to: local subgraph in architecture
Deliverables:
- LocalPoC: SQLite-based local development server
- NetworkInterface: Universal API abstraction for all providers
- ClientPoC: CLI tool proof of concept
- Amigoweb: Web-based contract explorer and development UI
Key Dependencies:
- VMInterface → LocalPoC
- LocalPoC → NetworkInterface
- NetworkInterface → All other network providers
Team 3: PaaS Platform
Focus: Web2 cloud deployment and enterprise features
Corresponds to: paas subgraph in architecture
Deliverables:
- PaasSimplePoC: Basic cloud deployment with traditional auth
- PaasProduct: Production-grade PaaS with auto-scaling
- PaasClientDriver: PaaS-specific CLI integration
- DeterministicPaasPoC: Deterministic execution for hybrid apps
Key Dependencies:
- NetworkInterface → PaasSimplePoC
- GobuildPoC → PaasSimplePoC (Go transpilation)
- PaasSimplePoC → PaasProduct
- ClientPoC → PaasClientDriver
Team 4: Blockchain Infrastructure
Focus: Blockchain deployment and crypto authentication
Corresponds to: chain subgraph in architecture
Deliverables:
- ChainSimplePoC: Basic Tendermint blockchain
- ChainProduct: Production blockchain with governance
- ChainKit: SDK for blockchain-managed components
- ChainClientDriver: Blockchain-specific CLI integration
Key Dependencies:
- NetworkInterface → ChainSimplePoC
- ChainSimplePoC → ChainProduct, ChainKit, ChainClientDriver
- ClientPoC → ChainClientDriver
- ChainKit → AmigoEcosystem
Team 5: Internet & P2P Infrastructure
Focus: Distributed networking and ecosystem coordination
Corresponds to: internet subgraph in architecture
Deliverables:
- InternetPoC: Basic P2P networking proof of concept
- InternetInterface: Standardized P2P communication layer
- P2PNodePoC: Decentralized node discovery and routing
- AmigoEcosystem: Cross-network service registry and governance
Key Dependencies:
- NetworkInterface → InternetPoC
- InternetPoC → InternetInterface
- InternetInterface → P2PNodePoC, AmigoEcosystem
Dogfooding Applications
Real-world applications built on the platform
Early Applications:
- Oracles: Data feeds powered by ChainProduct and PaasProduct
- Dex: Decentralized exchange built on ChainSimplePoC
- Additional apps: Forum, wiki, payment gateway, social features
Purpose:
- Validate platform capabilities with real applications
- Identify missing features and performance bottlenecks
- Demonstrate hybrid multi-network application patterns
- Generate revenue and attract developers
Key Architectural Insights
Critical Path Dependencies
The Mermaid diagram reveals the true dependency flow:
- VM Foundation: Everything starts with VMPoC → VMInterface
- Network Abstraction: NetworkInterface is the universal hub connecting all providers
- Parallel Development: Once NetworkInterface is stable, teams can work independently
- Build Tooling: GobuildPoC enables PaaS deployment with Go transpilation
- Ecosystem Convergence: ChainKit and InternetInterface both feed into AmigoEcosystem
Client Driver Pattern
Each network type gets its own specialized client driver:
- PaasClientDriver: Handles OAuth, cloud-specific features
- ChainClientDriver: Manages crypto signatures, wallet integration
- Base ClientPoC: Provides common CLI functionality
This pattern allows network-specific optimizations while maintaining unified UX.
Deterministic Execution Strategy
DeterministicPaasPoC is crucial for hybrid applications that need:
- Reproducible execution across Web2 and Web3 environments
- State consistency when migrating between networks
- Formal verification compatibility
Dogfooding as Development Driver
Real applications (Oracles, Dex) drive platform evolution:
- Oracles need both ChainProduct and PaasProduct integration
- Dex requires ChainSimplePoC for trading infrastructure
- Applications reveal missing NetworkInterface features
- Revenue generation funds continued development
Internet Layer Vision
The Internet subgraph represents the long-term vision:
- P2P networking eliminates centralized bottlenecks
- AmigoEcosystem becomes truly decentralized service registry
- Cross-network communication without relying on specific blockchains
Development Phases
Phase 1: Foundation (Months 1-3)
Goal: Working local development environment
Parallel Workstreams:
- Team 1: VM Core with basic contract support
- Team 2: Local HTTP API and basic web explorer
- Team 3: CLI for local network interaction
Success Criteria:
- Deploy and execute simple Go contracts locally
- Web-based contract explorer working
- CLI can push/call contracts via HTTP
Phase 2: Blockchain Integration (Months 3-6)
Goal: Production blockchain with crypto authentication
Parallel Workstreams:
- Team 1: VM optimizations and import system
- Team 4: Blockchain implementation and crypto auth
- Team 3: CLI support for blockchain networks
Success Criteria:
- Testnet running with validator set
- Wallet-based contract deployment
- Cross-network CLI functionality
Phase 3: Production Scaling (Months 6-12)
Goal: Web2 PaaS and enterprise features
Parallel Workstreams:
- Team 5: Web2 PaaS with traditional auth
- Team 2: Advanced web explorer features
- Team 4: Mainnet launch and governance
Success Criteria:
- Scalable cloud platform operational
- Enterprise authentication integration
- Mainnet with economic incentives
Interface Dependencies
VM Core → Network Providers
// VM provides execution, Network handles deployment
vm := NewVM()
network := NewLocalProvider() // or BlockchainProvider, PaaSProvider
network.SetVM(vm)
CLI → Network Interface
// CLI is network-agnostic through standardized interface
client := NewAmigoClient(networkProvider)
client.Push("./contract", "hello")
client.Call("hello.Greet", []string{"world"})
Cross-Team Integration
- Team 1 + 2: VM integration with HTTP layer
- Team 2 + 3: Network interface standardization
- Team 3 + 4: CLI crypto authentication
- Team 4 + 5: Shared authentication patterns
Success Metrics
Technical KPIs
- Contract Execution: < 100ms average response time
- Developer Onboarding: < 5 minutes from install to first contract
- Network Compatibility: Same contract runs across all providers
- CLI Usability: Docker-like familiarity for Go developers
Development KPIs
- Team Velocity: Weekly deployable increments
- Interface Stability: Minimal breaking changes between teams
- Testing Coverage: > 90% unit test coverage for VM core
- Cross-Team Integration: Continuous integration across interfaces
Technology Stack
Core Technologies
- Language: Go for all components
- Storage: SQLite (local), PostgreSQL (PaaS), Tendermint (blockchain)
- HTTP: Standard REST APIs with JSON
- CLI: Cobra framework (like Docker/kubectl)
Blockchain Stack
- Consensus: Tendermint Core
- SDK: Cosmos SDK
- Crypto: secp256k1, ed25519
- Transport: gRPC, HTTP/2
Web2 Stack
- Container: Docker + Kubernetes
- Load Balancer: nginx/envoy
- Auth: OAuth2, JWT tokens
- Monitoring: Prometheus + Grafana
Risk Mitigation
Interface Stability
- API Versioning: Semantic versioning for all interfaces
- Backward Compatibility: Maintain old versions during transitions
- Documentation: Comprehensive API docs and examples
Team Coordination
- Weekly Demos: Cross-team integration showcases
- Shared Testing: Integration tests across team boundaries
- Interface Contracts: Formal specifications for all APIs
Technical Risks
- VM Performance: Benchmark-driven optimization
- Network Reliability: Comprehensive error handling and retries
- Authentication Security: Security audits for all auth mechanisms