1 min read 330 words Updated Mar 19, 2026 Created Mar 19, 2026

Drop Zone — Price List Processor

Automated pipeline that watches a shared folder for property price list files and upserts them into the lux-property Turso database.

How It Works

  1. Drop a PDF, Excel (.xlsx/.xls), or CSV price list into the price-lists/ folder
  2. The watcher detects the new file (waits 2s for write to finish)
  3. Text is extracted from the file (pdftotext for PDFs, xlsx library for Excel, raw text for CSV)
  4. Claude reads the content and returns structured JSON — one entry per apartment unit
  5. Each unit is upserted into the project_units table in Turso (insert or update, matched on project slug + stock ID)
  6. File moves to processed/ on success, errors/ on failure

Folder Structure

/home/geoff/drop-zone/
  price-lists/     ← DROP FILES HERE (shared via Samba)
  processed/       ← successfully processed files (timestamped)
  errors/          ← failed files

/home/geoff/code/mork/drop-zone/   ← watcher code (do not share)

Accessing from Mac (Samba over Tailscale)

In Finder: Cmd+Ksmb://100.76.126.48/drop-zone

You'll see the price-lists/, processed/, and errors/ subfolders. Just drag price list files into price-lists/.

Service Management

The watcher runs as a systemd service and starts automatically on boot.

# Check status
sudo systemctl status drop-zone

# View live logs
journalctl -u drop-zone -f

# Restart
sudo systemctl restart drop-zone

Environment Variables

Stored in /home/geoff/code/mork/drop-zone/.env:

VariableDescription
TURSO_URLTurso DB URL (libsql://...)
TURSO_AUTH_TOKENTurso auth token
ANTHROPIC_API_KEYClaude API key for parsing

The Turso credentials are the same as the lux-property Cloudflare Worker secrets.

Database

Writes to the project_units table in the lux-property Turso database. Upserts on (project_slug, stock_id) — safe to re-drop the same file.

Key columns: project_slug, stock_id, level, bedrooms, bathrooms, car_spaces, price, status, source_file.

Code Location

/home/geoff/code/mork/drop-zone/ — Bun/TypeScript project.

  • src/watcher.ts — folder watcher (chokidar)
  • src/parser.ts — file text extraction + Claude parsing
  • src/db.ts — Drizzle schema + upsert helper