How gignac-cha/tjmedia-popular-youtube works
Main Components
A. Frontend (UI Layer):
• React-based web application (evident from the UI directory structure)
• Main components:
• Navigation system
• Main content area (List and Video display)
• Common UI components
• State management using Context API (QueryContext, VideoContext)
B. Backend (Serverless Functions):
• Two distinct Lambda functions:
• tjmedia-popular: Fetches ranking data from TJMedia
• youtube-search: Handles YouTube API interactions
C. External Services:
• TJMedia Website (Data Source)
• YouTube API (Video Search)
Component Relationships
[Frontend UI] ←→ [API Gateway]
• ↓
• [TJMedia Website] ← [tjmedia-popular Lambda] → [Frontend UI]
• [YouTube API] ← [youtube-search Lambda] → [Frontend UI]
Detailed Component Breakdown
Frontend (UI):
• Components Layer (Main, Navigation, Common)
• State Management Layer (Contexts, Reducers)
• Data Layer (Queries, Utilities)
Backend (Serverless):
• Their specific responsibilities
• API Gateway as the entry point
Important Flows to Highlight
A. Data Fetching Flow:
User → UI → API Gateway → Lambda → External Service → UI
B. Video Search Flow:
List Item Click → YouTube Search Lambda → YouTube API → Video Preview
Additional Elements
• Notes about the main features:
• Date filtering
• Song type filtering (가요, POP, JPOP)
• Video navigation capabilities
• State management flow between components
Technical Details
• TypeScript usage throughout the project
• Serverless architecture
• React with Context API for state management
• Story book integration for component development
• Build and deployment workflow (.github/workflows)
Video navigation and control
Remember to indicate asynchronous operations and data transformation points, as the application deals with data from multiple sources that need to be integrated and displayed cohesively.
This architecture represents a modern, serverless web application with clear separation of concerns between data fetching, business logic, and presentation layers.