How mohitkumar1322/ecommercecartfullstack works
Project type and purpose
• This is a full-stack MERN (MongoDB, Express, React, Node.js) e-commerce application with two React frontends (customer “frontend” and admin “admin”) speaking to a single Express/Node.js backend.
• Key features: product browsing, cart & checkout, AI-powered recommendations, Google/Firebase auth, Razorpay payments, Cloudinary image storage, and a full admin dashboard for managing users, products, and orders.
File structure
• Top-level dirs:
• frontend/ – customer-facing React app (pages, components, contexts, utils/Firebase.js)
• admin/ – admin React app (product/order/user management UI)
• backend/ – Node.js/Express REST API
• backend uses MVC-ish layout:
• config/ – DB, Cloudinary, JWT token setup
• model/ – Mongoose schemas (User, Product, Order)
• controller/ – business logic for auth, cart, orders, products, users
• routes/ – Express routers mapping HTTP endpoints
• middleware/ – authentication/authorization (isAuth, adminAuth), file uploads
• Deployment/dev configs: .env, package.json, Vite configs, ESLint, Render deployment mentioned in README.
README for additional insights
• Tech stack spelled out (React, TailwindCSS, Context API; Express; MongoDB; Firebase/Google Auth; Razorpay; AI for recommendations).
• Mentions deployment on Render, .env variables for secrets.