How faraaz777/regal-horeca works
Regal HoReCa Catalog is a Next.js storefront and operations application for browsing HoReCa products and managing catalog data. A shopper searches and filters the catalog, opens a product detail, and can save favorites or send an enquiry; administrators authenticate and maintain products and taxonomy. The repository also includes substantial inventory-location and sales-request workflows. The graph preserves these documented and tree-visible subsystems, but many links among their unsampled routes and services cannot be verified from the excerpts, so those connections are omitted or marked unverified.
Main entry points: (main) Storefront Pages · page.js Product Admin · route.js Product API · queryProducts.js Catalog Queries
Components 24
Storefront
- Storefront Pages
app/(main) - Catalog Browser
components/catalog/CatalogPageClient.jsx - Product Card
components/ProductCard.jsx - Product Detail
components/product-detail/ProductDetailClient.jsx - Customer Enquiries
app/api/enquiries/route.js
Catalog Management
- Product API
app/api/products/route.js - Catalog Queries
lib/server/products/queryProducts.js - Product Records
lib/models/Product.js - Taxonomy API
app/api/categories/route.js - Category Tree
lib/models/Category.js - Product Admin
app/admin/products/page.js
Inventory Operations
- Inventory Management
app/admin/inventory - Inventory APIs
app/api/admin/inventory - Inventory Services
lib/server/inventory
Sales Workflow
- Sales Workspace
components/sales/SalesWorkspace.jsx - Sales APIs
app/api/sales - Sales Sessions
lib/server/sales/sessionService.js - Sales Records
lib/models/SalesBucket.js
Shared Platform
- Admin Authentication
lib/server/auth/requireAuth.js - MongoDB Connection
lib/db/connect.js - Shared App State
context/AppContext.jsx - Cloudflare R2
Other components
- Shopper
- Administrator
Connections 23
- Shopper → Storefront Pages: browses
README.md - Storefront Pages → Catalog Browser: offers catalog
- Catalog Browser → Product Card: renders
components/catalog/CatalogPageClient.jsx - Product Card → Shared App State: uses context
components/ProductCard.jsx - Storefront Pages → Product Detail: opens product
- Shopper → Customer Enquiries: submits enquiry
app/api/enquiries/route.js - Product API → Catalog Queries: queries products
app/api/products/route.js - Product API → Product Records: creates records
app/api/products/route.js - Catalog Queries → Product Records: searches
lib/server/products/queryProducts.js - Taxonomy API → Category Tree: reads categories
app/api/categories/route.js - Product Admin → Product API: manages products
- Administrator → Admin Authentication: authenticates
README.md - Administrator → Product Admin: maintains catalog
README.md - Inventory Management → Inventory APIs: requests operations
- Inventory APIs → Inventory Services: delegates
- Sales Workspace → Sales APIs: uses endpoints
- Sales APIs → Sales Sessions: handles sessions
- Sales Sessions → Sales Records: reads and writes
lib/server/sales/sessionService.js - MongoDB Connection → Catalog Queries: connects database
lib/server/products/queryProducts.js - MongoDB Connection → Admin Authentication: connects database
lib/server/auth/requireAuth.js - Administrator → Inventory Management: manages stock
- Administrator → Sales Workspace: manages sales
- Product Admin → Cloudflare R2: uploads images