Follow these exact steps to compile the Java Engine, set up your Database, and install the Chrome Extension on your local machine.
Note: You don't need to install anything!
The project has been converted to use SQLite. The database file (price_history.db) will be created automatically in the backend/ folder the first time you run a search.
No server, no username, and no password required. It just works!
We need to package your Java code and all the dependencies (Jsoup, MySQL driver, JSON) into a single executable PriceTrackerEngine.jar.
- Open a terminal or Command Prompt in the backend folder (
d:\Price Tracker\backend). - Run the Maven packaging command:
mvn clean package
- Wait for it to say
BUILD SUCCESS. - Verify that the file
target/PriceTrackerEngine-jar-with-dependencies.jarexists. Note: In our config, it will be namedtarget/PriceTrackerEngine.jar.
Google Chrome needs permission to run your Java file. We do this by creating a quick Registry key.
- Open Chrome and go to
chrome://extensions/. - Turn on Developer mode (top right toggle).
- Click Load unpacked and select the
d:\Price Tracker\extensionfolder. - Important: Note the 32-character Extension ID that Chrome gives it (e.g.,
abcdefghijklmnopqrstuvwxyz123456). - Open
d:\Price Tracker\host-config\com.pricetracker.engine.jsonand replace<YOUR_EXTENSION_ID_HERE>with your actual Extension ID. Save the file. - Open an Administrator Command Prompt.
- Run this command to add the Registry Key (replace the path if you moved the project):
REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.pricetracker.engine" /ve /t REG_SZ /d "d:\Price Tracker\host-config\com.pricetracker.engine.json" /f
- Click the Price Scout (Avengers) icon in your Chrome extensions menu.
- Type a product name like
iPhone 15. - Click Track Prices!
- Check your MySQL
price_historytable—you should see the newly scraped prices magically appear!