How p-olycarp/arwas-world_ works
Arwas World is a bilingual storefront for customized apparel and drinkware, with product browsing, a persistent basket, and customer enquiries; orders are initiated through WhatsApp rather than an evidenced online checkout. A separate admin area manages products and enquiries. The graph follows documented and indexed dependencies; several UI and admin implementation details were not sampled, so their internal connections are omitted.
Main entry points: catalog.ts Catalog Service · BasketProvider.tsx Basket State · HomePage.tsx Home Experience · actions.ts Product Management
Components 21
Storefront
- Home Experience
src/components/HomePage.tsx - Navigation & Search
src/components/Nav.tsx - Product Showcase
src/components/Showcase.tsx - Product Pages
src/app/p/[slug]/page.tsx - Product Detail View
src/components/ProductPageView.tsx - English & Arabic
src/lib/i18n.ts
Product & Ordering
- Product Options
src/components/ProductOptions.tsx - Basket State
src/components/BasketProvider.tsx - Basket Drawer
src/components/BasketDrawer.tsx - Enquiry Submission
src/app/api/enquiries/route.ts
Catalog & Data
- Catalog Service
src/lib/catalog.ts - Starter Products
src/data/products.ts - MongoDB Connection
src/lib/db.ts - Product Records
src/models/Product.ts - Enquiry Records
src/models/Enquiry.ts
Administration
- Product Management
src/app/admin/(panel)/products/actions.ts - Product Editor
src/components/admin/ProductForm.tsx - Enquiry Management
src/app/admin/(panel)/enquiries/page.tsx - Admin Authorization
src/lib/auth.ts
Other components
- Shopper
Connections 27
- Shopper → Home Experience: browses
src/components/HomePage.tsx - Home Experience → Navigation & Search: renders
src/components/HomePage.tsx - Home Experience → Product Showcase: renders
src/components/HomePage.tsx - Home Experience → Basket State: provides
src/components/HomePage.tsx - Product Pages → Catalog Service: loads products
src/app/p/[slug]/page.tsx - Product Pages → Product Detail View: renders
src/app/p/[slug]/page.tsx - Product Detail View → Product Options: renders
src/components/ProductPageView.tsx - Product Detail View → Navigation & Search: renders
src/components/ProductPageView.tsx - Product Showcase → Product Options: renders
src/components/Showcase.tsx - Product Options → Basket State: adds items
src/components/ProductOptions.tsx - Navigation & Search → Basket State: opens basket
- Basket State → Basket Drawer: supplies state
- Basket State → Shopper: persists basket
src/components/BasketProvider.tsx - Shopper → Enquiry Submission: submits enquiry
src/app/api/enquiries/route.ts - Enquiry Submission → MongoDB Connection: connects
src/app/api/enquiries/route.ts - Enquiry Submission → Enquiry Records: creates record
src/app/api/enquiries/route.ts - Catalog Service → MongoDB Connection: connects
src/lib/catalog.ts - Catalog Service → Product Records: queries
src/lib/catalog.ts - Catalog Service → Starter Products: falls back to
src/lib/catalog.ts - Catalog Service → English & Arabic: localizes
src/lib/catalog.ts - Product Management → Admin Authorization: requires access
src/app/admin/(panel)/products/actions.ts - Product Management → MongoDB Connection: connects
src/app/admin/(panel)/products/actions.ts - Product Management → Product Records: manages records
src/app/admin/(panel)/products/actions.ts - Product Editor → Product Management: submits changes
src/components/admin/ProductForm.tsx - Enquiry Management → Admin Authorization: requires access
src/app/admin/(panel)/enquiries/page.tsx - Enquiry Management → MongoDB Connection: connects
src/app/admin/(panel)/enquiries/page.tsx - Enquiry Management → Enquiry Records: reads records
src/app/admin/(panel)/enquiries/page.tsx