Skip to content

Website ​

The Website module (branded in the admin UI as the "Storefront") turns a site's existing accounting catalogue into a public e-commerce website — a simple product catalogue, or a full checkout store with Paystack payments. It's used by business owners/admins to configure and publish their site, and by shoppers on the public-facing website to browse, sign in, and check out. Every site gets one Website configuration record, and the module can serve the store from an instant <label>.lubb.co.za subdomain, a connected custom domain, or both at once.

What you can do ​

  • Turn the public website off, set it to catalogue-only (browse, no checkout), or "for sale" (Paystack checkout enabled).
  • Curate which products appear on the site: mark items visible, set their product line/category, features, badges and sort order — done directly from the existing Items grid (/g/acc-items), not a separate product list.
  • Build and edit standard content pages — About Us, FAQs, Terms & Conditions, Privacy Policy, Return Policy, Reseller Programme — each toggle-able on/off and assignable to a "Company" or "Support" footer column.
  • Brand the website: logo, favicon, primary colour, support email, WhatsApp number, phone, postal address, and a home-page hero (eyebrow/heading/subtext, with an optional photo background).
  • Auto-generate a clean favicon from an uploaded logo, or generate a hero background image, using AI image generation (Gemini).
  • Pick a page layout/theme from a set of presets (dark, midnight blue, warm sunset, minimal mono, light-grey, or a Takealot-style marketplace layout).
  • Configure flat-rate courier shipping (a base charge covering the first N items, plus a per-extra-item charge).
  • Enable Paystack as the checkout payment provider.
  • Spin up an instant temporary subdomain (<label>.lubb.co.za) with no DNS work required.
  • Connect a real custom domain, with automatic DNS verification and TLS certificate issuance.
  • Let shoppers create an account and sign in via a 6-digit email one-time code.
  • Let a reseller's website sign up new end-users under that reseller.
  • Review orders placed through the website alongside all other sales orders, filtered/sorted by their "Source" column.
  • Turn the in-page AI "Storefront" chat bubble on or off for the site's builder/preview domain.

