Bridge global catalogue DB to per-store product catalogue
Adds a separate CatalogueDB (pgvector) connection alongside the main nearledb, plus a new catalogue module (repository/service/controller/ routes) to browse it by brand, category, and keyword, with brand optional so the whole ~237-product catalogue can be browsed unfiltered. Adds the actual bridge: importing a catalogue product snapshots it into the tenant's own products table (keyed on brand+catalogueid, since a catalogue row's bare id is only unique within its own brand table), then links it via the existing productlocations upsert. Re-importing tops up stock and refreshes price instead of duplicating. Also adds an imported-refs endpoint so the frontend can badge already-imported items without diffing full product lists, and wires the new AWS S3 image store used to resolve catalogue product photos. Bumps Go/Docker to 1.24 for the AWS SDK dependency this needs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
15
.env
15
.env
@@ -4,3 +4,18 @@ DB_PORT=5433
|
||||
DB_NAME=nearledb
|
||||
DB_USER=admin
|
||||
DB_PASSWORD="Package@123#"
|
||||
|
||||
# --- Catalogue Postgres / pgvector (separate DB, read-only integration) ---
|
||||
CATALOGUE_DB_HOST=31.97.228.132
|
||||
CATALOGUE_DB_PORT=6054
|
||||
CATALOGUE_DB_NAME=pgvector
|
||||
CATALOGUE_DB_USER=admin
|
||||
CATALOGUE_DB_PASSWORD="'Package@321#'"
|
||||
|
||||
# --- DigitalOcean Spaces (S3-compatible), catalogue product images ---
|
||||
USE_S3=true
|
||||
S3_ACCESS_KEY=DO801G8Q8JAZKF49U3WJ
|
||||
S3_SECRET_KEY=lBQExYfkVqH+ybmGVmQH5MkThBbrIohA/VQLgcPUvug
|
||||
S3_ENDPOINT=https://nearle.sgp1.digitaloceanspaces.com
|
||||
S3_BUCKET=nearle
|
||||
S3_REGION=sgp1
|
||||
|
||||
Reference in New Issue
Block a user