How floguo/giftbox works
Main System Components
A. Client-Side (Browser)
• Next.js Frontend Application
• Interactive Components Layer
• Media Processing Layer
• State Management
• Browser APIs Integration
B. External Services
• Spotify Integration
• File Storage (for photos)
Component Organization
A. Core Application Layer
• Layout Component (src/app/layout.tsx)
• Main Page Component (src/app/page.tsx)
• Global Styles (src/app/globals.css)
B. Interactive Components Layer (Group these functionally):
1. Media Components:
• PhotoUploader & PhotoItem
• VoiceRecorder & VoiceNote
• SpotifyPlayer
• DoodleDrawer
2. Text & Note Components:
• LetterNote
• LetterCanvas
• NotePaper
3. UI Components:
• Toolbar
• DraggableItem (wrapper component)
• Basic UI elements (button, dialog, input, etc.)
Technical Integration Points
Integration with browser APIs:
• Web Audio API (for voice recording)
• Canvas API (for drawing)
• Drag and Drop API
• File System API (for photo uploads)
Data Flow Visualization
• User interaction flows
• Media processing paths
• State updates
• External service communications
🟦 Core Application Components
🟨 Interactive Elements
🟩 Browser APIs
🟪 External Services
⟶ Data Flow
⟲ State Updates
Implementation Details to Highlight
• Component hierarchy starting from layout.tsx
• Where global styles and utilities are applied
• Demonstrate how DraggableItem wraps other components
• Toolbar's relationship with other components
Key Architectural Patterns to Emphasize
• Component Composition
• Event-Driven Interactions
• Media Processing Pipeline
• Responsive State Management
Create three main sections
• Core Components (top)
• Interactive Components (middle)
• Browser APIs & External Services (bottom)