![logo](https://private-user-images.githubusercontent.com/117097248/280017270-7fdd22d1-ee0c-4370-b860-de37933f1546.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU1OTgzOTYsIm5iZiI6MTcyNTU5ODA5NiwicGF0aCI6Ii8xMTcwOTcyNDgvMjgwMDE3MjcwLTdmZGQyMmQxLWVlMGMtNDM3MC1iODYwLWRlMzc5MzNmMTU0Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwOTA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDkwNlQwNDQ4MTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02MjQ3MTJkMDI1ZTIxM2MwYWVkYmZjMTAxZWY0MmM2MDNjNmI1MDdkZDMwYjg2ZjY2ZjRiZTI3YWFjODJmYTI4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.BLBTKt0VuBW1Gnxb7atjCXVECHqXAsDjiJT3EI1nIgs)
A full-fleshed webscraper web app build on Next.js13 with tracking the prices of different product you want, and send email when the price become lowest with help of cron and nodemailer. In this project we use brightdata for scraping data from Web.
Welcome to the PriceChecker project, a comprehensive solution for tracking product prices on Amazon. This project is designed to scrape product details from Amazon, store the data in a MongoDB database, and send email notifications to users when there are changes in the product details. The project includes a web application with a user-friendly interface that allows users to search for products, view product details, and subscribe to product updates. The application is built with Next.js and Tailwind CSS, and it includes several components such as a home page, product details page, navbar, search bar, product card, price info card, and modal.
The server-side logic is implemented with serverless functions that handle various tasks such as connecting to the database, scraping product details, updating product information, and sending email notifications. The project also includes several utility functions for extracting information from web pages and formatting numbers.
-
Next.js: A React framework for building web applications. It is used for both the frontend and the backend of the application.
-
Tailwind CSS: A utility-first CSS framework for rapidly building custom designs. It is used for styling the application.
-
TypeScript: A statically typed superset of JavaScript. It is used for writing the code.
-
Mongoose: An Object Data Modeling (ODM) library for MongoDB and Node.js. It is used for defining the product schema and interacting with the MongoDB database.
-
Nodemailer: A module for Node.js applications to allow easy email sending. It is used for sending email notifications to users.
-
Axios: A promise-based HTTP client for the browser and Node.js. It is used for making HTTP requests to scrape product details from Amazon.
-
Cheerio: A fast, flexible, and lean implementation of core jQuery designed specifically for the server. It is used for parsing the HTML response from the Amazon product page.
-
React Responsive Carousel: A lightweight carousel component for React. It is used for displaying a carousel of images on the home page.
-
Google Fonts: A library of free licensed font families. It is used for defining the font styles in the application.
- Create BrightData account HERE
Than got to Amazon-Webscraper and Copy API key and paste it on .env file.
for Refrence
.env.example
file is on Repo.
Follow these steps to install and run the project:
-
Clone the repository
Open your terminal and run the following command to clone the repository:
git clone https://github.com/adrianhajdin/pricewise.git
-
Navigate to the project directory
cd pricewise
-
Install Node.js
The project requires Node.js to run. If you don't have it installed, you can download it from here.
-
Install the required packages
The project requires several packages to be installed. Run the following command to install them:
npm i
-
Install the required fonts
The project requires the "font-inter" and "font-spaceGrotesk" fonts to be available. You can download them from Google Fonts.
-
Set up the environment variables
The project requires the MONGODB_URI environment variable to be defined. You can do this in a
.env
file in the root of your project:MONGODB_URI=your_mongodb_uri
-
Start the server
Run the following command to start the server:
npm run start
Now, you should be able to access the project at http://localhost:3000
.