Lamp & Glow: Custom Next.js E-commerce & AI by Usman JabbarLamp & Glow: Custom Next.js E-commerce & AI by Usman Jabbar

Lamp & Glow: Custom Next.js E-commerce & AI

Usman Jabbar

Usman Jabbar

Eight markets, seven currencies, one codebase — and the back office that runs the workshop.
Eight markets, seven currencies, one codebase — and the back office that runs the workshop.
Eight markets, one codebase, and a back office that runs the workshop: the storefront, checkout, orders desk, logistics, marketing feeds, payroll and a Flutter workshop app for a handcrafted-lighting brand — built, shipped and operated by me, as co-founder, not as a contractor.

The Hook

Lamp & Glow makes solid-wood lamps in Sahiwal, Pakistan, and sells them to customers in Pakistan, the UAE, the UK, the EU, the US, Canada, Australia and Singapore. Every piece is handcrafted to order: wood is aged, turned, ridged, polished and dried before it is packed. That is the easy part.
The hard part is everything around it. A customer in Dubai expects AED pricing with duties included and a Type G plug. A customer in Lahore expects Cash on Delivery. A customer in Austin expects Apple Pay and a tracked parcel. The ads that bring them in expect a catalog in their currency and a purchase event Meta can trust. The workshop expects to know what to build today, and the makers expect to be paid by the piece on Friday.
Shopify could not do this the way we needed. So I built the system that does — and I run the brand on it every day.
From tap to doorstep — what happens after a customer pays, with nobody typing anything. (Illustrative data.)

The Challenge

What "a store" actually has to do when you make everything by hand and sell everywhere

Eight markets, seven currencies, each with its own price ladder — never a converted number, because a lamp that costs Rs 95,000 in Lahore is a different product decision at AED 3,295 in Dubai.
Payment methods that differ by market: COD in Pakistan only; Stripe, Apple Pay and Google Pay elsewhere; entity and statement descriptor handled correctly for UAE settlement.
Duties, VAT and shipping rules per market — DDP where we promise "duties & taxes included", free-shipping thresholds set by hand, plug type and bulb voltage matched to the destination.
Made-to-order fulfilment with real workshop stages (cutting, aging, turning, finishing, drying, packing), where "in stock" means "we will build it in 3–5 days".
Ads and SEO that need clean data: server-side purchase events, per-currency catalogs that refresh themselves, product pages that render on the server so crawlers and pixels see the price.
A team of makers who need attendance, piece-rate wages, advances and payouts — not a spreadsheet the founder fills in at midnight.
Customers who ask questions on WhatsApp at 2 a.m., and a founder who cannot answer all of them.
The brief I set myself: one Next.js codebase, one database, one login — and every one of those problems inside it, automated wherever a human tap adds nothing.

The Solution

Everything the brand runs on, and where it lives. One Next.js + Prisma + MongoDB core; everything else talks to it.
Everything the brand runs on, and where it lives. One Next.js + Prisma + MongoDB core; everything else talks to it.

1 · A storefront that changes with the visitor

The visitor's IP resolves the market before the page renders, and the market decides the whole experience: currency and price ladder, payment methods, contact number and WhatsApp line, plug and voltage, shipping threshold and duties messaging, even which Meta catalog the ad prices come from. The region is switchable from the header at any time.
8 markets · 7 currencies (PKR, AED, USD, GBP, EUR, CAD, AUD, SGD) across 6 regions, from one codebase.
Server-rendered product pages: price, stock and buy-box in the initial HTML, no client-side flicker.
Variant system with named groups ("Arrangement: Single / The Pair", "Plug: Type G / C / A-B / I") and one-line microcopy per option.
Signature editions with numbering and certificates; commissions ("Made to your measure"); gift cards, wrapping and corporate gifting; a Trade Program for designers, hotels and developers.
Trust row locked site-wide: Handmade in solid wood · Lifetime structural, 2-year electrical · Insured shipping · 14-day returns · Duties & taxes included (UAE).
Eight markets, seven currencies, six regions — the region selector as it appears on the site, and what each market controls.
Eight markets, seven currencies, six regions — the region selector as it appears on the site, and what each market controls.
The same product page in two markets: AED with duties included and a Type G plug; USD all-inclusive with Type A/B.
The same product page in two markets: AED with duties included and a Type G plug; USD all-inclusive with Type A/B.
One codebase, the IP decides — currency, payments, contact, plug type and shipping rules per region.

