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>
367 lines
8 KiB
TypeScript
367 lines
8 KiB
TypeScript
/**
|
|
* Vending Machine Manuals Configuration
|
|
* Comprehensive manufacturer lists and machine type categories
|
|
*/
|
|
|
|
export interface ManufacturerInfo {
|
|
name: string
|
|
aliases: string[]
|
|
brands?: string[] // Sub-brands
|
|
}
|
|
|
|
export interface MachineTypeInfo {
|
|
name: string
|
|
keywords: string[]
|
|
aliases: string[]
|
|
description: string
|
|
}
|
|
|
|
/**
|
|
* Comprehensive list of vending machine manufacturers
|
|
* Includes aliases and sub-brands for better detection
|
|
*/
|
|
export const MANUFACTURERS: ManufacturerInfo[] = [
|
|
{
|
|
name: 'Crane',
|
|
aliases: ['crane', 'cpi', 'crane payment innovations', 'crane merchandising'],
|
|
brands: ['BevMax', 'Merchant Series', 'National Vendors', 'Merchant', 'Bev Max'],
|
|
},
|
|
{
|
|
name: 'AMS',
|
|
aliases: ['ams', 'automated merchandising systems', 'automated merchandising'],
|
|
},
|
|
{
|
|
name: 'Dixie-Narco',
|
|
aliases: ['dixie narco', 'dixie', 'narco', 'dixie-narco'],
|
|
},
|
|
{
|
|
name: 'Royal Vendors',
|
|
aliases: ['royal vendors', 'royal', 'royal vendor'],
|
|
},
|
|
{
|
|
name: 'Vendo',
|
|
aliases: ['vendo', 'sandenvendo', 'sanden vendo'],
|
|
},
|
|
{
|
|
name: 'Seaga',
|
|
aliases: ['seaga', 'seaga manufacturing'],
|
|
},
|
|
{
|
|
name: 'USI',
|
|
aliases: ['usi', 'united standard industries', 'u-select-it', 'uselectit'],
|
|
},
|
|
{
|
|
name: 'AP',
|
|
aliases: ['ap', 'automatic products', 'api', 'automatic products international'],
|
|
},
|
|
{
|
|
name: 'Quick Fresh Vending',
|
|
aliases: ['quick fresh', 'qfv', 'quick fresh vending'],
|
|
},
|
|
{
|
|
name: 'GPL',
|
|
aliases: ['gpl', 'general products limited'],
|
|
},
|
|
{
|
|
name: 'HealthyYOU Vending',
|
|
aliases: ['healthyyou', 'healthy you', 'healthyyou vending'],
|
|
},
|
|
{
|
|
name: 'Wittern Group',
|
|
aliases: ['wittern', 'wittern group'],
|
|
},
|
|
{
|
|
name: 'Tomra',
|
|
aliases: ['tomra'],
|
|
},
|
|
{
|
|
name: 'Selecta',
|
|
aliases: ['selecta'],
|
|
},
|
|
{
|
|
name: 'Necta',
|
|
aliases: ['necta'],
|
|
},
|
|
{
|
|
name: 'Fas International',
|
|
aliases: ['fas', 'fas international'],
|
|
},
|
|
{
|
|
name: 'Jofemar',
|
|
aliases: ['jofemar'],
|
|
},
|
|
{
|
|
name: 'Coinco',
|
|
aliases: ['coinco'],
|
|
},
|
|
{
|
|
name: 'Conlux',
|
|
aliases: ['conlux'],
|
|
},
|
|
{
|
|
name: 'MEI-Mars',
|
|
aliases: ['mei', 'mars', 'mei-mars', 'mei mars', 'meiglobal'],
|
|
},
|
|
]
|
|
|
|
/**
|
|
* Machine type categories with keywords for detection
|
|
*/
|
|
export const MACHINE_TYPES: MachineTypeInfo[] = [
|
|
{
|
|
name: 'Snack',
|
|
keywords: [
|
|
'snack',
|
|
'snk',
|
|
'snacks',
|
|
'chips',
|
|
'candy',
|
|
'granola',
|
|
'pretzel',
|
|
'snackshop',
|
|
'snackmart',
|
|
'snackcenter',
|
|
'snacktron',
|
|
'snackvendor',
|
|
'glassfront snack',
|
|
'confectionery',
|
|
],
|
|
aliases: ['snack machine', 'snack vendor', 'snack vending', 'snack machine'],
|
|
description: 'Snack vending machines that dispense packaged snacks',
|
|
},
|
|
{
|
|
name: 'Beverage',
|
|
keywords: [
|
|
'beverage',
|
|
'bev',
|
|
'drink',
|
|
'drinks',
|
|
'soda',
|
|
'cold',
|
|
'bottle',
|
|
'can',
|
|
'canned',
|
|
'bevmax',
|
|
'coldtron',
|
|
'cold drink',
|
|
'can drink',
|
|
'bottledrop',
|
|
'glassfront beverage',
|
|
'glass front beverage',
|
|
],
|
|
aliases: [
|
|
'beverage machine',
|
|
'drink machine',
|
|
'beverage vendor',
|
|
'cold drink',
|
|
'soda machine',
|
|
'drink vendor',
|
|
],
|
|
description: 'Cold beverage vending machines for sodas, water, and drinks',
|
|
},
|
|
{
|
|
name: 'Combo',
|
|
keywords: [
|
|
'combo',
|
|
'combination',
|
|
'snack-drink',
|
|
'snack drink',
|
|
'snack and drink',
|
|
'refreshment center',
|
|
'snack beverage',
|
|
'snacks beverage',
|
|
'snacks coffee',
|
|
'dual zone',
|
|
'dzf',
|
|
'szf',
|
|
],
|
|
aliases: ['combo machine', 'combination machine', 'combo vendor', 'refreshment center'],
|
|
description: 'Combination machines that offer both snacks and beverages',
|
|
},
|
|
{
|
|
name: 'Coffee',
|
|
keywords: [
|
|
'coffee',
|
|
'hot',
|
|
'espresso',
|
|
'cappuccino',
|
|
'latte',
|
|
'tea',
|
|
'hot drink',
|
|
'hot beverage',
|
|
'cafe',
|
|
'café',
|
|
'hottron',
|
|
'hot drink center',
|
|
'fresh brew',
|
|
'freeze dried',
|
|
'geneva',
|
|
'hba',
|
|
],
|
|
aliases: [
|
|
'coffee machine',
|
|
'hot drink machine',
|
|
'coffee vendor',
|
|
'hot beverage machine',
|
|
'cafe machine',
|
|
],
|
|
description: 'Hot beverage machines for coffee, tea, and hot drinks',
|
|
},
|
|
{
|
|
name: 'Food',
|
|
keywords: [
|
|
'food',
|
|
'fresh',
|
|
'meal',
|
|
'sandwich',
|
|
'salad',
|
|
'perishable',
|
|
'carousel',
|
|
'showcase',
|
|
'merchandiser',
|
|
'cold food',
|
|
'deli',
|
|
'food center',
|
|
'food king',
|
|
'glassfront food',
|
|
'cold food carousel',
|
|
],
|
|
aliases: ['food machine', 'fresh food', 'meal machine', 'food vendor', 'deli machine'],
|
|
description: 'Food vending machines for fresh or frozen meals',
|
|
},
|
|
{
|
|
name: 'Frozen',
|
|
keywords: [
|
|
'frozen',
|
|
'ice cream',
|
|
'icecream',
|
|
'frozen food',
|
|
'frozen treat',
|
|
'frozen dessert',
|
|
'chilled',
|
|
'glassfront frozen',
|
|
'glass front frozen',
|
|
'frozen gourmet',
|
|
'frozen food glassfront',
|
|
'ice cream center',
|
|
'frozen food center',
|
|
],
|
|
aliases: [
|
|
'frozen food machine',
|
|
'ice cream machine',
|
|
'frozen treat machine',
|
|
'frozen vendor',
|
|
'ice cream vendor',
|
|
],
|
|
description: 'Frozen food and ice cream vending machines',
|
|
},
|
|
{
|
|
name: 'Bulk',
|
|
keywords: ['bulk', 'gumball', 'gum', 'toy', 'nut', 'candy bulk'],
|
|
aliases: ['bulk vendor', 'bulk machine', 'bulk vending'],
|
|
description: 'Bulk vending machines for small items like gumballs and toys',
|
|
},
|
|
{
|
|
name: 'Ice Cream',
|
|
keywords: ['ice cream', 'icecream', 'frozen treat', 'frozen dessert'],
|
|
aliases: ['ice cream machine', 'frozen treat machine'],
|
|
description: 'Ice cream and frozen treat vending machines',
|
|
},
|
|
{
|
|
name: 'Specialty',
|
|
keywords: [
|
|
'specialty',
|
|
'special',
|
|
'electronics',
|
|
'personal care',
|
|
'beauty',
|
|
'cigarette',
|
|
'bait',
|
|
'milk',
|
|
'cheese',
|
|
'yogurt',
|
|
],
|
|
aliases: ['specialty machine', 'specialty vendor'],
|
|
description: 'Specialty vending machines for niche products',
|
|
},
|
|
]
|
|
|
|
/**
|
|
* Get manufacturer name from directory name or filename
|
|
*/
|
|
export function detectManufacturer(input: string): string | null {
|
|
const normalized = input.toLowerCase().trim()
|
|
|
|
for (const manufacturer of MANUFACTURERS) {
|
|
// Check main name
|
|
if (normalized.includes(manufacturer.name.toLowerCase())) {
|
|
return manufacturer.name
|
|
}
|
|
|
|
// Check aliases
|
|
for (const alias of manufacturer.aliases) {
|
|
if (normalized.includes(alias.toLowerCase())) {
|
|
return manufacturer.name
|
|
}
|
|
}
|
|
|
|
// Check sub-brands
|
|
if (manufacturer.brands) {
|
|
for (const brand of manufacturer.brands) {
|
|
if (normalized.includes(brand.toLowerCase())) {
|
|
return manufacturer.name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return null
|
|
}
|
|
|
|
/**
|
|
* Get machine type from filename or content
|
|
*/
|
|
export function detectMachineType(input: string): string | null {
|
|
const normalized = input.toLowerCase().trim()
|
|
|
|
// Check each machine type in priority order
|
|
for (const machineType of MACHINE_TYPES) {
|
|
// Check keywords
|
|
for (const keyword of machineType.keywords) {
|
|
if (normalized.includes(keyword.toLowerCase())) {
|
|
return machineType.name
|
|
}
|
|
}
|
|
|
|
// Check aliases
|
|
for (const alias of machineType.aliases) {
|
|
if (normalized.includes(alias.toLowerCase())) {
|
|
return machineType.name
|
|
}
|
|
}
|
|
}
|
|
|
|
return null
|
|
}
|
|
|
|
/**
|
|
* Get all manufacturer names (for filtering)
|
|
*/
|
|
export function getAllManufacturerNames(): string[] {
|
|
return MANUFACTURERS.map((m) => m.name).sort()
|
|
}
|
|
|
|
/**
|
|
* Get all machine type names (for filtering)
|
|
*/
|
|
export function getAllMachineTypeNames(): string[] {
|
|
return MACHINE_TYPES.map((m) => m.name).sort()
|
|
}
|
|
|
|
/**
|
|
* Get machine type info by name
|
|
*/
|
|
export function getMachineTypeInfo(name: string): MachineTypeInfo | undefined {
|
|
return MACHINE_TYPES.find((m) => m.name === name)
|
|
}
|
|
|