Add Website settings for special-products source.

Businesses can choose product vs store item sourcing, with store as the default when the store module is enabled, and rename the FA special-products section.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-21 11:57:49 +03:30
co-authored by Cursor
parent a7950f1f13
commit 193c63bfd2
10 changed files with 286 additions and 9 deletions
+5 -3
View File
@@ -3,7 +3,7 @@
> **For AI agents:** Read this file at the start of a new chat before making changes.
> Update this document when a major feature is completed or architecture changes.
Last updated: August 20, 2026
Last updated: August 21, 2026
---
@@ -216,6 +216,7 @@ Add to `/etc/hosts` (one line per tenant):
| `/website` | Website hub | Placeholder |
| `/website/static-images` | Named website image slots, grouped by page | Yes |
| `/website/special-items` | Special item carousels | Yes |
| `/website/settings` | Website settings (special products source: product vs store item) | Yes |
| `/website/contact` | Contact us submissions list | Yes |
| `/website/subscriptions` | Subscriptions | Placeholder |
| `/website/faq` | FAQ | Placeholder |
@@ -272,11 +273,12 @@ Products accept optional `brandId` on create/update.
- `POST /tenants/:host/contact-submissions` — public website contact form
### Business settings
- `GET/PATCH /businesses/:businessId/settings` — `branding`, `dashboard`, `store`, `modules`
- `GET/PATCH /businesses/:businessId/settings` — `branding`, `dashboard`, `store`, `modules`, `website`
- `website.specialProductsSource`: `product` \| `store_item`. Unset → `store_item` if the store module is enabled, otherwise `product`.
- `modules.enabled`: optional modules — business: `products`, `store`, `portfolio`, `blog`, `warehouse`, `videos`, `finance`; customer: `customer_products`. Missing key → all business modules enabled (legacy); customer modules stay opt-in. Super-admin only for modules PATCH.
- `modules.charts`: two home chart slots (`none`, `orders_30d`, `customers_joined_1y`, `blog_views_30d`, `products_added_1y`); `none` hides that slot; defaults orders + customers.
- Always-on (not in modules list): business — customers, website, profile, settings, home; customer — home, profile, addresses, orders, favorites
- Tenant public: `GET /tenants/:host` includes `enabledModules` + `homeCharts`
- Tenant public: `GET /tenants/:host` includes `enabledModules` + `homeCharts` + `specialProductsSource`
### Portfolios
- `GET/POST/PATCH/DELETE /businesses/:businessId/portfolios`