How sammuel-kouassi/cereals-house works
Cereals House is an African cereals storefront with customer accounts, checkout and order management, payment-provider integrations, and administrative tools. The main customer journey is browsing products, assembling a cart, checking out, paying, and following the resulting order; authentication and country/language selection support that journey. The graph also preserves the admin, email/receipt, and payment-webhook branches. Source evidence is partial: several domain modules are named in the SOURCE INDEX but were not excerpted, so their connections are omitted or marked unverified rather than asserted.
Main entry points: payments Payment webhooks · quotes.functions.ts Quote management · order-notifications.server.ts Order notifications · db.server.ts Neon database
Components 28
Storefront
- Product browsing
src/components/pages/products-page.tsx - Product catalog
src/lib/products/products.functions.ts - Product search
src/components/spotlight-search.tsx - Cart
src/lib/cart-context.tsx
Identity & Locale
- Authentication
src/lib/auth/auth.functions.ts - Sign-in page
src/components/pages/auth-page.tsx - Country selection
src/lib/country-context.tsx - Language routing
src/lib/i18n-routing.ts
Orders & Fulfillment
- Checkout
src/components/pages/checkout-page.tsx - Order services
src/lib/orders/orders.functions.ts - Order tracking
src/components/pages/order-detail-page.tsx - Shipping rates
src/lib/shipping/shipping.functions.ts - Inventory
src/lib/products/stock.functions.ts - Neon database
src/integrations/neon/db.server.ts
Payments
- Payment methods
src/lib/payments/payment-methods.ts - Payment providers
src/lib/payments - Webhook dispatch
src/server.ts - Payment webhooks
src/lib/payments
Administration & Messaging
- Admin tools
src/routes/admin.orders.tsx - Quote management
src/lib/admin/quotes.functions.ts - Order notifications
src/lib/orders/order-notifications.server.ts - Email templates
src/lib/email/templates.ts - Email delivery
src/lib/email/resend.server.ts - Receipts & invoices
src/lib/receipt/generate-receipt.server.ts
Other components
- Shopper
- Paystack
- GeniusPay
- CinetPay
Connections 30
- Shopper → Product browsing: browses
- Product browsing → Product catalog: loads products
- Product search → Product catalog: searches
src/components/spotlight-search.tsx - Shopper → Cart: adds items
- Cart → Checkout: continues to
- Checkout → Order services: submits order
- Checkout → Shipping rates: requests rates
- Order services → Neon database: reads/writes
- Order tracking → Order services: loads order
- Shopper → Sign-in page: signs in
- Sign-in page → Authentication: authenticates
src/components/pages/auth-page.tsx - Authentication → Neon database: queries users
- Country selection → Product catalog: loads country products
src/lib/country-context.tsx - Country selection → Language routing: selects language
src/lib/i18n-routing.ts - Payment methods → Payment providers: selects provider
- Webhook dispatch → Payment webhooks: routes callbacks
src/server.ts - Payment webhooks → Paystack: verifies transactions
src/lib/payments/paystack.webhook.server.ts - Payment webhooks → GeniusPay: verifies transactions
src/lib/payments/geniuspay.webhook.server.ts - Payment webhooks → Neon database: updates orders
src/lib/payments/geniuspay.webhook.server.ts - Payment webhooks → Order notifications: notifies customer
src/lib/payments/paystack.webhook.server.ts - Admin tools → Quote management: manages quotes
- Quote management → Neon database: queries data
src/lib/admin/quotes.functions.ts - Quote management → Email delivery: sends email
src/lib/admin/quotes.functions.ts - Quote management → Email templates: builds messages
src/lib/admin/quotes.functions.ts - Quote management → Receipts & invoices: generates receipt
src/lib/admin/quotes.functions.ts - Order notifications → Neon database: reads orders
src/lib/orders/order-notifications.server.ts - Order notifications → Email templates: builds messages
src/lib/orders/order-notifications.server.ts - Order notifications → Email delivery: sends email
src/lib/orders/order-notifications.server.ts - Order notifications → Receipts & invoices: generates receipt
src/lib/orders/order-notifications.server.ts - Webhook dispatch → CinetPay: routes callbacks
src/server.ts