How guneshsiripuram/swara works
SwaRa is a jewellery and saree storefront with customer accounts, checkout, payments, and administrative product and site-asset management. The main customer journey is browsing or searching the catalogue, preparing a cart, validating checkout details and totals, creating an order, then paying through Razorpay; account pages also expose orders, addresses, and wishlists. The graph groups these product areas and the shared persistence/authentication layer. The README is only the Next.js starter template, and sampled excerpts do not establish every UI-to-route connection, so uncertain wiring is omitted.
Main entry points: index.ts Application database · addresses/route.ts Address management · CheckoutPageClient.tsx Checkout · orders/route.ts Order handling
Components 28
Storefront and catalogue
- Storefront pages
src/app/page.tsx - Collections
src/components/product/CollectionPage.tsx - Product detail
src/app/product/[slug]/page.tsx - Product search
src/app/search/SearchPageClient.tsx - Catalogue API
src/app/api/catalog/search/route.ts - Catalogue service
src/lib/catalog/server.ts
Customer account
- Account pages
src/app/account/page.tsx - Authentication API
src/app/api/auth/me/route.ts - Address management
src/app/api/user/addresses/route.ts - Cart API
src/app/api/user/cart/route.ts - Wishlist API
src/app/api/user/wishlist/route.ts
Checkout and orders
- Cart
src/app/cart/CartPageClient.tsx - Checkout
src/app/checkout/CheckoutPageClient.tsx - Checkout validation
src/app/api/checkout/validate/route.ts - Order handling
src/app/api/orders/route.ts - Order payment
src/app/api/orders/[id]/pay/route.ts - Payment webhook
src/app/api/webhooks/razorpay/route.ts
Store administration
- Admin catalogue
src/app/admin/catalogue/page.tsx - Product administration
src/app/api/admin/catalogue/products/route.ts - Site asset management
src/app/api/admin/site-assets/route.ts
Shared services
- Contact enquiries
src/app/api/contact/route.ts - Email delivery
src/lib/email/index.ts - Application database
src/lib/db/index.ts - Transaction layer
src/lib/db/transaction.ts - Session and roles
src/lib/auth/helpers.ts
Other components
- Shopper
- Razorpay
- Image blob storage
Connections 34
- Shopper → Storefront pages: browses
- Shopper → Collections: browses
- Shopper → Product search: searches
- Product search → Catalogue API: requests results
- Catalogue API → Catalogue service: queries catalogue
- Catalogue service → Application database: reads products
- Shopper → Cart: manages cart
- Shopper → Checkout: checks out
- Checkout → Checkout validation: validates cart
- Checkout validation → Application database: reads products
- Checkout → Order handling: creates order
- Order handling → Application database: reads and writes orders
- Order handling → Transaction layer: runs atomic work
- Transaction layer → Application database: executes transaction
- Shopper → Order payment: initiates payment
- Order payment → Razorpay: creates or fetches payment
- Order payment → Application database: claims order
- Razorpay → Payment webhook: sends events
- Payment webhook → Application database: updates payment status
- Shopper → Account pages: views account
- Account pages → Authentication API: checks session
- Authentication API → Session and roles: resolves identity
- Shopper → Address management: manages addresses
- Address management → Session and roles: resolves identity
- Address management → Application database: reads and writes addresses
- Cart API → Application database: reads and writes cart
- Wishlist API → Application database: reads and writes wishlist
- Admin catalogue → Product administration: manages products
- Product administration → Application database: reads and writes products
- Admin catalogue → Site asset management: manages assets
- Site asset management → Application database: reads and writes assets
- Site asset management → Image blob storage: deletes unused images
- Shopper → Contact enquiries: submits enquiry
- Contact enquiries → Email delivery: sends enquiry