Architecture
Hosted Monitor
Frontend
Single-page dashboard built directly in HTML, CSS, and vanilla JavaScript. It also uses Google Identity Services for sign-in, Leaflet for map pins, and a small service worker + web manifest so it behaves like an installable PWA.
Backend
The backend is a small Python service powered by Flask with Flask-CORS. Production serving is set up for Gunicorn, and the scheduler work is handled inside Python instead of splitting into separate services.
Data + Jobs
SQLite stores users, per-account settings, tracked products, and check history. APScheduler runs recurring stock checks in the background for each signed-in account.
Inventory + Alerts
Product resolution and stock lookup use requests, BeautifulSoup, and lxml. When hits are found, the app pushes alerts through Discord webhooks.
- Auth: Google OAuth identity token verification on the backend with `google-auth`.
- API wiring: Runtime API origin is injected through `runtime-config.js`, so the same frontend can point at different environments.
- Why this stack: Lightweight to host, easy to debug, and fast to ship without needing a frontend framework bundle.