Initial project scaffold

Full-stack Dutch supermarket price tracker with FastAPI backend,
PostgreSQL/SQLAlchemy, Albert Heijn scraper, and Next.js frontend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 22:27:24 +02:00
commit 486749a890
40 changed files with 1596 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import click
from app.database import SessionLocal
from app.scrapers.albert_heijn import scrape_query
@click.group()
def cli():
pass
@cli.command("scrape-ah")
@click.option(
"--query",
"queries",
multiple=True,
required=True,
help="Search term to scrape (repeatable)",
)
def scrape_ah(queries: tuple[str, ...]):
"""Scrape Albert Heijn product prices for one or more search queries."""
db = SessionLocal()
try:
for query in queries:
click.echo(f"Scraping Albert Heijn: {query!r}")
run = scrape_query(db, query)
if run.status == "success":
click.echo(f" {run.products_found} products stored (run id={run.id})")
else:
click.echo(f" Failed: {run.error_message}", err=True)
finally:
db.close()
if __name__ == "__main__":
cli()