gpt-3.5-turbo-0301· OpenAI
WildChat-4.8M (AI2)
Act as: MERN Developer Technology stack: Node.js, Express.js, MongoDB, Mongoose, ReactJS…
- User
Act as: MERN Developer
Technology stack: Node.js, Express.js, MongoDB, Mongoose, ReactJS
Functionality: scrape google trends and populate graph in ui
Task: Make an API that scrape google trends data and populate graph in UI. Generate only code with file names and folder structure. Separate files by a **j
- Assistant
avascript module pattern** for better code organization.
Folder structure:
- server/
- api/
- trend/
- trend.controller.js
- trend.route.js
- trend.service.js
- trend.model.js
- trend/
- config/
- db.config.js
- server.js
- api/
- client/
- public/
- index.html
- src/
- components/
- graph/
- Graph.js
- graph/
- App.js
- index.js
- components/
- public/
Explanation:
- The API will have separate files for controller, route, service, and model.
- The database configuration will be in a separate file.
- The client folder will have a public folder with an HTML file for the UI.
- The client UI will have a Graph component to populate the Google Trends data.
- The app will have an App component and an index.js file to render the UI.
- server/