Common tasks ​

  1. Publish the catalogue. In Storefront → Builder page, set Display Mode to "Catalogue only" (browsing) or "For sale" (checkout via Paystack), fill in store name/tagline/branding, and mark the site Published.
  2. Curate the product catalogue. Open /g/acc-items, tick items "Visible" and set their product line, features, badge and sort order (a bulk curation pass can also populate these automatically from the site's existing Item Group hierarchy).
  3. Build a content page. In the Website, tick a standard page (e.g. "Terms & Conditions") to create it from starter boilerplate, then edit its title/body/footer column and enabled state from the website-pages grid.
  4. Get a temporary domain live. Submit a label (3–32 lowercase letters/digits/hyphens) via POST /settings/website/temp-domain; the platform creates the <label>.lubb.co.za DNS record itself and provisions nginx + TLS, moving the domain from provisioning to live (or failed) with no DNS work needed from the site owner.
  5. Connect a custom domain. Point the domain's A record at the platform's public IP, then submit it via POST /settings/website/domain; the backend polls until the record resolves here, then provisions nginx + a Let's Encrypt certificate automatically.
  6. Turn on checkout and shipping. Enable Paystack, then set a flat shipping base amount, how many items it covers, and the per-extra-item charge — charged automatically on every order once the base is greater than zero.

Data model ​

  • Website (websites) — one row per site: display mode (catalogue_disabled / catalogue_only / for_sale), published flag, Paystack toggle, branding JSON, template preset, hero copy, flat shipping rates, and both the custom-domain and temporary-domain state machines (status/error/verified/cert-issued timestamps).
  • WebsitePage (website_pages) — a built/edited standard content page (title, slug, footer nav group, HTML body, enabled flag, sort order).
  • WebsiteSession (website_sessions) — an email-OTP sign-in session for a shopper: bcrypt-hashed one-time code, expiry, and a JWT revocation counter, tied to an acc_customer row.
  • AccItem (accounting module) — carries the website's own catalogue-curation columns directly (visible, product_line, features, feature_values, badge, sort_order); an item's website category is not stored but derived live from its Item Group. There is no separate product/SKU model — the website catalogue is a live view over accounting's item master.
  • AccSalesOrder (accounting module) — orders placed through the website are ordinary Sales Orders with source="storefront" plus checkout-specific columns; there is no separate order/order-item model. This is also the join point to Buying/Accounting: a website sale is stock-checked and invoiced exactly like any other sales order.

Configuration & integrations ​

  • InterWorx NodeWorx — the DNS control panel used to create the temporary subdomain's CNAME record (via a stored interworx_host3 credential) and looked up when verifying a custom domain's own DNS.
  • nginx + Let's Encrypt (certbot) — vhost creation and TLS issuance for both custom and temporary domains are done by a narrow, argument-validated root helper script invoked via sudo -n, never a shell string.
  • Paystack — the checkout payment provider when paystack_enabled is on (keys/config are managed separately, in the Paystack settings module).
  • Gemini image generation — used to isolate a favicon-ready icon from an uploaded logo and to generate a hero background image; both are preview-only until the admin saves.
  • websites — a separate Next.js/Once UI project that renders the actual public site at request time, calling back into this API over a shared-secret header for config, catalogue, checkout, auth and content-page data.
  • External website integrations (e.g. telecloud.co.za, boxseats) — authenticate with a personal API key against the read/write lookup endpoints (item/price lookup, customer lookup/creation, Paystack checkout-session creation for a submitted Sales Order).

API reference ​

Admin settings (/settings/website/..., admin/superuser only) ​

  • GET /settings/website — read the current website configuration.
  • PUT /settings/website — update display mode, branding, template, hero copy, shipping rates, etc.
  • GET /settings/website/pages / PUT /settings/website/pages — list/toggle the standard content pages.
  • POST /settings/website/domain — submit a custom domain for DNS verification + provisioning.
  • GET /settings/website/domain/status — poll custom-domain provisioning status.
  • DELETE /settings/website/domain — tear down and release the custom domain.
  • POST /settings/website/temp-domain — claim and provision a <label>.lubb.co.za temporary subdomain.
  • GET /settings/website/temp-domain/status — poll temporary-domain provisioning status.
  • DELETE /settings/website/temp-domain — tear down and release the temporary domain.
  • POST /settings/website/extract-favicon — AI-generate a transparent favicon from an uploaded logo (preview only).
  • POST /settings/website/generate-hero-image — AI-generate a hero background image from a prompt (preview only).

External website lookups (/website/..., personal API key) ​

  • GET /website/items — look up items by comma-separated SKU.
  • GET /website/item-prices — look up item prices by SKU (optionally by price list).
  • GET /website/customers — find a customer by exact email match.
  • POST /website/customers — create a new customer.
  • POST /website/orders/{order_id}/pay — turn a submitted Sales Order into a Paystack checkout session.

Public website (/public/website/..., shared-secret, called by websites) ​

  • GET /public/website/resolve — resolve a domain to its site.
  • GET /public/website/config — fetch a site's public website configuration (branding, template, display mode).
  • GET /public/website/catalogue — fetch the visible product catalogue.
  • GET /public/storefront/pages/{slug} — fetch a published content page.
  • POST /public/website/checkout — place an order and start payment.
  • POST /public/website/contact — submit the website contact form.
  • GET /public/website/orders/{token} — look up order status by token.
  • POST /public/website/auth/send-otp / POST /public/website/auth/verify-otp — email OTP sign-in flow.
  • GET /public/website/auth/me — fetch the signed-in shopper's info.
  • POST /public/website/auth/login / POST /public/website/auth/sso-exchange — password login and SSO token exchange.
  • GET /public/website/reseller/users / POST /public/website/reseller/users — list/create a reseller's end-users from their website.

Grid CRUD ​

Content pages are also editable as a standard grid at /g/website-pages (edit-only — rows are created by building a page in the Builder, not by the grid). Catalogue curation and order history are not separate grids: they're the standard /g/acc-items and /g/acc-sales-orders grids, filtered/sorted by their website-specific columns.

Lubb One Documentation