
GMI Trading is a specialty food import and distribution company serving wholesale buyers across 48+ states. Their existing systems couldn't keep up - managing tens of thousands of SKUs from hundreds of international brands, customer-specific pricing with volume discounts, real-time inventory that changes hourly, and a wholesale buyer base that required modern self-service ordering. The legacy workflow relied on phone calls, PDFs, and manual price lookups. Product data was stored in LodDepot (their ERP), while images were scattered across Azure, Shopify, and AWS, resulting in no unified catalog experience. Every price was unique to each customer, making a standard e-commerce approach impossible.
We built a fully headless B2B e-commerce platform from scratch - a decoupled Next.js frontend paired with a GraphQL/Express backend, PostgreSQL for product data, and Redis for high-performance caching. The platform syncs with the LodDepot ERP on an hourly basis to provide up-to-date inventory and pricing. It supports customer-specific pricing based on account relationships and delivers a modern self-service ordering experience for wholesale buyers. The admin panel gives GMI’s team full control over products, collections, brands, marketing content, and vendor applications - all without writing code.












Every price is calculated per customer based on account relationships. Supports percentage-based discounts, volume discounts (quantity tiers), and free goods promotions. Prices update in real time from LodDepot with 2-minute cache intervals.
Hourly automated sync pulls product data, inventory levels, and category structures from the LodDepot API. Smart collections automatically rebuild when new products appear. Sync logs track all operations with error reporting. Manual sync can be triggered from the admin panel.
Fully typed GraphQL layer for all admin operations, including product management, collection CRUD, category editing, and analytics queries. Firebase Admin authentication middleware secures all mutations. Cache invalidation triggers automatically on data changes.
Filter-based collections with complex AND/OR logic. Automatically match products based on vendor, country, categories, and custom attributes. Rebuilt hourly during sync. Supports manual, auto (ERP-synced), and smart (rule-based) collection types.
Product images migrated from Azure, Shopify, and AWS into unified S3 storage. Automatic format optimization via S3 query parameters. Products support up to 5 images each. Brand logos and headers are managed separately through the admin UI.
Variable TTL strategy: products 10 minutes, collections 15 minutes, pricing 2 minutes, search 3 minutes, sessions 24 hours. Reduces LodDepot API calls by approximately 80%. Cache invalidation occurs on admin updates. Session storage uses HttpOnly cookies.
Dynamic XML sitemaps for 10K+ products. SEO-friendly slugs for brands, countries, and collections, with automatic 301 redirects for migrated URLs. Server-side rendering for meta tags, Open Graph, and structured data.
Dedicated pages for each vendor and brand with custom logos, headers, descriptions, and product listings. Country-based browsing enables discovery of specialty products. All content is editable in the admin panel with SEO fields.
Shopping cart with local persistence, bulk quantity input, and unit conversion display (kg, cs, pcs). Supports PO numbers, delivery or pickup selection, and order history from LodDepot. Includes customer registration and vendor application forms.
Account-based authentication using JWT tokens. Sessions stored in Redis with a 24-hour TTL. Account numbers are automatically included in pricing API requests. Customer-specific catalog views based on account relationships.
Product management with full-text search and pagination across 10K+ items. Drag-and-drop product curation for featured sections. Rich text editor (Tiptap) for collection content. Includes sync status monitoring, vendor application review, and user management.
Fully containerized stack: PostgreSQL 16, Redis 7, Express backend with automatic migrations, and a Next.js frontend with Turbopack. Docker Compose orchestration. Designed for horizontal scaling with stateless Redis sessions.