How naman-saxena1/bookztron-e-commerce_book_store works
Project type and purpose
• From the README (“Full Stack E-Commerce Project using MERN”) and the file tree (a React “src” folder, “public” & “build” directories, plus a note about a Node/Express/MongoDB backend deployed separately), this is a full-stack online bookstore.
• The front end is a React single‐page application (SPA) using Context API for state management. The backend (not in this repo) is a RESTful API built with Node.js/Express and MongoDB, deployed on Vercel. The front end itself is deployed on Netlify.
File structure
• Top-level:
• public/ & build/ → static assets and production bundle for the React app
• src/ → application source code
• package.json / package-lock.json → npm configuration
• Inside src/:
• Components/ → reusable UI components (cards, navbar, sidebar, toast, etc.)
• Context/ → React Contexts for cart, wishlist, user auth, products, filters, toast
• Pages/ → route targets (Home, Shop, ProductPage, Cart, Wishlist, Orders, Authentication)
• UtilityFunctions/loadRazorpayScript.js → dynamic payment SDK loader
• index.js, App.js → entry point and router setup
README for additional insights
• Technologies: React, Context API, CSS, JavaScript on the client; Node, Express, MongoDB on the server
• Features: authentication, product listing, sorting & filtering, wishlist & cart management, coupon, Razorpay integration, orders
• Shows the user flows and API interactions required (e.g., signup/login, adding to cart, checkout/razorpay, fetching orders)
a. Main components:
• Front end (React SPA)
• Back end (Node/Express REST API)
• Database (MongoDB Atlas)
• External services: Razorpay for payments, Authentication (if OAuth providers used), CDN/Netlify hosting, Vercel hosting
b. Relationships/interactions:
• Browser → React SPA (served via CDN/Netlify)
• SPA → REST API (over HTTPS):
• Auth endpoints (signup/login/logout)
• Product catalog endpoints (list, filter, details)
• Cart & wishlist endpoints (CRUD)
• Order endpoints (create order, get orders)
• Payment endpoints (create payment order, verify payment)
• REST API → MongoDB (CRUD operations)
• SPA ↔ Razorpay JavaScript SDK (loaded at checkout)
c. Architectural patterns/design principles:
• Client-server separation (SPA and REST API)
• React Context API for global state management (cart, wishlist, user, UI states)
• Component modularity (molecules & pages)
• Externalization of configuration & assets (public folder, environment variables on Vercel/Netlify)
d. Technologies/frameworks to label:
• React, React Router, Context API
• Node.js, Express.js, Mongoose
• MongoDB Atlas (or self-hosted)
• Razorpay SDK
• Netlify / Vercel
• Use clear, consistent labels (e.g., “React SPA”, “Express API”, “MongoDB”)
• Front end (blue),
• Back end (green),
• Database (orange),
• External services (purple)
• Rectangles for services/modules,
• Clouds for external systems