How trishank18/mittsuthreads-online-clothing-store works
This repository implements a clothing-commerce application with a customer storefront, a separate administration interface, and an Express API. The main customer workflow is browsing products, managing a size-specific cart, and placing orders through cash on delivery or online payment; users can then review orders. The admin interface provides product and order management. Sampled backend controllers show persistence, image uploads, and payment verification. Some route-to-controller and admin-to-API wiring is not shown in the excerpts, so those links are omitted.
Main entry points: src/App.jsx Storefront app · src/App.jsx Admin app · server.js API server · orderController.js Orders and payments
Components 28
Customer storefront
- Storefront app
frontend/src/App.jsx - Shop state
frontend/src/context/ShopContext.jsx - Browse products
frontend/src/pages/Collection.jsx - Product details
frontend/src/pages/Product.jsx - Shopping cart
frontend/src/pages/Cart.jsx - Checkout
frontend/src/pages/PlaceOrder.jsx - Payment result
frontend/src/pages/Verify.jsx - Order history
frontend/src/pages/Orders.jsx - Account access
frontend/src/pages/Login.jsx
Admin interface
- Admin app
admin/src/App.jsx - Admin login
admin/src/components/Login.jsx - Product management
admin/src/pages/Add.jsx - Product listing
admin/src/pages/List.jsx - Order management
admin/src/pages/Orders.jsx
Commerce API
- API server
backend/server.js - User accounts
backend/controllers/userController.js - Product catalog
backend/controllers/productController.js - Cart operations
backend/controllers/cartController.js - Orders and payments
backend/controllers/orderController.js
Data and integrations
- User records
backend/models/userModel.js - Product records
backend/models/productModel.js - Order records
backend/models/orderModel.js - MongoDB
backend/config/mongodb.js - Cloudinary
backend/config/cloudinary.js - Stripe
- Razorpay
Other components
- Shopper
- Administrator
Connections 27
- Shopper → Storefront app: uses
- Storefront app → Browse products: routes to
- Storefront app → Product details: routes to
- Storefront app → Shopping cart: routes to
- Storefront app → Checkout: routes to
- Storefront app → Payment result: routes to
- Storefront app → Order history: routes to
- Storefront app → Account access: routes to
- Storefront app → Shop state: provides state
- Shop state → API server: requests catalog and cart
- API server → User accounts: mounts user routes
- API server → Product catalog: mounts product routes
- API server → Cart operations: mounts cart routes
- API server → Orders and payments: mounts order routes
- User accounts → User records: reads and writes
- Cart operations → User records: reads and writes
- Orders and payments → User records: updates cart
- Orders and payments → Order records: reads and writes
- Product catalog → Product records: reads and writes
- Product catalog → Cloudinary: uploads images
- Orders and payments → Stripe: creates sessions
- Orders and payments → Razorpay: creates and verifies
- Administrator → Admin app: uses
- Admin app → Admin login: shows when unauthenticated
- Admin app → Product management: routes to
- Admin app → Product listing: routes to
- Admin app → Order management: routes to