Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
3.3 KiB
Site Configuration Guide
This document explains how to configure the site to show different manufacturer sets across three different websites.
Overview
The system supports three site tiers with different manufacturer counts:
- rockymountainvending.com (Tier 1) - Least manufacturers (7 top manufacturers)
- vending.support (Tier 2) - Medium manufacturers (15 manufacturers)
- quickfreshvending.com (Tier 3) - All manufacturers
Environment Variable Setup
Set the NEXT_PUBLIC_SITE_DOMAIN environment variable to configure which site tier to use.
For rockymountainvending.com (Tier 1)
NEXT_PUBLIC_SITE_DOMAIN=rockymountainvending.com
Manufacturers included:
- Crane (includes BevMax, Merchant-Series)
- Royal Vendors
- GPL
- AP (Automatic Products)
- Dixie-Narco
- USI
- Vendo
- Payment Components (Coin-Mechs, Bill-Mechs, Card-Readers)
Minimum manual count: 3 per manufacturer
For vending.support (Tier 2)
NEXT_PUBLIC_SITE_DOMAIN=vending.support
Manufacturers included:
- All Tier 1 manufacturers, plus:
- Merchant-Series
- BevMax
- DSVending
- Seaga
- AMS
- Rowe
- Payment Components (Coin-Mechs, Bill-Mechs, Card-Readers)
Minimum manual count: 2 per manufacturer
For quickfreshvending.com (Tier 3)
NEXT_PUBLIC_SITE_DOMAIN=quickfreshvending.com
Manufacturers included:
- ALL manufacturers including:
- All from Tier 1 and Tier 2
- Other folder (uncategorized)
- Savamco, Cavalier, Wurlitzer, Vendcraft, Hot, Fastcorp, FRD, etc.
Minimum manual count: 1 per manufacturer
Configuration Files
site-manufacturer-mapping.json
This file contains the complete mapping of manufacturers to each site tier. It's located at:
code/lib/site-manufacturer-mapping.json
site-config.ts
This file provides helper functions to:
- Get the current site domain
- Get allowed manufacturers for a site
- Get minimum manual count
- Handle manufacturer alias matching
How It Works
- The system reads
NEXT_PUBLIC_SITE_DOMAINenvironment variable (defaults torockymountainvending.com) - It loads the site configuration from
site-manufacturer-mapping.json - Manuals are filtered in this order:
- Filter by MDB compatibility (existing)
- Filter by site tier/allowed manufacturers (new)
- Filter by minimum manual count per manufacturer (new)
- Only manuals matching all criteria are displayed
Deployment
For each site deployment, set the appropriate environment variable:
Vercel/Netlify
Add the environment variable in your deployment platform's settings:
- Key:
NEXT_PUBLIC_SITE_DOMAIN - Value:
rockymountainvending.com,vending.support, orquickfreshvending.com
Local Development
Create a .env.local file in the code directory:
NEXT_PUBLIC_SITE_DOMAIN=rockymountainvending.com
Manufacturer Aliases
The system automatically handles manufacturer name variations using aliases defined in site-manufacturer-mapping.json. For example:
- "Royal-Vendors" (directory name) → "Royal Vendors" (canonical)
- "BevMax" → "Crane"
- "Merchant-Series" → "Crane"
This ensures manuals are correctly matched regardless of how the manufacturer name appears in directory or file names.
Payment Components
Payment components (Coin-Mechs, Bill-Mechs, Card-Readers) are included on all sites as they are universal and work with all vending machines.