2 · Checkout and payments that respect each market

Stripe with Apple Pay and Google Pay for international markets; Cash on Delivery for Pakistan only (no cross-border COD, ever).
Correct legal entity and statement descriptor per market, so the customer sees the brand and settlement lands where it should.
Per-market shipping rules and thresholds; DDP duties and VAT baked into the price where promised.
Webhooks, not polling: the order exists the moment Stripe confirms, with market, currency and duties flag stored on it.

3 · The orders desk — every market, one table

The admin is the part I am proudest of, because it is the part we live in. Orders from all eight markets land in one table with bulk actions (set status, set payment, email customers, dispatch list, archive), status tabs (pending, processing, shipped, delivered, cancelled), payment tabs (paid, partial, unpaid, verifying, refunded), deep search across order number, customer, email, phone, product, city and country, overdue flags, and an archive that currently holds a few hundred fulfilled orders.
Statuses move from webhooks and from taps in the workshop app — not by hand.
The orders desk — one table for every market, with bulk actions, deep search and overdue flags. (Illustrative data, real UI.)
The orders desk — one table for every market, with bulk actions, deep search and overdue flags. (Illustrative data, real UI.)
One order, every event: payment, confirmation, workshop task, pixel event, catalog refresh, finishing, packing, courier, review request — each marked automated or tapped.
One order, every event: payment, confirmation, workshop task, pixel event, catalog refresh, finishing, packing, courier, review request — each marked automated or tapped.
Statuses moving as webhooks and workshop taps arrive.

4 · Analytics with a live map

The dashboard shows revenue by market, workshop load and an attention list; Analytics shows a live visitor map (pings by city, coloured by market, with arcs back to the workshop), the funnel from session to purchase, traffic sources and top products — all inside the same admin, not in five tabs.
The morning screen: revenue by market, workshop stages, activity feed, attention list.
The morning screen: revenue by market, workshop stages, activity feed, attention list.
Live visitors by city and market, funnel, sources and top products.
Live visitors by city and market, funnel, sources and top products.
Who is on the site right now.

5 · Fulfilment and logistics that update themselves

Workshop tasks open automatically when an order is paid — piece, wood, finish, edition number — and appear in the makers' Flutter app.
Stage changes are stamped by the maker who did them (turning, finishing, drying, packing) and show on the customer's Track Order page as build progress.
Courier booking through Flaship for Pakistan and RapidEx for international DDP shipments; the consignment number is saved to the order and pushed to the customer.
Delivered → review request → photo-for-gift prompt; abandoned-cart rules are suppressed for customers who already bought.
Nine things happen after the customer taps Pay. Nobody types anything.
Nine things happen after the customer taps Pay. Nobody types anything.

6 · Seventeen admin modules, one login

Dashboard · Analytics · Products · Signature · Categories · Orders · Gift Cards · Customers · Reviews · Staff & Access · Payroll · Inventory · Expenses & Workshop · Settings · Partnerships · Marketing · Journal. Role-based access per module, so a packer sees packing and a manager sees finance.
The back office — the same sidebar you see in the real admin, in the same order.
The back office — the same sidebar you see in the real admin, in the same order.
Expenses & Workshop — attendance, piece-rate, materials, and payroll approvals with per-maker wallets.
Expenses & Workshop — attendance, piece-rate, materials, and payroll approvals with per-maker wallets.

7 · Marketing plumbing that ads can trust

Meta Pixel + Conversions API with a shared event_id on every event (deduplicated), hashed email/phone for advanced matching, first-party identifiers.
Seven catalog feeds — one per currency — regenerated hourly from the store, so ad prices always match the site.
GA4 via gtag, one GTM container, Pinterest tag, consent gate before the EU and UK.
SEO layer: Product JSON-LD on every product page, server-filtered category pages with their own titles and meta, a Journal for internal links, sitemap and hreflang per market.
Automations: abandoned cart (email + WhatsApp), review requests, back-in-stock and edition alerts, trade leads into a Google Sheets CRM through a custom API.
The marketing hub: seven feeds, Pixel + CAPI event health, campaigns, SEO and automations.
The marketing hub: seven feeds, Pixel + CAPI event health, campaigns, SEO and automations.
Every event, twice-checked. Every price, in the right currency.

