How symaticvisuals/betos-fe works
Main Components
A. Frontend Layer (Next.js Application)
• Client-side Components (/src/components)
• Pages and Routes (/src/app)
• Wallet Integration (/src/components/common/wallet.provider.tsx)
• UI Components (/src/components/ui)
B. Blockchain Integration Layer
• Aptos Integration (/src/lib/aptos.ts)
• Keyless Authentication (/src/lib/core/keyless.ts)
• Wallet Hooks (/src/hooks/use-aptos-wallet.tsx)
C. External Services
• Switchboard Oracles (for match data)
• RapidAPI Football Data
• Panora Integration
• Kana Labs Integration
D. Smart Contracts Layer (referenced but not in this repo)
• Betting Contracts
• Market Creation
• Payout System
[User Interface Layer]
[Frontend Application Layer]
[Blockchain Integration Layer]
[Smart Contracts Layer]
[External Services Layer]
Key Relationships to Highlight
a. User Flow:
• Wallet Connection → Authentication → Betting Interface
• Match Selection → Odds Display → Bet Placement → Payout
b. Data Flow:
• External APIs → Backend → Frontend
• Smart Contracts ↔ Oracle Data
• Wallet ↔ Transaction Processing
Specific Implementation Details
• Keyless sign-in implementation (/src/lib/core/keyless.ts)
• Wallet integration patterns (/src/components/common/wallet.provider.tsx)
• Match data handling (/src/components/common/match-cards.tsx)
• Balance management (/src/hooks/use-account-balance.tsx)
Component Interactions
• Frontend ↔ Aptos Blockchain
• Smart Contracts ↔ Oracles
• User Interface ↔ Wallet Provider
Additional Elements
Include:
• Authentication flow
• Transaction processing pipeline
• Real-time data updates
• Error handling paths
Notes for Implementation
• Keep the main flow clear and centered
• Related components together
• Use consistent spacing and alignment
• Version/environment indicators
• Important configuration notes