Project 1

Buzfi — Multivendor Ecommerce Platform

Buzfi
Buzfi is a full-stack multivendor ecommerce platform that covers the entire commerce lifecycle — from product discovery and checkout to seller fulfillment, payouts, returns, verification, and live support. It serves customers, sellers, and dropshippers on one public web app, and admins/support on a dedicated operations panel, so buying, selling, and platform moderation stay in one coherent system.
Overview

Description

Buzfi is a multivendor marketplace built as three coordinated applications: a public storefront and merchant dashboard (website-v2), an internal admin/ops panel (admin-v2), and a NestJS API (backend-v2). Customers browse categories, brands, collections, and stores; sellers and dropshippers run operational workflows (catalog, fulfillments, documents, payouts); admins and support staff verify merchants, manage catalog and orders, process refunds and payouts, and handle live chat.

The platform emphasizes trustworthy commerce UX: Stripe-powered checkout with 3DS and repayment flows, S3-backed document and media uploads, real-time Socket.io chat and notifications, Elasticsearch-backed product search, and role-based dashboards that treat buyers and merchants as first-class users — not afterthoughts.

Key Features

Storefront & Discovery (website-v2)

  • Homepage: dynamic sliders (top / middle / bottom), shop-by-category, brands, collections, product grids, audience CTAs (seller/dropshipper), CTA banner
  • Dedicated pages for categories, brands, products (filters + catalog), product detail, and public store profiles
  • Global search across products and related catalog entities (Elasticsearch-backed)
  • Wishlist (guest + authenticated sync patterns)
  • Cart, coupons, and Stripe checkout (saved cards, 3DS / bank verification)
  • Help & Support hub, email-style support inbox, and live chat

For Customers

  • Browse categories, brands, collections, products, and store pages
  • Wishlist, cart, coupons, and Stripe checkout (saved cards / 3DS)
  • Order list/detail, tracking, cancel where allowed, unpaid-order repayment within the payment window
  • Shipping address CRUD with profile/contact prefill
  • Return/refund requests and detail views
  • Product reviews with image attachments
  • Dashboard overview, notifications inbox, profile
  • Real-time notifications and live support chat
  • Auth: login, signup, forgot/verify/set/change password, Google OAuth, complete-profile
  • Multi-role accounts (switch customer / seller / dropshipper without re-login)
  • Register additional roles from an existing account (customer / seller / dropshipper)

For Sellers

  • Store creation and management (logo, banner, online/approval status, per-store shipping rules)
  • Product catalog: create/edit variants/attributes, rich content (TipTap), bulk CSV upload, image uploads
  • Fulfillment workflows and order operations
  • Returns handling and payout request list/detail
  • Seller statistics / dashboard overview (charts)
  • Identity and business document submission with admin review status and resubmit after rejection
  • Live chat with support (including seller escalation into customer chats)
  • Notifications and profile management

For Dropshippers

  • Buyer-style commerce hub (wishlist, shipping addresses, orders, returns, checkout)
  • Identity and tax document upload / resubmit after rejection
  • Dashboard overview, notifications, profile
  • Live support chat and help-support inbox

For Admins & Support (admin-v2)

  • Dashboard overview; separate Support tickets and Live chat surfaces
  • Live chat inbox: queue, claim, reply, escalate to another agent or add/remove seller
  • Send / manage platform notifications
  • User management: staff admins, customers, sellers, dropshippers
  • User moderation: ban / approve accounts
  • Seller flows: identity approve, account approve, commission settings, KAM-related payout support, document review (approve / reject / resubmit)
  • Dropshipper identity/account approve and document review
  • Catalog ops: categories (tree), collections, brands, attributes (+ attribute values), tags
  • Products: all / Buzfi / seller lists, create/edit, active-status controls, bulk product upload, bulk image upload
  • Partners: stores (+ store shipping rules), partners, suppliers (+ supplier shipping rules)
  • Orders detail/ops; seller and supplier fulfillments
  • Invoices: list, detail, create, status updates
  • Return refunds (including Stripe refund submission)
  • Payout requests: list, detail, create (support), admin update
  • Marketing: coupons (targeting customers/dropshippers/stores/suppliers), dynamic homepage sliders
  • Geo data: countries, states, cities
  • Admin auth: login, set-password (invite), session refresh