8 · AI where it saves real hours

Content pipeline on Groq (llama-3.3-70b) with the brand's rulebook baked in — banned phrases, register, no stock lines — that described ~92 products and ~190 variants, with every line passing a human before it went live. Saved 60+ hours of copywriting on the first pass.
WhatsApp sales agent: Groq tool-calling over Prisma queries on the live catalog (no vector database — the catalog is small enough to reason over directly). It quotes prices per market, states the delivery promise from region config, answers care and warranty questions, and opens a commission lead when someone wants a custom size. Roughly 80% of tier-1 questions are resolved on the spot; anything with a price exception is handed to a human.
The WhatsApp agent answers like the founder, from the real catalog.
The WhatsApp agent answers like the founder, from the real catalog.
A real-shaped conversation, tool calls shown.
Product copy that follows the brand's rules, not the model's habits.
Product copy that follows the brand's rules, not the model's habits.

9 · The workshop app (Flutter)

Riverpod 2, go_router, Dio and Cloudinary on the front; the same Next.js API and database behind it. Makers punch in and out, see their tasks, stamp stages, log purchases with receipt photos, and watch their wallet. One production bug worth mentioning: punch-out times showed wrong until shift lookups were moved from UTC to Pakistan time on the backend — the kind of thing you only meet when real people clock out.
Today, Workers, Wallet — the workshop side of the same database.
Today, Workers, Wallet — the workshop side of the same database.

The Engineering

Next.js 15 (App Router) on Vercel — server-rendered product pages, edge market resolution, streamed layouts, hourly feed jobs.
Prisma + MongoDB — products, 190 variants, per-market price ladders, orders, customers, makers, wallets, events.
Stripe (cards, Apple Pay, Google Pay), COD flow for Pakistan, webhooks for order creation and payment state.
Cloudinary image pipeline with per-breakpoint sizes and blur placeholders.
Meta Pixel + Conversions API, GA4 and GTM, Pinterest tag, Product JSON-LD.
Groq for the content pipeline and the WhatsApp agent (WhatsApp Cloud API).
Flutter (Riverpod 2, go_router, Dio) for the workshop app.
Speed hygiene: fixed a React #419 SSR failure caused by an ESM-only dependency, removed prefetching of auth routes, debounced checkout syncs, cart state per market.
Built so the first paint is the product, not a spinner.
Built so the first paint is the product, not a spinner.
Retail, commissions, gifting and trade — each with its own flow, one backend.
Retail, commissions, gifting and trade — each with its own flow, one backend.

The Outcome

A brand that runs on its own software.
A brand that runs on its own software.
8 markets and 7 currencies from one codebase, resolved by IP.
Hundreds of orders a month handled in one table, without extra staff.
17 admin modules — orders to payroll to marketing — behind one login with role-based access.
~92 products and ~190 variants described by the AI pipeline and approved by a human; 60+ hours saved.
~80% of tier-1 WhatsApp questions resolved by the agent.
Nine automations per order, from payment to review request.
Own brand, own stack: every decision above was made as the founder who has to ship the lamp.

Let's build yours

If you have outgrown Shopify — multiple markets, made-to-order fulfilment, a team to pay, ads that need clean data — this is the kind of system I build: a custom Next.js storefront and back office around your real operation, with speed, automation and role-based access from day one.
I take on a small number of custom commerce builds at a time. Message me on Contra with the part of your operation that still lives in spreadsheets, and I'll reply within a few hours with how I'd approach it.
→ Start your custom store build.
Like this project

Posted Aug 30, 2026

Next.js store in 8 markets/7 currencies + custom back office: orders, payroll, live analytics, 7 catalog feeds, Pixel+CAPI, WhatsApp AI agent, Flutter ops app.