How krishna-4code/awaraa-s-culture works
Awaraa’s Culture is a streetwear ecommerce storefront with customer accounts, cart and promotional pricing, checkout options, live stock, and an admin/CMS surface. The shopper workflow runs from browsing products or collections through cart management and checkout; separate branches cover authentication and inventory administration. Sampled code confirms cart-context calls and stock/auth endpoints, but most commerce, checkout, and admin wiring was not sampled, so those relationships are shown only where supported or left unconnected.
Main entry points: CartContext.tsx Cart state · server.ts Server auth client · client.ts Browser auth client · checkout.ts Checkout logic
Components 31
Storefront
- Home page
src/app/(main)/page.tsx - Collections
src/app/(main)/collections/[category]/page.tsx - Product page
src/app/(main)/products/[id]/page.tsx - Product detail UI
src/components/ProductDetail.tsx - Cart UI
src/components/CartDrawer.tsx
Commerce
- Cart state
src/components/CartContext.tsx - Cart operations
src/lib/commerce/cart.ts - Promo validation
src/lib/commerce/promo.ts - Cart and checkout
src/app/(main)/cart/page.tsx - Checkout logic
src/lib/commerce/checkout.ts - Instagram order
src/lib/commerce/instagram.ts - Razorpay payments
src/lib/commerce/razorpay.ts - Shopify client
src/lib/commerce/client.ts
Identity
- Login form
src/app/(main)/login/AuthForm.tsx - Auth actions
src/app/(main)/login/actions.ts - Browser auth client
src/lib/supabase/client.ts - Server auth client
src/lib/supabase/server.ts - OAuth callback
src/app/auth/callback/route.ts
Operations
- Admin dashboard
src/app/admin/AdminDashboard.tsx - Admin actions
src/app/admin/actions.ts - Admin authorization
src/lib/admin/auth.ts - Stock API
src/app/api/inventory/stock/route.ts - Inventory operations
src/lib/inventory/operations.ts - Inventory writer
src/lib/inventory/sanityWriteClient.ts
Content
- Sanity Studio
src/app/studio/[[...tool]]/page.tsx - Content schemas
src/sanity/schemaTypes/index.ts - Brand and policy pages
src/app/(main)/shipping/page.tsx
Other components
- Shopper
- Shopify Storefront
- Supabase Auth
- Sanity CMS
Connections 26
- Shopper → Home page: browses
- Shopper → Collections: browses
- Shopper → Product page: opens
- Product page → Product detail UI: renders
- Shopper → Cart UI: opens
- Cart UI → Cart state: uses
- Cart state → Cart operations: manages cart
- Cart state → Promo validation: validates codes
- Cart state → Browser auth client: reads user
- Cart and checkout → Cart state: uses
- Login form → Auth actions: submits credentials
- Login form → Browser auth client: starts OAuth
- Auth actions → Server auth client: authenticates
- OAuth callback → Server auth client: exchanges code
- Browser auth client → Supabase Auth: auth requests
- Server auth client → Supabase Auth: auth requests
- Stock API → Inventory operations: gets stock
- Admin dashboard → Admin actions: admin tasks
- Admin actions → Admin authorization: checks access
- Admin authorization → Server auth client: checks user
- Sanity Studio → Content schemas: uses schemas
- Content schemas → Sanity CMS: defines content
- Inventory writer → Sanity CMS: writes data
- Checkout logic → Instagram order: prepares order
- Checkout logic → Razorpay payments: initiates payment
- Shopify client → Shopify Storefront: GraphQL requests