How sharik820/avada_ecommerce works
This repository implements an online storefront and its administration portal, backed by an Express API. The principal user journey is browsing products, submitting an order, and viewing order details; separate flows cover accounts and OTP verification, blogs and reviews, and administration of products, blogs, users, and orders. The frontend route table and backend route mounts are visible, as are review-service calls into persistence. Many page-to-API and backend route-to-controller connections are not shown in the excerpts, so those relationships are left unverified rather than asserted.
Main entry points: app.js Express app · Routing.jsx Route dispatch · BackendApi.jsx Backend API client · productReview.service.js Review services
Components 22
Storefront
- Route dispatch
client/src/routes/Routing.jsx - Storefront pages
client/src/pages - Account and OTP
client/src/pages - Order and invoice
client/src/pages/Buy_Now_Form.jsx - Blog and reviews
client/src/pages/Blog_Details.jsx - Backend API client
client/src/api/BackendApi.jsx
Administration
- Admin console
client/src/pages/Admin_Product_add.jsx - Protected routes
client/src/auth/ProtectedRoute.jsx
API domain services
- Express app
server/src/app.js - User and auth
server/src/controller/user.controller.js - Product catalog
server/src/controller/product.controller.js - Blog content
server/src/controller/blog.controller.js - Review endpoints
server/src/controller/productReview.controller.js - Review services
server/src/service/productReview.service.js - Orders
server/src/controller/order.controller.js - Payments
server/src/controller/payment.controller.js - Admin management
server/src/controller/admin.controller.js
Persistence and integrations
- Data repository
server/src/repositories/db.repositiories.js - Order repository
server/src/repositories/order.repositiory.js - Cache
server/src/utils/cache.js - Email and payment providers
Other components
- Shopper
Connections 25
- Shopper → Route dispatch: navigates
- Route dispatch → Storefront pages: dispatches
- Route dispatch → Account and OTP: dispatches
- Route dispatch → Order and invoice: dispatches
- Route dispatch → Blog and reviews: dispatches
- Route dispatch → Admin console: dispatches
- Route dispatch → Protected routes: wraps protected
client/src/routes/Routing.jsx - Storefront pages → Backend API client: uses API
client/src/pages/Update_Product.jsx - Account and OTP → Backend API client: uses API
client/src/pages/Update_Product.jsx - Order and invoice → Backend API client: uses API
- Blog and reviews → Backend API client: uses API
- Admin console → Backend API client: uses API
client/src/pages/Admin_Product_add.jsx - Backend API client → Express app: HTTP requests
- Express app → User and auth: mounts user routes
server/src/app.js - Express app → Product catalog: mounts product routes
server/src/app.js - Express app → Blog content: mounts blog routes
server/src/app.js - Express app → Review endpoints: mounts review routes
server/src/app.js - Express app → Orders: mounts order routes
server/src/app.js - Express app → Payments: mounts payment routes
server/src/app.js - Express app → Admin management: mounts admin routes
server/src/app.js - Review endpoints → Review services: calls
server/src/controller/productReview.controller.js - Review services → Data repository: reads and writes
server/src/service/productReview.service.js - Review services → Cache: invalidates and reads
server/src/service/productReview.service.js - Orders → Order repository: uses repository
- Orders → Email and payment providers: payment or email