Overview
Quality Hub GINEZ operates across 40+ production branches throughout Mexico. The system is designed to handle multi-location production tracking, quality control, and reporting with location-specific data segregation and aggregation.All locations (sucursales) are defined in
lib/production-constants.ts and used throughout the application for filtering, reporting, and batch number generation.Location List
The system supports the following 40 production locations:Regional Distribution
Central Mexico
- ACTOPAN
- ATITALAQUIA
- ATLACOMULCO
- IXMIQUILPAN
- MIXQUIAHUALA
- PACHUCA 1
- PACHUCA 2
- TIZAYUCA
- TULANCINGO 1
- TULANCINGO 2
- ZUMPANGO 1
- ZUMPANGO 2
Puebla & Surroundings
- AMOZOC
- APIZACO
- CHOLULA
- PUEBLA 1
- PUEBLA 2
- PUEBLA 3
- TEHUACAN
- TEZIUTLAN
BajÃo Region
- CELAYA
- IRAPUATO
- QUERETARO 1
- QUERETARO 2
- QUERETARO 3
Western Mexico
- GUADALAJARA
- MORELIA
Southern Mexico
- CUAUTLA
- OAXACA 1
- OAXACA 2
Southeast
- CANCUN 1
- CANCUN 2
- CEIBA
- MERIDA
- PLAYA DEL CARMEN
- VILLAHERMOSA
Gulf Coast
- HUEJUTLA
- VERACRUZ
Administrative
- CEDIS (Distribution Center)
- CORPORATIVO (Corporate HQ)
Complete Location Reference
All 40 Locations (Alphabetical)
All 40 Locations (Alphabetical)
| # | Location | Acronym | Region |
|---|---|---|---|
| 1 | ACTOPAN | ACT | Hidalgo |
| 2 | AMOZOC | AMO | Puebla |
| 3 | APIZACO | APZ | Tlaxcala |
| 4 | ATITALAQUIA | ATI | Hidalgo |
| 5 | ATLACOMULCO | ATL | Estado de México |
| 6 | CANCUN 1 | CAN1 | Quintana Roo |
| 7 | CANCUN 2 | CAN2 | Quintana Roo |
| 8 | CEIBA | CEI | Quintana Roo |
| 9 | CELAYA | CEL | Guanajuato |
| 10 | CHOLULA | CHO | Puebla |
| 11 | CUAUTLA | CUA | Morelos |
| 12 | GUADALAJARA | GDL | Jalisco |
| 13 | HUEJUTLA | HUE | Hidalgo |
| 14 | IRAPUATO | IRA | Guanajuato |
| 15 | IXMIQUILPAN | IXM | Hidalgo |
| 16 | MERIDA | MER | Yucatán |
| 17 | MIXQUIAHUALA | MIX | Hidalgo |
| 18 | MORELIA | MOR | Michoacán |
| 19 | OAXACA 1 | OAX1 | Oaxaca |
| 20 | OAXACA 2 | OAX2 | Oaxaca |
| 21 | PACHUCA 1 | PAC1 | Hidalgo |
| 22 | PACHUCA 2 | PAC2 | Hidalgo |
| 23 | PLAYA DEL CARMEN | PDC | Quintana Roo |
| 24 | PUEBLA 1 | PUE1 | Puebla |
| 25 | PUEBLA 2 | PUE2 | Puebla |
| 26 | PUEBLA 3 | PUE3 | Puebla |
| 27 | QUERETARO 1 | QR01 | Querétaro |
| 28 | QUERETARO 2 | QR02 | Querétaro |
| 29 | QUERETARO 3 | QR03 | Querétaro |
| 30 | TEHUACAN | TEH | Puebla |
| 31 | TEZIUTLAN | TEZ | Puebla |
| 32 | TIZAYUCA | TIZ | Hidalgo |
| 33 | TULANCINGO 1 | TUL1 | Hidalgo |
| 34 | TULANCINGO 2 | TUL2 | Hidalgo |
| 35 | VERACRUZ | VER | Veracruz |
| 36 | VILLAHERMOSA | VHM | Tabasco |
| 37 | ZUMPANGO 1 | ZUM1 | Estado de México |
| 38 | ZUMPANGO 2 | ZUM2 | Estado de México |
| 39 | CEDIS | CEDIS | Distribution |
| 40 | CORPORATIVO | CORP | Corporate |
Location Acronyms
Each location has a unique acronym used in batch/lot number generation:Batch Number Format
Batch/lot numbers are automatically generated using the location acronym:YYYYMMDD- Production date (e.g., 20240315)ACRONYM- Location acronym (e.g., PAC1)PRODUCT_CODE- Product identifier (e.g., LIMLIM)###- Sequential number (001, 002, 003…)
Location-Based Features
1. Filtering and Search
All modules support location-based filtering:- Quality Control
- Reports
- Dashboard
Users can filter records by location to view:
- Production logs for specific branch
- Conformity rates by location
- Quality trends per site
2. Data Segregation
While data is stored centrally, the UI can be configured for location-specific views:Current implementation allows all users to see all locations. Location-based access restrictions can be added via RLS policies if needed.
Adding New Locations
To add a new production location to the system:Location-Specific Configurations
Option 1: Centralized Configuration
All locations use the same quality standards and product definitions (current implementation). Pros:- Consistent quality standards across all sites
- Simplified maintenance
- Easier compliance and auditing
- Less flexibility for location-specific requirements
- Cannot accommodate regional variations
Option 2: Location-Specific Standards (Advanced)
For organizations requiring location-specific configurations:Multi-Site Reporting
Aggregated Reports
Generate company-wide reports across all locations:Location Comparison
Compare performance metrics across locations:Production Volume
Compare total liters/kg produced per location over time period
Quality Conformance
Percentage of conforming batches by location
Product Mix
Distribution of product families by location
Efficiency Metrics
Average batch size, production rate, and throughput
Geographic Visualization (Future Enhancement)
For advanced deployments, consider adding geographic visualization:Best Practices
Naming Consistency
- Always use official location names from
SUCURSALES - Never use variations or abbreviations in data entry
- Validate location input against constant list
Data Integrity
- Enforce location foreign key constraints
- Validate batch numbers follow correct format
- Audit location changes in production records
Performance
- Index
sucursalcolumn for fast filtering - Use location-based partitioning for large datasets
- Cache location list in frontend (rarely changes)
User Experience
- Pre-select user’s default location
- Show location in batch number preview
- Provide location-based quick filters
Next Steps
Environment Variables
Complete your environment configuration
Supabase Setup
Set up location-aware database policies
