Back to Projects
Total Liquor
In-progress

Total Liquor

A full-stack B2B liquor marketplace connecting Texas restaurants and bars with licensed liquor stores, featuring real-time order management, Finix payment processing with split transfers, and TABC compliance automation.

RoleFull Stack Developer

Key Challenges

  • Implementing a two-step payment flow (authorization → capture) with Finix split transfers to automatically divide funds between store merchants and the platform, including idempotent webhook processing for transfer confirmations and fee reconciliation.
  • Building a real-time order lifecycle management system using Socket.IO that synchronizes order state transitions (placed → accepted → ready → in_transit → delivered) across buyer, seller, and admin dashboards with instant notifications and live board updates.
  • Designing a dynamic dual-flow pricing engine (Flow A / Flow B) with configurable seller margins, platform markups, and per-store overrides that recalculates prices in real-time via WebSocket broadcasts when admin settings change.
  • Architecting TABC (Texas Alcoholic Beverage Commission) license compliance automation with live API verification, scheduled cron-based license sync, expiration monitoring with automated email alerts, and order-blocking for non-compliant businesses.
  • Engineering a unified order acceptance system supporting full accept, partial modifications (item removal/quantity adjustment), order splitting for high-value orders (>$3,000 threshold), and store-initiated cancellations — each with corresponding payment adjustments (void/refund/re-authorization).

Key Learnings

  • Mastered financial platform architecture including double-entry ledger accounting, split payment processing, settlement reconciliation, and zero-fee merchant profile management with Finix payment gateway.
  • Gained deep experience with B2B marketplace multi-tenancy patterns — county-based store assignment, role-based access control (owner/manager/staff/admin), and business-type routing guards for buyer vs. seller experiences.
  • Learned to implement robust cron-based background job orchestration with mutex guards for concurrent execution prevention, covering TABC license sync, Finix fee reconciliation, payout status sync, and auto-delivery marking.
  • Developed expertise in building production-grade checkout flows with card tokenization (Finix.js SDK), PCI-compliant payment instrument storage, authorization hold management, and graceful failure recovery with cart preservation.
  • Understood the complexity of building compliance-driven e-commerce — sticker management for regulatory tracking, TABC license verification workflows, county serviceability checks, and audit logging for every business-critical action.

Overview

Total Liquor is a B2B liquor marketplace platform operating in Texas that connects buyers (restaurants, bars, and hospitality businesses) with licensed liquor stores (sellers) for wholesale liquor ordering with delivery. The platform handles the entire order lifecycle from product browsing and cart management through checkout, payment processing, order fulfillment, and settlement — all while enforcing TABC (Texas Alcoholic Beverage Commission) compliance at every step.

The platform processes payments via Finix with a two-step authorization → capture flow and automated split transfers, ensuring stores receive their earnings while the platform retains its commission. A double-entry ledger system tracks every financial transaction for complete audit transparency.

Key Features

Multi-Role B2B Marketplace

Three distinct user experiences — Buyer Portal for browsing 1,000+ products with advanced filtering (category, brand, spirit type, price range), Store Dashboard with real-time live order board and analytics, and Admin Panel with comprehensive platform management, user oversight, and financial reporting.

Finix Payment Processing & Split Transfers

Complete payment lifecycle management with PCI-compliant card tokenization via Finix.js SDK, two-step auth/capture flow, automated split transfers dividing funds between merchant and platform, webhook-driven confirmation, and support for voids, full/partial refunds, and dispute handling.

Real-Time Order Management

Socket.IO-powered live order board enabling instant state transitions (placed → accepted → ready → in_transit → delivered), unified order acceptance with modification/splitting capabilities, sub-order management, and real-time price update broadcasting across all connected clients.

TABC Compliance & License Automation

Automated TABC license verification via live API checks during registration and checkout, scheduled daily license sync cron jobs, expiration monitoring with staged email alerts (warning → expired → reactivation), sticker management for regulatory tracking, and automatic order blocking for non-compliant businesses.

Financial Platform & Analytics

Double-entry platform ledger tracking order revenue, processing fees, and store payouts. Comprehensive admin analytics with revenue trends, store performance comparisons, peak ordering hours, conversion rates, and customer LTV. Automated settlement reconciliation running daily with full P&L reporting.

Technical Implementation

The application follows a modern full-stack architecture with a React 19 SPA frontend (Vite + TailwindCSS v4) communicating with an Express.js v4 REST API backed by PostgreSQL via Sequelize ORM. State management uses RTK Query with automated cache invalidation triggered by Socket.IO events, ensuring real-time data freshness without manual refetching. The backend employs 42 Sequelize models spanning the full domain — from core entities (users, businesses, orders, products) to financial models (payments, splits, ledger entries, settlements) and compliance models (licenses, stickers, audit logs).

  • Frontend Stack: React 19 + Vite 7 + TailwindCSS v4, Radix UI primitives, RTK Query for API state management, React Hook Form + Zod validation, Recharts for analytics dashboards, and Socket.IO client for real-time updates.
  • Backend Stack: Express.js v4 on Node 18+, PostgreSQL with Sequelize ORM (42 models), Redis caching via ioredis, JWT authentication (15min access + 7d refresh tokens with automatic rotation), and rate limiting.
  • Payment Infrastructure: Finix payment gateway with seller KYB onboarding, card tokenization, auth/capture split-transfer flow, webhook processing with HMAC signature verification, zero-fee profile management, and automated fee reconciliation cron jobs.
  • Background Jobs: Six concurrent cron jobs — TABC license sync (daily), Finix fee reconciliation (every minute), capture retry for stuck payments (every 5 minutes), finance reconciliation (daily at 2 AM CST), payout status sync (every 30 minutes), and auto-delivery marking — all with mutex guards preventing concurrent execution.
  • Cloud Services: AWS S3 with presigned URLs for license document and product image storage, Nodemailer for transactional emails (OTP verification, license alerts, order notifications), and PDFKit/jsPDF for invoice and receipt generation.
  • DevOps & Infrastructure: Frontend deployed on Netlify with SPA redirects, backend on Render, GitHub for source control with PR-based workflow, and comprehensive environment-based configuration management.

Design & Developed by Kunj Detroja
© 2026. All rights reserved.

Command Palette

Search for a command to run...