Discount & affiliate ecommerce suite

Discount Retail Commerce

Buy4Low full-stack commerce—Express/MongoDB API, React storefront, and admin dashboard with JWT roles, affiliate listings, and PHP-proxied image uploads.

Discount Retail Commerce project preview

Background & Context

Buy4Low is a three-package ecommerce system: Express/MongoDB API (backend/), Vite/React storefront (frontend/), and Vite/React admin dashboard (dashboard/). Image uploads are accepted by the API (Multer) and forwarded to a PHP script (upload.php) via PHP_UPLOAD_URL. Cloudinary appears as a dependency/config only—controllers use the PHP path. There is no .git directory in this tree and no Dockerized local stack.

The retailer needed catalog and order tooling for discount-oriented merchandising plus affiliate products with external buy links. Customers browse filtered catalogs, keep a Zustand-persisted cart, check out while authenticated (shipping address + payment method string), and view orders. Admins manage products, categories, brands, inventory stock, and order/payment status. Payment method is recorded without a card gateway SDK.

Security basics are present: Helmet, CORS for frontend/dashboard origins, and rate limiting on /api/ (100 req / 15 min / IP). Public product queries force isActive: true. Newsletter UI is toast-only with no backend.

The Challenge

Manual product and order handling could not keep up with promotional catalog updates, affiliate redirects, and multi-role staff access for a discount-oriented store. Without a coherent discount & affiliate ecommerce suite foundation, Discount Retail Commerce stakeholders faced fragmented tools, slow handoffs, and limited visibility—classic failure modes Tekvers designs against.

The Solution

Discount Retail Commerce: Buy4Low full-stack commerce—Express/MongoDB API, React storefront, and admin dashboard with JWT roles, affiliate listings, and PHP-proxied image uploads. Faster promotional and affiliate catalog updates by staff. Tekvers delivered a maintainable discount & affiliate ecommerce suite system for Discount Retail Commerce using Express, TypeScript, MongoDB, Mongoose, with phased rollout, operator workflows, and documentation suited to long-term ownership.

Our Approach

  1. Secure operations layer

    JWT Bearer auth (`user` / `admin`) with bcrypt passwords, admin seed script, Helmet/CORS/rate limits, and validated inputs on catalog and order mutations.

  2. Merchandising & affiliate workflows

    Public product list supports pagination, search, price filters, sort, category, and `isAffiliate`. Affiliate SKUs skip add-to-cart and open `affiliateLink` (optional Amazon associate tag). Badges derive from sale/compare price, newness, rating, low stock, and affiliate flag.

  3. Staff dashboard + upload pipeline

    Admin CRUD for products/categories/brands, order status updates, inventory UI, and authenticated `POST /api/upload` (+ multiple) forwarding to PHP—so merchandising does not require developer intervention for routine catalog changes.

What We Delivered

  • Express 4 TypeScript API on Mongoose/MongoDB (auth, products, categories, brands, orders, uploads, health)
  • Customer Vite/React storefront with cart persist, checkout, and my-orders
  • Admin Vite/React dashboard with role gate and catalog/order/inventory screens
  • Affiliate product support with external buy CTAs
  • Product badge logic (sale %, NEW, BESTSELLER, LIMITED, AFFILIATE)
  • JWT auth with bcrypt hashing and admin seed script
  • Multer → PHP upload pipeline (`upload.php`)
  • Rate limiting, Helmet, and CORS hardening on the API

Outcomes & Impact

  • Faster promotional and affiliate catalog updates by staff
  • Controlled admin access to order and inventory mutations
  • Client cart + authenticated checkout with stock decrement
  • Honest commerce base without inventing payment capture or multi-vendor marketplace features

Buy4Low moved from ad-hoc updates to a structured discount/affiliate commerce stack—safer for staff, clearer for shoppers, ready for the next promotional cycle—while Tekvers documented PHP uploads and payment-method-only checkout instead of over-claiming gateways.

Technology Stack

  • Express
  • TypeScript
  • MongoDB
  • Mongoose
  • JWT
  • React
  • Vite
  • Tailwind CSS
  • Zustand
  • React Query
  • Multer
  • PHP uploads

Services Delivered

Guides & articles from this niche

Planning a similar platform? Share your scope and we will map architecture, delivery phases, and a realistic timeline.