UHADEVSee DMS
← Back to work
2026/SBK Tyre Distributors

SBK Tyre Distributors

A B2B wholesale tyre ordering portal for Australian dealers. Authenticated dealers browse a product catalog with fast tyre size search, manage a client-side cart, place orders, and track history. Admins manage inventory and fulfill orders.

Next.js 14TypeScriptTailwind CSSShadcn-UIZustandSupabase (PostgreSQL + Auth + RLS)Cloudflare Pages

Context

SBK Tyre Distributors supplies tyres to dealers across Australia. Dealers needed a dedicated portal to browse wholesale inventory, see dealer-specific pricing, and place orders without calling or emailing.

The problem

Dealers called or emailed orders — time-consuming for both parties, prone to miscommunication on tyre sizes and quantities. Wholesale pricing was shared via email or PDF catalogs that quickly became outdated. Stock levels were not visible to dealers, leading to orders for out-of-stock products.

Why existing tools failed

Phone and email ordering requires manual order entry by the distributor, creating a labor bottleneck. Static PDF catalogs can't show real-time stock or pricing. Dealers had no way to check if a tyre was in stock before ordering.

Constraints

Only authenticated dealers could see wholesale pricing. The tyre catalog needed fast search by size (e.g., '205/55R16') — a non-trivial search problem. The system needed to handle B2B order workflows, not consumer e-commerce.

Solution

A Next.js 14 application with Supabase backend. Dealers authenticate to access the catalog with dealer-specific wholesale pricing. A trigram-indexed search enables fast tyre size lookups. Zustand manages the client-side cart. Orders are placed with pickup/delivery options. Admin dashboard provides inventory management, order fulfillment with shipping cost tracking, and user management. Stock auto-deducts on order placement via a SECURITY DEFINER database trigger.

Architecture

Coming soon.

Key design decisions

  • Next.js App Router for SSR and static generation. SEO matters for product pages.
  • Trigram indexes on tyre size fields enable fast partial-match search — critical for dealers typing partial size strings.
  • Zustand for cart state — simple, TypeScript-first, no boilerplate.
  • SECURITY DEFINER trigger for stock deduction ensures atomicity even under strict RLS policies.
  • Shadcn-UI for consistent, accessible component design.

Tech stack

Frontend

  • Next.js 14
  • TypeScript
  • Tailwind CSS
  • Shadcn-UI
  • Zustand

Backend

  • Supabase (PostgreSQL + Auth + RLS)

Infrastructure

  • Cloudflare Pages

Result

Dealers can search inventory in real-time, see wholesale pricing, and place orders directly. Stock visibility eliminated out-of-stock orders. The admin dashboard provides complete order lifecycle management.

Lessons learned

  • Trigram indexes are great for partial text search in PostgreSQL but need careful maintenance on large datasets — monitor index size and query performance.

  • B2B cart behavior differs from B2C — dealers often place orders on behalf of their shop, need order notes, and expect different fulfillment options.