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
- Drop a PDF, Excel (.xlsx/.xls), or CSV price list into the
price-lists/folder - The watcher detects the new file (waits 2s for write to finish)
- Text is extracted from the file (pdftotext for PDFs, xlsx library for Excel, raw text for CSV)
- Claude reads the content and returns structured JSON — one entry per apartment unit
- Each unit is upserted into the
project_unitstable in Turso (insert or update, matched on project slug + stock ID) - 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+K → smb://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:
| Variable | Description |
|---|---|
TURSO_URL | Turso DB URL (libsql://...) |
TURSO_AUTH_TOKEN | Turso auth token |
ANTHROPIC_API_KEY | Claude 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 parsingsrc/db.ts— Drizzle schema + upsert helper