Temu SEO Articles from Products
Here's your refined technical specification formatted as a prompt for the Advanced LLM:
```
I am building a React app using HTML, vanilla CSS, and integrating multiple APIs alongside Firebase.
I am a beginner at coding React, and so need you to generate all required code, and then give me simple instructions to generate the app and upload it to Netlify.
TECH STACK #
The front-end will be coded in React.js and styled with vanilla CSS.
For data collection, since there is no official Temu API, we will use the Apify Temu Scraper API for product data. We'll need to implement proper rate limiting, caching, and proxy rotation as detailed in the API implementation.
We'll also integrate:
- YouTube Data API for video reviews
- Google Custom Search API for product research
- OpenAI GPT-4 API for article generation
- Firebase for data storage and future authentication
The app will require multiple service files:
- apify-service.js (for Temu data scraping)
- youtube-service.js
- google-search-service.js
- openai-service.js
- firebase-config.js
NAME, PURPOSE & VERSION OF THE APP #
The app is called "TemuPro Article Generator" and it allows users to automatically generate optimized articles about Temu products.
Users will select product categories and timeframes, and the app will fetch bestselling products through the Apify Temu Scraper. It will then gather additional data through YouTube and Google APIs, before using GPT-4 to generate comprehensive, SEO-optimized articles.
The React frontend app should process this data through several stages:
1. Product data collection (with built-in caching)
2. Review and research aggregation
3. Article generation
4. Preview and export functionality
For v1.0, we will implement two core pages:
1. Input Page (category/timeframe selection)
2. Results & Processing Page (product display, research results, article preview)
FRONTEND OVERVIEW - PAGES, SERVICES & COMPONENTS #
Core Components:
1. Input Page Components:
- CategorySelector
- TimeframeSelector
- AdvancedFilters
- StartButton
2. Results Page Components:
- ProductList
- SortingControls
- ResearchResults
- ArticlePreview
- ExportControls
Services:
1. apify-service.js:
```javascript
const { ApifyClient } = require('apify-client');
// Implementation with rate limiting, proxy rotation
```
2. cache-service.js:
```javascript
// Redis or local storage implementation for caching scraped data
```
3. api-services.js (YouTube, Google, OpenAI)
4. firebase-config.js
Key Technical Considerations:
- Implement robust error handling for API failures
- Add rate limiting and request queuing
- Include proxy rotation for scraping
- Implement caching layer for scraped data
- Add monitoring for scraping success/failure
Legal/Compliance Features:
- Terms of service acceptance
- Rate limiting compliance
- Robots.txt checking
- Data usage policy
- Copyright notices
Database Structure (Firebase):
- products (cached scraping results)
- generated_articles
- user_preferences
- api_logs
The app will use modern React patterns including:
- Context API for state management
- Custom hooks for API interactions
- Error boundaries
- Suspense for loading states
Please begin by generating the file structure and initial setup, including configuration for Apify integration and the caching layer.
First, pre-entered info...
final-output2
subagents-extracted2
subagentnumber
Then, agent response...
subagent1refined-new-json-core
subagent1mermaid
prompts-required
subagent1-json-array
subagent1-json-array-mermaid