How riyaz510/cartify works
This is an Express storefront with an admin product catalog, a shopping cart, and placeholder checkout/orders pages. The main workflow routes browser requests through controllers to product/cart data access, then renders EJS pages. Product persistence is configured through Sequelize/MySQL; cart persistence uses a JSON file. Sampled cart-controller calls reference product methods not present in the sampled Sequelize model, so those paths may not work as written. The README is empty, and unsampled view details are represented only by their paths.
Main entry points: app.js Express app · shop.js Shop controller · admin.js Admin controller · product.js Product model
Components 15
Web routing
- Express app
app.js - Shop routes
routes/shop.js - Admin routes
routes/admin.js - 404 handler
controllers/error.js
Product catalog
- Admin controller
controllers/admin.js - Product model
models/product.js
Shopping flow
- Shop controller
controllers/shop.js - Cart model
models/cart.js
Persistence and views
- Sequelize config
util/db.js - MySQL database
- Cart file
data/cart.json - Shop pages
views/shop - Admin pages
views/admin - 404 page
views/404.ejs
Other components
- Shop visitor
Connections 16
- Shop visitor → Express app: sends requests
- Express app → Shop routes: mounts routes
- Express app → Admin routes: mounts routes
- Express app → 404 handler: handles unmatched
- Express app → Sequelize config: syncs models
- Shop routes → Shop controller: dispatches
- Admin routes → Admin controller: dispatches
- Shop controller → Product model: queries products
- Admin controller → Product model: manages products
- Product model → Sequelize config: defines model
- Sequelize config → MySQL database: reads and writes
- Shop controller → Cart model: updates and reads cart
- Cart model → Cart file: reads and writes
- Shop controller → Shop pages: renders pages
- Admin controller → Admin pages: renders pages
- 404 handler → 404 page: renders page