How godrums/betterfloat works
Main Components
a) Browser Extension Architecture:
• Popup Interface (src/popup/)
• Background Service (src/background/)
• Content Scripts (src/contents/)
• Shared Libraries (src/lib/)
b) External Systems:
• Multiple Marketplace APIs (CSFloat, Skinport, Skinbid, etc.)
• Browser Extension APIs
Key Architectural Elements
┌─ Browser Extension ─────────────────────────────────────────┐
• ┌─ UI Layer ─────┐ ┌─ Background ──┐ ┌─ Content Scripts ─┐│
• Popup │ │ Message │ │ Site-specific ││
• Components │ │ Handlers │ │ Injection ││
• Tabs │ │ - Notifications│ │ - DOM Mutations ││
• UI Elements │ │ - Tab Control │ │ - API Intercepts ││
• ┘ └───────────────┘ └─────────────────┘ ││
• ┌─ Shared Libraries ──────────────────────────────────────┐││
• Cache Handlers │││
• Network Handlers │││
• Event Handlers │││
• Utility Functions │││
• ┘│
• ┘
Specific Implementation Details
a) Message Passing System:
• How background/content scripts communicate
• Event handling system
• Cache management flow
b) Site Integration:
• Custom HTTP controller injection
• Mutation listener system
• UI enhancement injection points
c) Data Flow:
• Price fetching from multiple sources
• Currency conversion system
• Cache management
• Real-time updates
Important Relationships
• Content script interaction with marketplace websites
• Background service communication with BetterFloat's API
• Popup UI interaction with stored data
• Event propagation between components
Technical Stack Integration
Technology indicators:
• React for UI components
• TypeScript for type safety
• Plasmo framework structure
• shadcn/ui and Aceternity UI components