How anmolpatel009/prakrati-maitri works
This is a sustainable-goods storefront with product discovery, cart and checkout, plus account, payment, and custom/bulk enquiry capabilities. Its principal purchase workflow runs from browsing and cart management through checkout preparation, then into order creation and payment. The excerpts verify cart use, checkout preparation, and Supabase access; most other routes are unsampled, so their connections are shown as unverified rather than asserted.
Main entry points: server.ts Server database client · checkout/page.tsx Checkout details · payment/page.tsx Payment and review · route.ts Order creation
Components 20
Storefront
- Shop and collections
app/shop/ShopClient.tsx - Product details
app/products/[slug]/page.tsx
Purchase flow
- Cart state
components/cart/CartProvider.tsx - Checkout details
app/checkout/page.tsx - Cart verification and pricing
app/api/checkout/prepare/route.ts - Payment and review
app/checkout/payment/page.tsx - Order creation
app/api/orders/create/route.ts - Razorpay payment routes
app/api/payments/razorpay/create/route.ts - Payment verification and webhook
app/api/payments/razorpay/verify/route.ts - Order confirmation
app/checkout/success/page.tsx
Accounts
- Customer account and orders
app/account/page.tsx - Sign-in and registration
components/auth/LoginForm.tsx
Custom and bulk enquiries
- Bulk order enquiry
app/api/bulk-order/route.ts - Bulk reference upload
app/api/bulk-order/reference-upload/route.ts - Custom bag requests
app/api/custom-bags/route.ts - Wedding gift enquiries
app/api/wedding-return-gift-enquiries/route.ts
Data and integrations
- Server database client
lib/supabase/server.ts - Supabase data store
- Razorpay
Other components
- Shopper
Connections 21
- Shopper → Shop and collections: browses
- Shop and collections → Product details: opens product
- Shopper → Cart state: adds items
- Checkout details → Cart state: reads cart
app/checkout/page.tsx - Checkout details → Cart verification and pricing: requests verification
app/checkout/page.tsx - Cart verification and pricing → Server database client: creates client
app/api/checkout/prepare/route.ts - Server database client → Supabase data store: accesses data
- Checkout details → Payment and review: continues checkout
- Payment and review → Order creation: submits order
- Order creation → Server database client: creates client
app/api/orders/create/route.ts - Payment and review → Razorpay payment routes: starts payment
- Razorpay payment routes → Razorpay: creates payment
- Payment verification and webhook → Razorpay: verifies payment
- Order creation → Order confirmation: returns order
- Shopper → Customer account and orders: manages orders
- Shopper → Sign-in and registration: signs in
- Shopper → Bulk order enquiry: submits enquiry
- Bulk reference upload → Bulk order enquiry: provides reference
- Bulk order enquiry → Server database client: creates client
app/api/bulk-order/route.ts - Shopper → Custom bag requests: requests customization
- Shopper → Wedding gift enquiries: submits enquiry