How gaetanbloch/norder works
This is an Express/EJS online shop. A shopper browses paginated products, adds items to a session-authenticated cart, checks out through Stripe, and later views orders or downloads an invoice; administrators manage their own product listings, while users can sign up, log in, and reset passwords. The graph separates routing, identity, catalog administration, commerce, and persistence. README capabilities include the documented PDF invoice and email flows; unsampled templates and integrations are represented only where the tree or README supports them.
Main entry points: shop.js Shopping workflow · app.js Express application · user.js User and cart · admin.js Product administration
Components 24
Web application
- Express application
app.js - Listing and errors
utils.js
Identity
- Auth routes
routes/auth.js - Authentication
controllers/auth.js - Login guard
middleware/is-auth.js - User and cart
models/user.js - Email delivery
Catalog administration
- Admin routes
routes/admin.js - Product administration
controllers/admin.js - Products
models/product.js - Admin product views
views/admin
Shopping and orders
- Shop routes
routes/shop.js - Shopping workflow
controllers/shop.js - Orders
models/order.js - Product listing
views/shop/product-list.ejs - Product detail
views/shop/product-detail.ejs - Cart and checkout views
views/shop/cart.ejs - Orders view
views/shop/orders.ejs - Listing pagination
views/includes/pagination.ejs
Data and integrations
- MongoDB
- Stripe checkout
- PDF generation
Other components
- Shopper
- Administrator
Connections 33
- Shopper → Express application: uses
README.md - Administrator → Express application: uses
README.md - Express application → Auth routes: mounts
app.js - Express application → Admin routes: mounts
app.js - Express application → Shop routes: mounts
app.js - Express application → User and cart: loads session user
app.js - Express application → MongoDB: connects
app.js - Auth routes → Authentication: dispatches
routes/auth.js - Auth routes → User and cart: checks signup email
routes/auth.js - Authentication → User and cart: reads and saves
controllers/auth.js - Authentication → Email delivery: sends messages
controllers/auth.js - Admin routes → Login guard: guards routes
routes/admin.js - Admin routes → Product administration: dispatches
routes/admin.js - Product administration → Products: manages products
controllers/admin.js - Product administration → Admin product views: renders
controllers/admin.js - Product administration → Listing and errors: uses listing and file helpers
controllers/admin.js - Shop routes → Login guard: guards cart and orders
routes/shop.js - Shop routes → Shopping workflow: dispatches
routes/shop.js - Shopping workflow → Products: reads products
controllers/shop.js - Shopping workflow → User and cart: updates cart
controllers/shop.js - Shopping workflow → Orders: creates and reads orders
controllers/shop.js - Shopping workflow → Stripe checkout: creates checkout session
controllers/shop.js - Shopping workflow → PDF generation: generates invoice
controllers/shop.js - Shopping workflow → Product listing: renders
controllers/shop.js - Shopping workflow → Product detail: renders
controllers/shop.js - Shopping workflow → Cart and checkout views: renders
controllers/shop.js - Shopping workflow → Orders view: renders
controllers/shop.js - Shopping workflow → Listing and errors: uses product listing helper
controllers/shop.js - Listing and errors → Products: queries paginated products
utils.js - Product listing → Listing pagination: uses
- Products → MongoDB: persists products
README.md - User and cart → MongoDB: persists user and cart
README.md - Orders → MongoDB: persists orders
README.md