Technology Stack Decisions
Core Philosophy: Infrastructure for Global Commerce Revolution
Plings technology choices are driven by one primary goal: enabling every physical object to become an autonomous commerce endpoint. This revolutionary requirement shaped every architectural decision, prioritizing:
- Payment Infrastructure Integration: HD wallet → Solana address mapping
- Global Scale: Handle Visa/Mastercard transaction volumes (600K+ TPS with Firedancer)
- Offline Capability: Objects must verify authenticity without network
- Economic Efficiency: Minimal fees to enable $1 candy bar purchases
1. Blockchain Foundation: Solana
Why Solana Instead of Ethereum/Bitcoin?
Core Requirement: Every Plings identifier must be a native blockchain address capable of receiving payments.
| Blockchain | Transaction Fee | Confirmation Time | TPS | NFT Support | HD Wallet Integration | Verdict |
|---|---|---|---|---|---|---|
| Solana | $0.00025 | 400ms | 4,500 (600K w/ Firedancer) | Native (Metaplex) | Ed25519 + PDAs | ✅ CHOSEN |
| Ethereum | $5-50 | 12 seconds | 15 | ERC-721/1155 | Requires proxy contracts | ❌ Too expensive |
| Bitcoin | $1-20 | 10 minutes | 7 | None | Limited smart contracts | ❌ Not suitable |
| Cardano | $0.30 | 20 seconds | 250 | Native | UTXO compatibility | ⚠️ Too slow for retail |
Decision: Solana enables universal cost structure - same infrastructure for $1 candy bars and $50M corporate jets.
Program Derived Addresses (PDAs) - The Security Breakthrough
Problem: If HD wallet private keys are controlled by manufacturers, they could steal payments intended for objects.
Solution: Solana’s PDAs enable deterministic addresses controlled by Plings smart contracts:
// Payment goes to PDA (Plings controlled), not raw HD address (manufacturer controlled)
let payment_address = Pubkey::find_program_address(&[
b"object_payment",
"1.15.1.1.C3.1.158".as_bytes() // HD path as seed
], &plings_program_id);
Result: Manufacturers retain cryptographic verification capabilities while Plings controls payment routing.
2. Databases: Dual Architecture for Different Strengths
Neo4j Aura (Graph Database)
Purpose: Complex relationship traversal and spatial hierarchies
Why Neo4j Over Alternatives:
- Natural object relationships: PART_OF, CURRENT_IN, INSTANCE_OF chains
- Spatial hierarchy navigation: “Find all objects in Building A”
- Performance: Graph traversal queries 1000x faster than SQL joins
- Real-time updates: Efficient relationship modifications
Use Cases:
- Object location tracking (CURRENT_IN vs NORMAL_IN relationships)
- Complex ownership chains and delegated access
- Spatial hierarchies (containers, rooms, buildings)
Supabase PostgreSQL
Purpose: User authentication, financial data, and compliance
Why PostgreSQL Over NoSQL:
- ACID compliance: Critical for financial transactions and audit trails
- Row Level Security: Multi-tenant data isolation without complex application logic
- HD Wallet Path Registry: Collision prevention with database constraints
- Financial compliance: Established patterns for money movement tracking
Why Supabase Over AWS RDS:
- Real-time subscriptions: Critical for live payment status updates
- Built-in authentication: Reduces complexity for user management
- Managed scaling: Automatic read replicas and connection pooling
3. API Layer: GraphQL for Commerce Complexity
Why GraphQL Over REST?
Commerce Complexity Requirements:
- Object details: Metadata + relationships + payment options in single query
- Real-time updates: Payment status, ownership transfers, location changes
- Mobile optimization: Minimize round trips for scanning interfaces
- Service discovery: Find all available services (rent, repair, insure) per object
Example: Object scan query needs:
query ObjectScan($identifier: String!) {
object(identifier: $identifier) {
name
manufacturer { name, verification }
currentLocation { name, hierarchy }
owner { name, contact }
availableServices {
type # rent, repair, insurance
provider { name, rating }
pricing { amount, duration }
availability
}
paymentAddress # Solana PDA
verificationStatus
}
}
REST Equivalent: Would require 6-8 separate API calls.
Ariadne Over Alternatives
| Library | Performance | Python Integration | Async Support | Schema-First | Verdict |
|---|---|---|---|---|---|
| Ariadne | High | Excellent | Native | Yes | ✅ CHOSEN |
| Strawberry | High | Good | Yes | Code-first | ⚠️ Schema complexity |
| Graphene | Medium | Excellent | Limited | Code-first | ❌ Performance issues |
Decision: Ariadne’s schema-first approach enables clear API contracts for commerce integrations.
4. Frontend: Progressive Web App for Universal Access
React 18 + TypeScript
Rationale:
- Component reusability: Scanning interface, payment flows, object details
- Type safety: Critical for financial transactions and blockchain integration
- Ecosystem: Extensive Solana wallet integration libraries
Why PWA Over Native Apps?
Universal Commerce Requirements:
- QR codes work immediately: No app installation required
- Global accessibility: Works on any smartphone globally
- Progressive enhancement: Enhanced features with app installation
- Development efficiency: Single codebase for all platforms
Commerce Flow Example:
- No app: Scan QR → Web page → Basic payment via Web3 wallet
- With app: Scan QR → Enhanced UI → Integrated payment + history
- Future: NFC scanning → Instant payment without camera
5. Payment Integration: Solana Wallet Ecosystem
Multi-Wallet Support Strategy
Core Wallets:
- Phantom: Most popular Solana wallet (60% market share)
- Solflare: Hardware wallet integration
- Magic Link: Email-based wallet for non-crypto users
- Glow: Mobile-optimized for retail transactions
Integration Architecture:
interface WalletAdapter {
connect(): Promise<PublicKey>;
signTransaction(transaction: Transaction): Promise<Transaction>;
disconnect(): Promise<void>;
}
// Universal payment flow regardless of wallet
async function payObject(objectPDA: PublicKey, amount: number, wallet: WalletAdapter) {
const transaction = await buildPaymentTransaction(objectPDA, amount);
const signed = await wallet.signTransaction(transaction);
return await sendTransaction(signed);
}
6. HD Wallet Cryptography: BIP32 + Ed25519
Why HD Wallets Over PKI?
Critical Business Requirements:
- Payment Integration: Each identifier must function as a blockchain wallet
- Manufacturing Control: Secure delegation of object creation to subcontractors and plants
HD wallets uniquely enable both:
- Hierarchical paths map to Program Derived Addresses (PDAs) on Solana for secure payments
- Manufacturers can delegate specific path ranges while maintaining verification control
- PDAs prevent payment interception while preserving cryptographic manufacturer verification
- Traditional PKI cannot provide blockchain payment mapping capabilities
Why BIP32 Standard?
- Industry compatibility: Works with existing hardware wallets
- Hierarchical organization: Natural manufacturer → product → instance structure
- Deterministic generation: Same path always produces same keys
- Offline capability: Verification without network access
- Secure delegation: Subcontractors receive limited path ranges, cannot create outside scope
Why Ed25519 Over secp256k1?
- Solana native: Direct blockchain compatibility
- Performance: 2x faster signature verification
- Security: Resistant to timing attacks
- Size: Smaller signatures (64 bytes vs 71 bytes)
7. Hosting & Deployment: Edge-First Architecture
Vercel for Global Edge Distribution
Requirements:
- Sub-second scan responses: Critical for retail experience
- Global availability: Objects scanned anywhere in world
- Serverless scaling: Handle viral scanning events (product recalls, viral videos)
Database Distribution Strategy
- PostgreSQL: Multi-region with read replicas
- Neo4j: Aura Professional for global clustering
- Solana: Naturally distributed blockchain infrastructure
8. Real-Time Infrastructure: Critical for Commerce
GraphQL Subscriptions via WebSockets
Use Cases:
- Payment confirmations: Instant feedback on transaction status
- Ownership transfers: Real-time updates when objects change hands
- Location updates: Live tracking of object movement
- Service availability: Dynamic pricing and availability updates
Fallback Strategies
- Polling: 2-second intervals for critical payment flows
- Server-sent events: Browser compatibility fallback
- Push notifications: Mobile app enhancement
9. Security Architecture: Financial-Grade Requirements
HSM Integration for Master Keys
- Requirement: HD wallet master key protection
- Solution: Hardware Security Modules for production
- Development: Encrypted key storage with secure enclaves
Audit Trail Requirements
- Blockchain: Immutable transaction history
- PostgreSQL: Financial audit trails with row-level timestamps
- API Gateway: Request/response logging for compliance
10. Future Scalability: Visa/Mastercard Replacement Timeline
Current Limitations
- Solana TPS: 4,500 current (vs Visa’s 65,000 peak)
- Mobile adoption: Crypto wallet penetration ~5% globally
- Merchant integration: Traditional POS system replacement
Firedancer Upgrade Path (2025-2026)
- Target TPS: 600,000 (10x Visa capacity)
- Global deployment: Validator network scaling
- Hardware optimization: FPGA-based transaction processing
Mass Adoption Strategy
- Progressive deployment: Niche markets → mainstream retail
- Wallet simplification: Email-based wallets for non-crypto users
- Infrastructure partnerships: Direct integration with major retailers
These technology decisions position Plings to become the global payment infrastructure by making every physical object a commerce endpoint. Each choice prioritizes the revolutionary goal of replacing traditional payment systems with direct object commerce.