How mr1823/sriram-jewellery works
This tree implements a React jewellery storefront with an Express API and Mongo-backed domain models; the README’s Next.js/PostgreSQL description does not match the supplied source tree. The principal journey is browsing products, signing in when needed, managing a cart, and checking out. The graph preserves major storefront, account, administration, and engagement capabilities. Several route implementations were not sampled, so their connections are shown only where imports or excerpts support them; dashed links indicate unverified client/API integration.
Main entry points: index.js Express API · App.jsx Application routes · Checkout.jsx Checkout and payment · useAxiosSecure.jsx Authenticated API client
Components 19
Storefront
- Application routes
src/App.jsx - Product catalog
src/pages/Shop/Shop/Shop.jsx - Product details
src/pages/DynamicProduct/DynamicProduct.jsx - Cart and wishlist
src/hooks/useCart.jsx - Checkout and payment
src/pages/Checkout/Checkout.jsx
Identity
- Sign-in and registration
src/components/PhoneAuthForm/PhoneAuthForm.jsx - Authentication state
src/providers/AuthProvider.jsx - Authenticated API client
src/hooks/useAxiosSecure.jsx - Customer account
src/hooks/useUserInfo.jsx
API domains
- Express API
server/index.js - Authentication endpoints
server/routes/auth.js - Product and category endpoints
server/routes/products.js - Cart and order endpoints
server/routes/orders.js - Review endpoints
server/routes/reviews.js - Other domain endpoints
server/routes
Operations and data
- Admin dashboard
src/pages/Dashboard/AdminDashboard/AdminDashboard.jsx - Domain models
server/models - Database connection
server/db/connect.js
Other components
- Shopper
Connections 24
- Shopper → Application routes: opens
src/App.jsx - Application routes → Product catalog: routes to
src/App.jsx - Application routes → Product details: routes to
- Shopper → Product catalog: browses
- Shopper → Cart and wishlist: manages items
- Shopper → Checkout and payment: checks out
- Checkout and payment → Cart and wishlist: reads cart
src/pages/Checkout/Checkout.jsx - Checkout and payment → Sign-in and registration: requires account
- Sign-in and registration → Authentication state: uses auth state
src/components/PhoneAuthForm/PhoneAuthForm.jsx - Authentication state → Authentication endpoints: calls endpoints
- Authenticated API client → Authentication state: refreshes session
src/hooks/useAxiosSecure.jsx - Customer account → Authenticated API client: fetches profile
src/hooks/useUserInfo.jsx - Checkout and payment → Authenticated API client: uses client
src/pages/Checkout/Checkout.jsx - Application routes → Admin dashboard: routes to
src/App.jsx - Admin dashboard → Authenticated API client: loads admin data
- Express API → Authentication endpoints: mounts routes
server/index.js - Express API → Product and category endpoints: mounts routes
server/index.js - Express API → Cart and order endpoints: mounts routes
server/index.js - Express API → Review endpoints: mounts routes
server/index.js - Express API → Other domain endpoints: mounts routes
server/index.js - Review endpoints → Domain models: reads and writes
server/routes/reviews.js - Express API → Database connection: connects database
server/index.js - Shopper → Sign-in and registration: creates account
- Shopper → Admin dashboard: administers store