How keralia/nectar_ingredients works
Nectar Ingredients is a B2B catalog, sample-request, and direct-order platform for wholesale food powders. Customers discover products, build a sample basket or submit an inquiry, and can authenticate, check out, and pay; a chatbot also advises customers and supports order intake and tracking. Supporting capabilities include product certificates, account and admin order views, invoice delivery, and payment administration. The graph reflects explicit imports and documented integrations; several UI and API internals were not sampled, so those links are limited to README evidence.
Main entry points: chatbot/route.ts AI sales assistant · CheckoutFlow.tsx Checkout flow · initiate/route.ts Payment initiation · ProductsClient.tsx Product catalog
Components 23
Product discovery
- Company site
app/page.tsx - Product catalog
app/products/ProductsClient.tsx - Product data
lib/data.ts - COA hub
components/products/CertificatesSection.tsx
Sales and assistance
- Sample basket
context/SampleBasketContext.tsx - Sales inquiry
app/contact/ContactClient.tsx - Form router
app/api/web-form-router/route.ts - Chat widget
components/ChatWidget.jsx - AI sales assistant
app/api/chatbot/route.ts - Input validation
lib/validation.ts - Groq model pool
lib/groqPool.ts
Ordering and payment
- Checkout flow
components/checkout/CheckoutFlow.tsx - Order model
types/index.ts - Pricing rules
lib/pricing.ts - Payment initiation
app/api/payment/initiate/route.ts - Paytm gateway
Order operations
- Google Sheets
- Payment webhook
app/api/payment/webhook/route.ts - Supabase orders
- Invoice email service
lib/email-service.ts - Account and admin
app/account/page.tsx - Bill viewer
components/orders/BillViewer.tsx
Other components
- Customer
Connections 27
- Customer → Company site: browses
README.md - Customer → Product catalog: browses
README.md - Product catalog → Product data: reads
app/products/ProductsClient.tsx - Product catalog → COA hub: renders
app/products/ProductsClient.tsx - Customer → Sample basket: selects samples
README.md - Customer → Sales inquiry: submits inquiry
README.md - Sales inquiry → Form router: routes inquiry
README.md - Customer → Chat widget: asks
README.md - Chat widget → AI sales assistant: sends message
README.md - AI sales assistant → Product data: retrieves catalog
app/api/chatbot/route.ts - AI sales assistant → Input validation: validates details
app/api/chatbot/route.ts - AI sales assistant → Groq model pool: calls models
app/api/chatbot/route.ts - AI sales assistant → Google Sheets: looks up or logs orders
README.md - Customer → Checkout flow: checks out
README.md - Checkout flow → Order model: uses
components/checkout/CheckoutFlow.tsx - Checkout flow → Pricing rules: calculates totals
README.md - Checkout flow → Payment initiation: initiates payment
README.md - Payment initiation → Supabase orders: creates order
README.md - Payment initiation → Pricing rules: applies pricing
app/api/payment/initiate/route.ts - Payment initiation → Paytm gateway: starts transaction
README.md - Paytm gateway → Payment webhook: posts result
README.md - Payment webhook → Supabase orders: updates order
app/api/payment/webhook/route.ts - Payment webhook → Invoice email service: sends invoice
app/api/payment/webhook/route.ts - Invoice email service → Paytm gateway: emails receipt
README.md - Customer → Account and admin: views orders
README.md - Account and admin → Supabase orders: reads orders
README.md - Account and admin → Bill viewer: renders bill
app/account/page.tsx