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>
23 lines
445 B
Go
23 lines
445 B
Go
package routes
|
|
|
|
import (
|
|
"nearle/facade"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func RegisterRoutes(app *fiber.App, f *facade.Facade) {
|
|
|
|
api := app.Group("/live/api")
|
|
|
|
RegisterUserRoutes(api, f)
|
|
RegisterProductRoutes(api, f)
|
|
RegisterOrderRoutes(api, f)
|
|
RegisterDeliveriesRoutes(api, f)
|
|
RegisterUtilsRoutes(api, f)
|
|
RegisterTenantRoutes(api, f)
|
|
RegisterPartnerRoutes(api, f)
|
|
RegisterCustomerRoutes(api, f)
|
|
RegisterCatalogueRoutes(api, f)
|
|
}
|