How ag2627/iconique works
Project type and purpose
• This is a full-stack e-commerce marketplace (“Iconique”) with a React-based frontend (Vite + JSX + Tailwind + Redux) and a Node/Express backend connected to MongoDB.
• Purpose: Enable sellers to list streetwear products (with images & stories) and buyers to browse, filter, purchase (including live auctions), review, wishlist, and pay via Razorpay.
File structure
• Top level:
• Backend/ – Express server implementation (index.js, package.json).
• src/ – React app (App.jsx, components/, redux/, service/api.js, utils/, context/).
• Config scripts: vite.config.js, tailwind.config.js, postcss.config.js, eslint.config.js.
• Backend substructure follows MVC + route organization:
• Database (db.js)
• Models (Mongoose schemas under Backend/Model)
• Controllers (business logic)
• Routes (grouped by feature: Address, Payment, Seller, etc.)
• Middleware (auth, input validation)
• Config (Cloudinary, Razorpay)
• Utils (JWT helper)
• Frontend:
• Components grouped by domain (Home, Details, Cart, Checkout, Profile, Seller, User, Orders, Payment)
• UI primitives under components/ui
• Redux slices in src/redux/store
• API wrapper in src/service/api.js
• Context/DataProvider for theme or shared state
• Utility scripts (load scripts, paytm, common utils)
README insights
• Describes core features: user auth, product listing, auctions, eco-badges, reviews, wishlist
• Lists tech stack: Node.js, MongoDB, React, Vite, Razorpay
Sketch a two-column canvas
• Left column: Frontend (React SPA)
• Right column: Backend & persistence
• External services along the right edge.
• UI Pages (Home, Details, Cart, Checkout, Profile, Seller Dashboard)
• State Management (Redux slices, Context)
• Service Layer (api.js, paymentServices)
• Routes (Address, Payment, Seller, Product, User, Wishlist, Order)
• Controllers (business logic)
• Models (Mongoose schemas)
• Middleware (auth, validation)
• Config modules (Cloudinary, Razorpay)
• From UI components → service layer → HTTP clients → Backend routes
• From controllers → models → MongoDB
• From controllers → Cloudinary & Razorpay & Email
• From Razorpay Webhooks → Backend Payment routes → Controllers
Data flows
• e.g. “POST /api/products” → ProductController → ProductModel.save()
• “GET /api/cart” → CartController → returns cart items