Public Access
1
0

feat: add deep research planning and postal batch runs

Add a dedicated Deep Research view with postal-area preview overlays, batch execution, and bundled map results.

Also add postal dataset import tooling and fix local API networking and research insert issues needed to support the new workflow.
This commit is contained in:
pguerrerox
2026-04-05 18:05:04 +00:00
parent a1ba5ee093
commit cc00a439bf
29 changed files with 1860 additions and 82 deletions
+18 -1
View File
@@ -21,6 +21,10 @@ Leads4Less is a React + Vite app for finding local business leads, saving them i
3. Run the frontend:
`npm run dev:web`
The local backend and scripts load both `.env` and `.env.local`, with `.env.local` taking precedence, so you can keep the full local setup in one file during development.
If you open the app from another machine on your LAN, set `VITE_API_BASE_URL` and `APP_ORIGIN` to that host instead of `localhost`. In development, the frontend also auto-rewrites a `localhost` API URL to the current browser hostname to make local-network testing easier.
## Local API Setup
1. Ensure PostgreSQL is running locally with PostGIS available.
@@ -35,7 +39,20 @@ Leads4Less is a React + Vite app for finding local business leads, saving them i
- `db/migrations/0001_local_core.sql` creates the local-first schema.
- `db/scripts/migrate.ts` applies migrations in order and records them in `schema_migrations`.
- `db/scripts/seed-postal-placeholder.ts` is a placeholder for ZIP/ZCTA and Canada FSA imports.
- `db/scripts/import-postal-areas.ts` imports US ZIP/ZCTA and Canada FSA polygons from local GeoJSON files.
- `db/scripts/build-postal-neighbors.ts` builds adjacency links for deep research propagation.
- `db/datasets/README.md` documents the expected postal dataset locations and property names.
## Postal Dataset Setup
1. Place your GeoJSON files in:
- `db/datasets/postal/us_zcta.geojson`
- `db/datasets/postal/ca_fsa.geojson`
2. Or override them with:
- `POSTAL_US_DATASET_PATH`
- `POSTAL_CA_DATASET_PATH`
3. Import and build adjacency:
`npm run seed:postal`
## Google Maps Requirements