How vicktor349/nestmart works
This is a Next.js storefront with product discovery and detail pages, a client-side cart, Supabase-backed accounts and favourites, and Paystack checkout endpoints. The visible workflow runs from storefront product discovery through product detail and cart; checkout and payment verification are represented as distinct stages. The source index supports several page-to-component relationships, but checkout-to-Paystack invocation is not shown, so that connection is marked unverified. Other unsampled page behavior is kept at the page level.
Main entry points: supabase.js Supabase client · [id].js Product details · CartContext.js Cart state · userContext.js User session
Components 22
Storefront
- Home storefront
pages/index.js - Shop catalog
pages/shop.js - Search results
pages/searchpage.js - Catalog search
components/SearchDatabase.js - Product details
pages/fullproduct/[id].js - Best seller details
pages/bestsellingproduct/[id].js - Related product page
pages/relatedproduct/[id].js - Related products
components/RelatedProducts.js
Commerce
- Cart state
components/CartContext.js - Cart and checkout
pages/cart.js - Checkout callback
pages/checkout/callback.js - Payment initialization
pages/api/paystack/initialize.js - Payment verification
pages/api/paystack/verify.js
Accounts
- User session
components/userContext.js - Favourites state
components/FavouritesContext.js - Profile management
components/dashboard/Profile.js - Order dashboard
components/dashboard/Order.js - Account dashboard
pages/dashboard.js
Backend
- Supabase client
helpers/supabase.js - Supabase backend
- Browser cart storage
Other components
- Shopper
Connections 27
- Shopper → Home storefront: opens storefront
pages/index.js - Home storefront → Product details: opens details
- Home storefront → Shop catalog: browses catalog
- Shopper → Search results: searches catalog
pages/searchpage.js - Search results → Catalog search: requests matches
pages/searchpage.js - Catalog search → Supabase client: queries catalog
components/SearchDatabase.js - Product details → Supabase client: loads product
pages/fullproduct/[id].js - Best seller details → Supabase client: loads product
pages/bestsellingproduct/[id].js - Product details → Cart state: adds item
pages/fullproduct/[id].js - Product details → Favourites state: toggles favourite
pages/fullproduct/[id].js - Product details → Related products: renders recommendations
pages/fullproduct/[id].js - Best seller details → Related products: renders recommendations
pages/bestsellingproduct/[id].js - Related product page → Related products: renders products
pages/relatedproduct/[id].js - Shop catalog → Cart state: uses cart
- Cart and checkout → Cart state: manages items
pages/cart.js - Cart state → Browser cart storage: persists cart
components/CartContext.js - Cart and checkout → Checkout callback: continues checkout
- Checkout callback → Payment initialization: starts payment
- Checkout callback → Payment verification: verifies payment
- User session → Supabase client: authenticates user
components/userContext.js - Favourites state → User session: reads session
components/FavouritesContext.js - Favourites state → Supabase client: stores favourites
components/FavouritesContext.js - Profile management → User session: reads session
components/dashboard/Profile.js - Profile management → Supabase client: updates profile
components/dashboard/Profile.js - Order dashboard → Supabase client: loads orders
components/dashboard/Order.js - Account dashboard → User session: uses session
- Supabase client → Supabase backend: connects client
helpers/supabase.js