Multi-tenant by hostname
api/_tenant.js maps the request host to a tenant. Branding, catalogue, gate codes and Odoo
credentials are all per-tenant. Adding a client is data, not code.
The GoAsk 3D Configurator is a single web app that serves many clients from one deployment. The client (tenant) is resolved by hostname; each tenant has its own branding, product catalogue, access code and Odoo. A customer builds a ute (tray, canopy, racks, accessories) in the 3D builder, gets a live price, and the quote fans out to the database plus each configured CRM.
Multi-tenant by hostname
api/_tenant.js maps the request host to a tenant. Branding, catalogue, gate codes and Odoo
credentials are all per-tenant. Adding a client is data, not code.
Live prices from Odoo
GET /api/catalog overlays each tenant’s catalogue with live Odoo prices, matched by SKU
(default_code). Odoo is the source of truth for price.
Quote → Odoo quotation
On submit, api/lead.js creates a sale.order with one line per configured item (matched by
SKU), alongside Supabase, an email backup, GoAsk Answer and HubSpot.
Role-based access
A signed session cookie, re-validated against the database on every request. Roles:
demo, view, staff, dealer, mfr.
| Thing | Where |
|---|---|
| App repo (this) | tech-goask/goask-3d-configurator → Vercel |
| Odoo backend | tech-goask/goask-3d-configurator-odoo → Railway |
| These docs | Astro + Starlight site in docs/ of the app repo — excluded from the app deploy, shipped as its own project |