2026
B2B wholesale fashion marketplace across 79 locales. Next.js 16 storefront + partner dashboard paired with Django REST API, PostgreSQL/pgvector search, buyer onboarding via Stripe, and offer enquiry workflows.
Overview
Distrb is a production B2B wholesale platform connecting fashion brands (partners) with buyers across Europe and beyond. Partners manage product catalogues, offers, and enquiries; buyers browse collections, build carts, and apply through a paid onboarding flow.
The stack spans distrb-next (Next.js 16, React 19, TanStack Query) and distrb/django — Django 5 + DRF on PostgreSQL with pgvector, Elasticsearch semantic search, S3 media, and Celery background jobs. JWT auth (180-day tokens) bridges frontend server actions and the REST API.
Public shop
Localized storefront under /[locale]/ with 79 locales via next-intl — translated URL segments (e.g. /angebote in German) and remote translation bundles from trade.distrb.com.
- Catalog — brands, collections, product detail with variants/SKUs, search (
/search/[query]) - Offers — promotional B2B listings separate from core shop products
- Cart & checkout — authenticated cart with multi-currency price snapshots; checkout requires login
- Buyer onboarding — multi-step
/onboarding-buyer→ Django creates application → Stripe Checkout (~€49 fee) → staff approval
Partner dashboard
Partners (user.partner) access /partner with a full operations suite:
- Products — CRUD with variants, multi-currency pricing, warehouse stock, media reorder (
@dnd-kit), CKEditor descriptions - Offers — create/edit promotional listings with favourites and enquiry threads
- Offer enquiries — inbox with threaded messages between buyers and partners
- Orders — order list and detail views
- Analytics — GA realtime dashboard + PostHog product analytics
- Settings — profile, security, presaved message templates (intercepting drawer route)
Staff users (is_staff) also review buyer onboarding applications and manage member accounts.
Backend API
Django apps: shop (products, cart, offers, enquiries, search), account (users, companies, onboarding, OTP password reset), website (translations, FAQ), emails (inbound webhook conversations).
- Products —
ShopProduct+ variants, parler i18n (40+ languages), auto-translate via Google Cloud + Celery - Search — Elasticsearch keyword + OpenAI embeddings (1536-dim pgvector) with RRF fusion
- Enquiries —
OfferEnquiry+ messages on offers; emailConversationthreads separately - Cart — authenticated with price/stock refresh; order model planned (
convertedstatus placeholder) - Onboarding — public
POST /api/onboarding/new/; staff approve → creates user + welcome email (ZeptoMail)
Technical notes
Frontend uses server actions + React Query hooks calling NEXT_PUBLIC_API_URL; JWT stored in httpOnly accessToken cookie with a Next.js token-bridge route for client fetches. ISR with cache tags on shop data; standalone output for container deploy.
Infrastructure: Redis cache (prod), S3 (eu-central-1), Celery beat, Docker + Gunicorn. Stripe is wired in Next.js for onboarding only — shop checkout has no card gateway in Django yet.