Products
Product catalog for renovation services and funding products. Products define what Renewa offers — from energy consulting (iSFP) to specific funding program services (BEG EM, KfW). Supports bundles, application type mapping, and bidirectional sync with HubSpot Integration.
Source Files
| Layer | Path |
|---|---|
| Schema | backend/src/db/schema.ts (line ~3331) |
| Admin Routes | backend/src/routes/admin/products.ts |
| Service | backend/src/services/catalog-service.ts |
| Admin Pages | frontend/src/pages/admin/AdminProductsList.tsx, AdminProductDetail.tsx |
| Seed Data | backend/src/db/seeds/products.ts (174KB — large catalog) |
Database Tables
| Table | Purpose |
|---|---|
products | Main entity — key, label, category, pricing, HubSpot sync |
product_bundle_children | Parent-child relationships for bundle products |
product_application_types | Junction: which products apply to which application types |
Key Fields
| Field | Type | Notes |
|---|---|---|
key | text | Unique identifier (e.g., bafa_beg_em, effi_wg, isfp) |
shortName | text | Short display name (e.g., BEG EM, Effi WG, iSFP) |
label | jsonb LocalizedText | Bilingual name (de/en) |
description | jsonb LocalizedText | Bilingual description |
category | varchar | Grouping — foerdermittel (funding), beratung (consulting) |
actor | varchar | Responsible party — engineer, backoffice, technician, team |
productNumber | varchar | HubSpot Produktnummer (e.g., BBG EFFI AT) |
listPrice | integer | Price in cents (e.g., 110000 = 1100.00 EUR) |
isBundle | boolean | Whether this is a bundle (Bundelprodukt) |
productTypeKey | varchar | Matrix match for building component type (dach, heizung, fassade) |
applicationTypeKey | varchar | Matrix match for application type (beg_em, kfw_261) |
source | varchar | renewa (seeded) or hubspot (synced) |
hubspotId | varchar | Bidirectional sync with HubSpot Integration |
Relationships
Product 1──* Product Bundle Children (parent)
Product *──1 Product Bundle Children (child)
Product *──* Application Types (via product_application_types)
Product *──* Quote Line Items (used in quotes)
Product *──* Invoice Line Items (used in invoices)
HubSpot Sync
Products sync bidirectionally with HubSpot:
| Direction | Details |
|---|---|
| Renewa → HubSpot | Seeded products pushed as HubSpot products |
| HubSpot → Renewa | Products created in HubSpot imported with source: 'hubspot' |
| Shared fields | hubspotId, sku, priceEur, hsStatus, hubspotProperties |
| Lifecycle | archived, deletedAt, mergedIntoHubspotId for sync state |
Bundle System
Bundle products have child products via product_bundle_children:
parentProductId→ the bundle productchildProductId→ individual component productssortOrdercontrols display ordering- Unique constraint prevents duplicate parent-child links
Features
- Large seeded catalog — 174KB seed file with real German renovation products
- Bundle products with parent-child composition (Bundelprodukt)
- Application type mapping — defines which products apply to which funding types
- Matrix matching via
productTypeKey,applicationTypeKey,technicalPlanningTypeKey - Admin management via Admin Dashboard with list and detail views
- HubSpot sync as HubSpot products and line items
- Used in Quotes and Invoices as line item references
Related Pages
Quotes | Invoices | Funding Programs | Measures | HubSpot Integration | Admin Dashboard | Database Architecture | Database Seeding