Platform Features

  • JWT auth with refresh cookies; separate admin auth surface vs marketplace users
  • Google OAuth for marketplace users (Facebook OAuth packages present on backend)
  • Role-based access (customer / seller / dropshipper; SUPER_ADMIN / ADMIN / SUPPORT)
  • AWS S3 presigned uploads for images, documents, chat media, and bulk assets
  • Socket.io namespaces for /chat and /notifications
  • Elasticsearch product/catalog search indexing
  • Firebase Cloud Messaging for device push registration
  • Email flows (invites, password reset, transactional mail)
  • Background jobs via BullMQ + Redis (e.g. product bulk import)
  • Shipping calculation and store/supplier shipping-rule engines
  • Commission configuration for sellers
  • Contact-us API module
  • Audit logging module
  • Content moderation helpers (e.g. profanity filtering on backend)
  • Swagger-documented NestJS REST API

Problem Solved

Buzfi addresses the usual gaps when marketplaces try to bolt seller ops, dropshipping, and support onto a simple storefront:

  • Fragmented commerce roles — One platform for customers, sellers, and dropshippers, with profile switching and add-role registration instead of separate logins
  • Weak merchant onboarding — Structured document verification and admin review instead of opaque “pending” states
  • Checkout trust & recovery — Stripe Elements, 3DS, and repayment for unpaid orders instead of dead-end failed payments
  • Ops blind spots — Dedicated admin app for catalog, fulfillments, refunds, payouts, invoices, and moderation (ban/approve)
  • Support lag — Live chat with queue/claim/escalate and a separate ticket/inbox channel, plus notification sockets
  • Catalog scale — Bulk product + bulk image import, attributes/values/variants, shipping rules per store/supplier
  • Discovery at marketplace size — Global search and Elasticsearch indexing instead of naive client-only filtering
  • Homepage marketing control — Dynamic sliders by placement/position instead of hardcoded banners
  • File handling safety — S3 uploads with client validation; no paste-URL-only media fields in product UI
  • Seller economics — Commission configuration and payout request workflows for platform and support staff
Technologies

Backend

  • NestJS
  • TypeScript
  • PostgreSQL
  • Drizzle ORM
  • MongoDB
  • Mongoose
  • Redis
  • BullMQ
  • Stripe
  • Socket.io
  • Elasticsearch
  • AWS S3
  • Firebase Admin (FCM)
  • Passport JWT
  • Google OAuth
  • Facebook OAuth
  • Nodemailer
  • Handlebars
  • Swagger

Frontend

  • Next.js 16
  • React 19
  • TypeScript
  • Tailwind CSS 4
  • Zustand
  • Zod
  • TanStack Table
  • React Hook Form

