Inspiration
We've all been there — you want to buy something but the price is just a little too high. You bookmark it, check back manually every few days, and eventually either forget or miss the deal entirely. We built PriceWatch to solve that frustration. The idea was simple: let users say "alert me when this product hits $X" and then completely forget about it. The system does the watching for you.
What it does
PriceWatch is a web application that lets users track the prices of online products over time.
Users can add any product by pasting its URL, entering a name, their email address, and a target price. The system then:
- Automatically fetches the current price from the product page using web scraping
- Stores a full price history in MongoDB
- Displays an interactive weekly price chart on the dashboard
- Sends an email alert the moment the price drops to or below the user's target
- Re-checks all prices on a scheduled background timer every 6 hours
The dashboard shows each product as a card with the current price, target price, a progress bar showing how close the price is to the target, and a live Chart.js line graph of the weekly price trend.
How we built it
Frontend: Plain HTML, CSS, and vanilla JavaScript — no frameworks, keeping it beginner-accessible. Chart.js renders the interactive price history chart. The UI connects to the backend via the Fetch API.
Backend: FastAPI (Python) powers all API endpoints — adding products, fetching price history, updating targets, and triggering price checks. FastAPI was chosen for its simplicity, speed, and auto-generated interactive documentation at /docs.
Database: MongoDB stores all product data and price history. We used Motor, the async MongoDB driver, to keep the backend fully non-blocking.
Price Fetching: httpx makes async HTTP requests to product URLs, and BeautifulSoup parses the returned HTML to extract the price using common CSS selectors. A fallback demo-price generator is included so the app works for testing even when scraping isn't possible.
Email Alerts: Python's built-in smtplib connects to Gmail's SMTP server and sends a formatted HTML email whenever a tracked price meets the user's target.
Scheduler: APScheduler runs a background job every 6 hours to re-check all product prices and trigger alerts automatically — no manual action required.
Challenges we ran into
Web scraping reliability was the biggest challenge. Every website structures its HTML differently, so a single CSS selector doesn't work everywhere. We handled this by trying multiple common selectors in sequence and falling back to a demo price generator so the rest of the system could still be tested end-to-end.
Async architecture was new to us. FastAPI, Motor (async MongoDB), and httpx all use Python's async/await pattern, which required careful attention to avoid blocking the event loop — especially when running scheduled background tasks alongside the main API.
Email setup has real-world friction. Gmail's App Password system isn't obvious for beginners. We documented the exact steps clearly in both the code comments and README to make this as painless as possible.
Accomplishments that we're proud of
Building a fully functional end-to-end system — from a URL input to a real email in your inbox — as a beginner project is something we're genuinely proud of. Every layer (frontend, API, database, scraper, email, scheduler) connects and works together. The code is heavily commented throughout so any beginner can read it and understand exactly what each part does and why. We also made sure the app degrades gracefully: if scraping fails, demo prices keep everything testable.
What we learned
This project taught us how real-world web applications are structured in layers. We learned how REST APIs are designed, how async Python works in practice, how to model flexible data in a document database, how web scraping works and why it's fragile, and how to send programmatic emails securely without hardcoding credentials. Perhaps most importantly, we learned how to read error messages and debug across multiple running services at once.
What's next for PriceWatch
- User authentication so multiple users can track separate wishlists
- Support for percentage-based drop alerts (e.g. "alert me at 20% off") instead of only fixed targets
- SMS alerts via Twilio as an alternative to email
- A browser extension to add products with one click from any product page
- Deployment to a public URL using Render (backend) and Netlify (frontend) so anyone can use it
- Price prediction using simple moving averages to suggest the best time to buy
Built With
- apscheduler
- beautiful-soup
- chart.js
- css3
- fastapi
- html5
- javascript
- mongodb
- motor
- python
- smtplib
Log in or sign up for Devpost to join the conversation.