How tbs-toha/my-ecommerce-website works
TOHA’S MART is a server-backed storefront: customers browse products, manage carts and wishlists, and place cash-on-delivery orders; administrators manage catalog, inventory, orders, reviews, and reports. The browser clients call an Express API, with account and commerce routes handling customer operations and separate authentication and administration routes. SQLite holds application data and sessions. The README documents checkout and administration capabilities not fully visible in the sampled excerpts; their detailed internal call paths are therefore not inferred.
Main entry points: server.js Express Server · customer-routes.js Customer Commerce Routes · auth-routes.js Authentication Routes · schema.sql SQLite Database
Components 17
Storefront
- Product Catalog UI
app.js - Seed Catalog
products.js - Sign In / Register
auth.js - Cart
cart.js - Checkout
checkout.js - Wishlist
wishlist.js - Account
account.js - Order Details
order-details.js
Administration
- Admin Console
admin.js - Admin Commerce UI
admin-commerce.js
API Services
- Authentication Routes
auth-routes.js - Customer Commerce Routes
customer-routes.js - Admin Routes
admin-routes.js - Express Server
server.js
Persistence
- SQLite Session Store
session-store.js - SQLite Database
schema.sql
Other components
- Shopper
Connections 23
- Shopper → Product Catalog UI: browses
README.md - Product Catalog UI → Seed Catalog: uses fallback catalog
app.js - Product Catalog UI → Express Server: requests products
app.js - Shopper → Sign In / Register: registers or signs in
README.md - Sign In / Register → Authentication Routes: posts credentials
auth.js - Shopper → Cart: manages cart
README.md - Shopper → Wishlist: creates wishlist
README.md - Shopper → Checkout: places COD order
README.md - Shopper → Account: manages account
README.md - Shopper → Order Details: views order status
README.md - Shopper → Admin Console: administers store
README.md - Admin Console → Admin Commerce UI: loads commerce tools
- Admin Commerce UI → Admin Routes: requests admin data
admin-commerce.js - Account → Customer Commerce Routes: requests account data
account.js - Express Server → Authentication Routes: registers routes
server.js - Express Server → Customer Commerce Routes: registers routes
server.js - Express Server → Admin Routes: registers routes
server.js - Express Server → SQLite Session Store: configures sessions
server.js - SQLite Session Store → SQLite Database: reads and writes sessions
session-store.js - Authentication Routes → SQLite Database: reads and writes accounts
auth-routes.js - Customer Commerce Routes → Authentication Routes: uses password helpers
customer-routes.js - Customer Commerce Routes → SQLite Database: reads and writes commerce data
customer-routes.js - Admin Routes → SQLite Database: reads and writes admin data
admin-routes.js