How kavinkumar008/ecommerce_clothing_app works
AURA is a clothing-commerce storefront. Shoppers browse a product catalog, inspect product details, and manage a cart; account access is provided through sign-in and registration. The repository also includes brand-story content and account/order-history views. The visible backend persists products, brand content, users, and carts in MongoDB. The graph emphasizes the documented storefront and cart flows; several page compositions and client-to-route connections are unsampled, so those links are omitted or marked unverified.
Main entry points: AuthModal.tsx Auth Modal · cart/route.ts Cart Endpoint · seed/route.ts Catalog Seeder · useCart.ts Cart Hooks
Components 31
Storefront
- Home Page
ecom_clothing/app/page.tsx - Product Listing
ecom_clothing/components/sections/ProductListing.tsx - Product Detail Page
ecom_clothing/app/products/[id]/page.tsx - Product View
ecom_clothing/components/sections/ProductView.tsx - Brand Story
ecom_clothing/app/api/content/brand-story/route.ts
Identity
- Account Page
ecom_clothing/app/account/page.tsx - Auth Page
ecom_clothing/app/auth/page.tsx - Auth Modal
ecom_clothing/components/modals/AuthModal.tsx - Auth Form Session
ecom_clothing/components/sections/AuthFormSession.tsx - Login Form
ecom_clothing/components/forms/auth/LoginForm.tsx - Signup Form
ecom_clothing/components/forms/auth/SignupForm.tsx - Auth Hooks
ecom_clothing/hooks/useAuth.ts - Login Endpoint
ecom_clothing/app/api/auth/login/route.ts - Registration Endpoint
ecom_clothing/app/api/auth/register/route.ts
Commerce Data
- Cart Page
ecom_clothing/app/cart/page.tsx - Cart Hooks
ecom_clothing/hooks/useCart.ts - Cart Endpoint
ecom_clothing/app/api/cart/route.ts - Cart Model
ecom_clothing/models/Cart.ts - Product Hooks
ecom_clothing/hooks/useProducts.ts - Product Endpoint
ecom_clothing/app/api/products/route.ts - Product Detail API
ecom_clothing/app/api/products/[id]/route.ts - Product Model
ecom_clothing/models/Product.ts - Brand Story Model
ecom_clothing/models/BrandStory.ts - Catalog Seeder
ecom_clothing/app/api/seed/route.ts
Shared UI
- Navigation Bar
ecom_clothing/components/Navbar.tsx - Dialog Primitive
ecom_clothing/components/ui/Modal.tsx - Scroll Area
ecom_clothing/components/ui/ScrollArea.tsx - MongoDB Connector
ecom_clothing/lib/mongodb.ts - JWT Utilities
ecom_clothing/lib/jwt.ts - API Client
ecom_clothing/lib/api.ts
Other components
- Shopper
Connections 19
- Shopper → Home Page: visits
- Navigation Bar → Auth Modal: opens
ecom_clothing/components/Navbar.tsx - Auth Modal → Auth Form Session: renders
ecom_clothing/components/modals/AuthModal.tsx - Auth Modal → Dialog Primitive: wraps
ecom_clothing/components/modals/AuthModal.tsx - Auth Modal → Scroll Area: uses
ecom_clothing/components/modals/AuthModal.tsx - Dialog Primitive → Scroll Area: uses
ecom_clothing/components/ui/Modal.tsx - Product Hooks → API Client: calls
ecom_clothing/hooks/useProducts.ts - Cart Hooks → API Client: calls
ecom_clothing/hooks/useCart.ts - Cart Hooks → Product Hooks: uses types
ecom_clothing/hooks/useCart.ts - Cart Endpoint → JWT Utilities: verifies token
ecom_clothing/app/api/cart/route.ts - Cart Endpoint → MongoDB Connector: connects
ecom_clothing/app/api/cart/route.ts - Cart Endpoint → Cart Model: queries
ecom_clothing/app/api/cart/route.ts - Product Endpoint → MongoDB Connector: connects
ecom_clothing/app/api/products/route.ts - Product Endpoint → Product Model: queries
ecom_clothing/app/api/products/route.ts - Product Detail API → Product Model: queries
- Catalog Seeder → MongoDB Connector: connects
ecom_clothing/app/api/seed/route.ts - Catalog Seeder → Product Model: seeds
ecom_clothing/app/api/seed/route.ts - Catalog Seeder → Brand Story Model: seeds
ecom_clothing/app/api/seed/route.ts - Navigation Bar → Cart Hooks: queries
ecom_clothing/components/Navbar.tsx