How puneet987720-creator/snapcart works
Snapcart is a MERN shopping application. Shoppers browse and filter products, manage a cart, check out with a delivery address, pay through Razorpay, and view orders; account registration and email verification support that flow. The graph preserves the documented payment and order-confirmation capabilities, but the excerpts do not show the complete checkout wiring or email-confirmation delivery mechanism, so those links are marked unverified or omitted.
Main entry points: script.js Express server · App.jsx Application shell · ordercontroler.js Order operations · cartRoutes.jsx Cart and order routes
Components 29
Shopping experience
- Application shell
frontend/src/router/App.jsx - Product routes
frontend/src/router/productRoutes.jsx - Browse and filter
frontend/src/components/Products.jsx/filterProduct.jsx - Product API client
frontend/src/services/poducts.jsx - Cart state
frontend/src/Store/addToCart-Store.jsx - Cart and order routes
frontend/src/router/cartRoutes.jsx - Checkout and payment
frontend/src/components/Order/OrderCheckout.jsx - Order views
frontend/src/components/Order/AllPlacedOrder.jsx - Order API client
frontend/src/services/order.jsx - Authentication routes
frontend/src/router/auth-routes.jsx - Signup and login
frontend/src/components/Auth/Signup.jsx - Authorization client
frontend/src/services/authorization.jsx - API configuration
frontend/src/services/apiConfig.js
Application services
- Express server
Backend/script.js - Product endpoints
Backend/routes/productroutes.js - Product operations
Backend/controler/productControler.js - Cart operations
Backend/controler/cartControler.js - Authentication endpoints
Backend/routes/authroutes.js - Account operations
Backend/controler/authcontroler.js - Order and payment endpoints
Backend/routes/orderRoutes.js - Order operations
Backend/controler/ordercontroler.js
Persistent data
- Account records
Backend/models/auth.js - Product records
Backend/models/products.js - Cart records
Backend/models/cart.js - Order records
Backend/models/order.js
External integrations
- Email verification
Backend/VerifyEmail/EmailVerify.js - Payment verification
Backend/utils/paymentVerification.js - Razorpay
Other components
- Shopper
Connections 32
- Shopper → Application shell: uses
- Application shell → Product routes: routes to
frontend/src/main.jsx - Application shell → Cart and order routes: routes to
frontend/src/main.jsx - Application shell → Authentication routes: routes to
frontend/src/main.jsx - Product routes → Browse and filter: renders
frontend/src/router/productRoutes.jsx - Browse and filter → Product API client: requests products
frontend/src/components/Products.jsx/filterProduct.jsx - Cart and order routes → Checkout and payment: renders
frontend/src/router/cartRoutes.jsx - Cart and order routes → Order views: renders
frontend/src/router/cartRoutes.jsx - Order views → Order API client: requests orders
frontend/src/components/Order/AllPlacedOrder.jsx - Authentication routes → Signup and login: renders
frontend/src/router/auth-routes.jsx - Signup and login → Authorization client: calls
frontend/src/components/Auth/Signup.jsx - Authorization client → API configuration: uses base URL
frontend/src/services/authorization.jsx - Product API client → API configuration: uses base URL
frontend/src/services/poducts.jsx - Cart state → Product API client: uses
frontend/src/Store/addToCart-Store.jsx - Express server → Product endpoints: mounts
Backend/script.js - Express server → Cart operations: mounts routes
- Express server → Authentication endpoints: mounts
Backend/script.js - Express server → Order and payment endpoints: mounts
Backend/script.js - Product endpoints → Product operations: dispatches
Backend/routes/productroutes.js - Authentication endpoints → Account operations: dispatches
Backend/routes/authroutes.js - Order and payment endpoints → Order operations: dispatches
Backend/routes/orderRoutes.js - Product operations → Product records: reads and writes
Backend/controler/productControler.js - Product operations → Account records: uses
Backend/controler/productControler.js - Cart operations → Cart records: reads and writes
Backend/controler/cartControler.js - Cart operations → Product records: reads
Backend/controler/cartControler.js - Account operations → Account records: reads and writes
Backend/controler/authcontroler.js - Account operations → Email verification: uses
Backend/controler/authcontroler.js - Order operations → Order records: reads and writes
Backend/controler/ordercontroler.js - Order operations → Payment verification: verifies payment
Backend/controler/ordercontroler.js - Checkout and payment → Order API client: submits orders
- Checkout and payment → Razorpay: pays through
README.md - Order operations → Razorpay: integrates payments
README.md