Loading

B2B Platform · 2026

B2B Textile Ordering Platform

A B2B ordering, Design Room and production-tracking platform for a textile manufacturer, built in four weeks and live since October 2026.

Year

2026

Type

B2B Platform

Role

Solo Developer

Tech Stack

  • Next.js
  • React
  • TypeScript
  • Prisma
  • PostgreSQL
  • Tailwind CSS
  • shadcn/ui
  • Zod
  • Vitest
  • Playwright
  • Docker
  • Caddy
NDAClient work. Source code for this project cannot be shared due to a non-disclosure agreement.

Project Summary

A B2B platform for a textile manufacturer that sells through pre-orders rather than a classic online shop. Buyer companies apply for membership. Once approved, they order from a showroom with a size-by-quantity grid, pick fabrics and customize products in a Design Room, then follow each order through production. The manufacturer's team works in an admin panel with nine permission-based roles, including finance, production, warehouse and customer representatives. The plan was 11 phases over four weeks of development and two weeks of client acceptance, and the platform went live at the end of October 2026.

The system is a modular monolith on Next.js 16 and PostgreSQL 16. Every business rule runs in a server-side domain service, and each change writes its audit record in the same transaction. The data model has 51 Prisma models and 38 migrations. Before launch, all 1,352 unit tests and 898 integration tests passed, along with 35 browser end-to-end packages totalling 2,654 checks. The platform runs on a single server with Docker Compose (Caddy, app, worker, Postgres and ClamAV), automatic TLS and scripted backups.

Problem & Solution

Problem
  • Wholesale buyers had to be vetted before they could see the catalogue and place orders
  • Small boutique orders often fall below a fabric's minimum order quantity
  • Starting production or shipping before payment is confirmed is a direct payment risk
  • Buyers could not see where their order was in production
  • Catalogue and fabric stock data had to move in from spreadsheets and stay traceable
Solution
  • Application-based membership with approve, reject and request-more-information steps
  • An automatic MOQ check per fabric, with a percentage surcharge or a shared order pool as alternatives
  • Versioned proformas with a 35% deposit and a 65% balance: production opens only after the deposit, and nothing ships before the balance is paid
  • A 12-stage production chain, shown to buyers as a progress stepper and to the production team as a kanban board
  • Excel import and export, an opening-data template and a fabric stock ledger with an audit log

Key Features

01

Order Engine

Size-by-quantity order grid with one draft per collection, revisions with an audit trail, and stock orders using size-run packs.

02

Proforma & Payment Gates

Versioned proformas, receipt upload with virus scanning, and a finance queue that marks each payment as accepted, partial, overpaid or rejected.

03

Production Tracking

A 12-stage chain with stage history and per-line progress. The team manages it on a kanban board, and buyers follow it in their portal.

04

Fabric MOQ & Shared Pools

Fabric need is calculated as quantity × consumption. Buyers below the minimum can pay a surcharge or join a shared pool, which closes under row-level locking.

05

Design Room

A product configurator where admins choose which options each product exposes. It enforces customization minimums and measurement tolerances, and an admin reviews every change.

06

Notifications

A notification centre and 42 email types, 37 of them editable by the super admin, sent through a database outbox and a separate worker.

Technical Details

Architecture

A modular monolith with domain services in one server layer and permission-based RBAC across nine roles. Each change writes its audit record in the same transaction.

Data Model

51 Prisma models, 29 enums and 38 migrations on PostgreSQL 16, using Prisma 7 with the pg driver adapter.

Security

Custom authentication with argon2id password hashes, hashed session tokens and a lockout after repeated failed logins. ClamAV scans every upload.

Testing & Delivery

Vitest unit and integration tests, Playwright-driven end-to-end packages and axe-core accessibility checks. It deploys with Docker Compose behind Caddy, which issues Let's Encrypt certificates automatically.

Have a project? Let's talk.

Have a project in mind or a question about my work? Email or LinkedIn is the best way to reach me.