Other

    Role And Contributions

    Role

    Full-stack Frontend Engineer on website-v2 and admin-v2 — building and iterating commerce and ops UIs against NestJS APIs.

    Contributions

    • Built and iterated website-v2 and admin-v2 commerce and ops UIs against NestJS APIs
    • Merchant document verification UX: modal preview, rejection display, S3 re-upload, resubmit flows for sellers and dropshippers; admin document review panels
    • Checkout / repayment flows: unpaid order repayment after cart clear, Stripe 3DS confirm/sync patterns
    • Live chat on website and admin: Socket.io subscribe/send, multi-session listen, in-app + browser push-style alerts
    • Homepage middle banners wired to dynamic slider API (sliderPosition=middle), aligned top/middle/bottom with admin CMS
    • Hardened admin login so API/cookie failures surface as form errors instead of crashing the app
    • Shipping address UX (profile prefill, consistent form controls)
    • Consistent patterns: S3-first uploads, structured forms (no raw JSON editors), role-aware dashboards
    Challenges And Learnings

    Challenges

    1. Multi-role marketplace UX on one frontend

    Challenge: Customers, sellers, and dropshippers share website-v2 but need different dashboards, permissions, and document flows without confusing navigation.

    Solution: Role-scoped dashboard routes (/dashboard/[role]/…), shared auth store with current role, and feature gates per persona while reusing design system components.

    2. Real-time support chat across two apps

    Challenge: Customers chat on the website while agents work in admin; messages must sync live, support must see new tickets, and notifications should not spam when the user is already viewing the thread.

    Solution: Socket.io /chat namespace with room subscribe, support room for new_chat_created, multi-session subscription on the inbox, and push helpers that skip self/system messages and active-thread focus.

    3. Stripe checkout reliability

    Challenge: Failed or incomplete payments leave unpaid orders; refreshing after place-order clears the cart and breaks naive “retry from cart” flows.

    Solution: Dedicated repayment API path on the order, session storage for pending order id, 3DS confirm/sync helpers, and a repayment panel on order detail within the unpaid window.

    4. Merchant document verification

    Challenge: Sellers and dropshippers upload sensitive docs; admins must preview, approve/reject with reasons, and allow clean resubmission without raw URL pasting.

    Solution: S3 presigned upload fields, document preview dialogs, rejection messaging, and admin review panels that map to backend document-review endpoints.

    5. Auth cookies & server actions (admin)

    Challenge: Login server actions could succeed at the API but fail to persist session cookies (Set-Cookie not exposed via headers.entries()), then redirect into a broken dashboard render (500).

    Solution: Capture cookies via getSetCookie(), shared apply-auth-cookies helper, validate cookies were applied before redirect, and unstable_rethrow so Next redirects still work inside try/catch.

    6. Dynamic marketing content vs static placeholders

    Challenge: Homepage middle banners were hardcoded while top/bottom already used the dynamic slider API — and bottom incorrectly queried middle.

    Solution: Middle grid loads sliderPlacement=homepage&sliderPosition=middle; bottom uses bottom; fallbacks keep the page usable if CMS is empty.

    7. Ops density without chaos (admin)

    Challenge: Admin needs dense tables and forms (products, fulfillments, payouts, verification) without becoming an unusable spreadsheet clone.

    Solution: Shared table/filter patterns, server actions with toast feedback, structured forms, and Shopify-admin-like clarity (per product design principles).

    8. File uploads everywhere

    Challenge: Many entities need images/docs (products, stores, chat, KYC). Pasting URLs is error-prone and inconsistent.

    Solution: Platform rule: upload via S3 presign → PUT → store publicUrl; show type/size limits, progress, preview, and remove-before-submit.

    Learnings

    1. Commerce platforms are workflow products

    • Optimize for completing jobs (checkout, approve seller, fulfill, refund), not decorative dashboards
    • Equal craft for buyer and merchant surfaces builds trust

    2. Real-time needs product rules, not just sockets

    • Subscribe to the right rooms; dedupe notifications; respect visibility and active thread
    • Separate chat namespace from notifications namespace keeps concerns clear

    3. Payments fail in the real world

    • Design repayment and 3DS recovery as first-class UX
    • Never assume cart state survives a successful place-order

    4. Verification is a product surface

    • Rejection reasons and re-upload paths matter as much as “approved”
    • Admins need preview + structured review, not JSON blobs

    5. Next.js server actions are still servers

    • Cookie/header edge cases can turn into production 500s
    • Always return actionable { error } to the form; never let ops failures crash the login page

    6. CMS alignment across apps

    • Admin slider positions must match website fetch params (top / middle / bottom)
    • Fallbacks prevent empty homepage sections during content gaps

    7. Monorepo discipline

    • Frontend-only changes against a documented API contract reduce thrash
    • Shared UX rules (S3 uploads, no raw JSON fields) keep both apps coherent
    Achievements

    Metrics

    Impact Highlights

    • Reduced merchant onboarding friction via document review UX
    • Recoverable unpaid checkouts via repayment flow
    • Real-time support for marketplace and ops staff

    Testimonials

    Onboarding used to be a black box. With Buzfi I upload documents, see exactly why something was rejected, and resubmit in minutes. My store was live the same week.

    Maya Chen

    Independent Seller

    Checkout finally feels trustworthy. Saved cards, 3DS when needed, and when a payment stalled I could repay from the order page instead of starting over.

    Jordan Blake

    Marketplace Customer

    I get buyer tools and merchant verification in one account. Switching roles without logging out again made day-to-day ops so much cleaner.

    Priya Nair

    Dropshipper

    Bulk product upload and clear payout requests saved me hours every week. I spend less time fighting the admin panel and more time fulfilling orders.

    Elena Rossi

    Boutique Seller

    Technical Details

    Architecture

    Buzfi is a three-app monorepo: website-v2 is the multivendor storefront plus customer / seller / dropshipper dashboards (Next.js); admin-v2 is the platform administration and support ops panel (Next.js); backend-v2 is the NestJS API with WebSockets, jobs, and integrations.

    Both frontends talk to backend-v2 (NestJS), which sits on PostgreSQL (Drizzle), MongoDB (Mongoose for chat / support-style data), Redis + BullMQ, plus Elasticsearch, S3, Stripe, FCM, and SMTP.

    The backend is modular (40+ Nest modules), including: auth, email, admin, users, customer, seller, dropshipper, partners, suppliers, stores, products, product-bulk-upload, bulk-image-upload, brands, categories, collections, attributes, tags, reviews, dynamic-slider, countries/states/cities, cart, user-addresses, user-shipping-addresses, wishlist, coupon, commission-config, supplier-shipping-rule, store-shipping-rule, shipping, order, fulfillment, stripe, accounts, invoice, return-refund, notifications, chat, support-tickets, contact-us, search, files, and audit-logs.

    Frontends use cookie-based JWT sessions (admin also supports bearer for chat sockets), Zustand for client state, Zod for validation, and Socket.io clients for live chat and notifications. Marketing homepage sections consume the dynamic slider API by placement and position. Media and KYC files go through S3 presigned uploads end-to-end. Admin product bulk flows also cover bulk image upload; marketplace users get help-support inbox alongside live chat.

    Feature inventory

    • Auth: Login/signup, password reset/set/change, Google OAuth, role switch, add-role registration, admin invite set-password
    • Discovery: Home CMS sliders, categories, brands, collections, stores, product filters, global search
    • Commerce: Cart, coupons, Stripe checkout/3DS, repayment, orders, cancel, wishlist
    • Addresses: Shipping address CRUD; profile/contact defaults
    • Returns: Customer/merchant return requests; admin return-refund + Stripe refund
    • Seller ops: Stores, shipping rules, products/variants, bulk CSV, fulfillments, stats, payouts, documents
    • Dropshipper: Buyer hub + identity/tax documents
    • Support: Live chat (web + admin), support tickets/inbox, contact-us API
    • Admin catalog: Categories, collections, brands, attributes/values, tags, Buzfi vs seller products, bulk product + image upload
    • Admin money: Orders, fulfillments, invoices create/status, payouts, commissions, KAM-oriented support payouts
    • Admin users: Admins, customers, sellers, dropshippers; ban/approve; identity/account/document review
    • Marketing: Coupons, dynamic sliders
    • Geo: Countries, states, cities
    • Platform: S3, ES search, FCM, email, BullMQ, audit logs, shipping engine

    Notable API / realtime contracts

    • REST under NestJS + Swagger
    • WebSocket /chat: subscribe_to_chat, send_message, receive_message, new_chat_created, assignment/escalation events
    • WebSocket /notifications: role-scoped rooms for live alerts
    • Stripe payment intents / repayment / refunds
    • POST /files/s3/pre-signed-url for uploads
    • Product bulk import + bulk image upload endpoints
    • Support tickets / contact-us / commission-config / audit-logs modules
    Future Plans

    Near term

    • Deeper analytics for sellers and platform ops
    • Richer notification preferences and mobile push coverage
    • Catalog / search relevance improvements
    • More CMS-driven homepage modules beyond sliders

    Longer term

    • Stronger automation for fulfillments and payouts
    • Expanded dropshipper tooling
    • Performance and observability hardening at marketplace scale

    Developed and Documented
    by @ahmedshamswali