How rmgonella/react-node-ecommerce works
This is a React storefront backed by an Express API and PostgreSQL, with Stripe-hosted checkout. The main shopper flow loads products and categories, filters and displays products, adds items to an in-memory cart, then requests a checkout session and redirects to Stripe. The graph also includes documented authentication and catalog administration. Connections are limited to shown imports, calls, database queries, and README-stated capabilities; frontend login and product-detail behavior are not evidenced as working flows.
Main entry points: App.jsx App State and Routing · index.js Express API Server · Home.jsx Catalog and Filters · cart.js Checkout Sessions
Components 17
Storefront
- App State and Routing
frontend/src/App.jsx - React Entry
frontend/src/main.jsx - Store Header
frontend/src/components/Header.jsx - Catalog and Filters
frontend/src/components/Home.jsx - Product Card
frontend/src/components/ProductCard.jsx - Cart and Checkout
frontend/src/components/Cart.jsx - Checkout Success
frontend/src/components/Success.jsx - Checkout Cancel
frontend/src/components/Cancel.jsx
Backend API
- Express API Server
backend/index.js - JWT Authentication
backend/routes/auth.js - Product CRUD
backend/routes/products.js - Category CRUD
backend/routes/categories.js - Checkout Sessions
backend/routes/cart.js
Commerce Services
- PostgreSQL Pool
backend/db.js - PostgreSQL
- Stripe Checkout
Other components
- Shopper
Connections 24
- Shopper → App State and Routing: uses
- React Entry → App State and Routing: renders
frontend/src/main.jsx - App State and Routing → Store Header: renders
frontend/src/App.jsx - App State and Routing → Catalog and Filters: renders
frontend/src/App.jsx - App State and Routing → Cart and Checkout: renders
frontend/src/App.jsx - App State and Routing → Checkout Success: renders
frontend/src/App.jsx - App State and Routing → Checkout Cancel: renders
frontend/src/App.jsx - Catalog and Filters → Product Card: renders
frontend/src/components/Home.jsx - Catalog and Filters → Product CRUD: fetches products
frontend/src/components/Home.jsx - Catalog and Filters → Category CRUD: fetches categories
frontend/src/components/Home.jsx - Cart and Checkout → Checkout Sessions: requests session
frontend/src/components/Cart.jsx - Checkout Sessions → Stripe Checkout: creates session
backend/routes/cart.js - Checkout Sessions → Cart and Checkout: returns session ID
frontend/src/components/Cart.jsx - Stripe Checkout → Checkout Success: redirects on success
- Stripe Checkout → Checkout Cancel: redirects on cancel
- Express API Server → JWT Authentication: mounts routes
backend/index.js - Express API Server → Product CRUD: mounts routes
backend/index.js - Express API Server → Category CRUD: mounts routes
backend/index.js - Express API Server → Checkout Sessions: mounts routes
backend/index.js - JWT Authentication → PostgreSQL Pool: queries users
backend/routes/auth.js - Product CRUD → PostgreSQL Pool: queries products
backend/routes/products.js - Category CRUD → PostgreSQL Pool: queries categories
backend/routes/categories.js - PostgreSQL Pool → PostgreSQL: connects to
backend/db.js - Shopper → JWT Authentication: registers or logs in