How mihneafeitan/pcbuilds---commercial-website works
PCBuilds is an Express/EJS storefront for desktop-computer components. A shopper browses the catalog, filters and sorts products, opens product details, and can compare two selected products; the server queries PostgreSQL and serves rendered pages. The README also describes offers, favorites, and a cart, but sampled code explicitly says checkout is not implemented, so these are not presented as verified runtime flows. The account/role classes form a separate user-management layer. Some templates and routes were not sampled, so their internal wiring is omitted.
Main entry points: index.js Web application · Utilizator.js User accounts · roluri.js Role factory · pagini Page templates
Components 17
Storefront
- Web application
index.js - Page templates
views/pagini - Shared page fragments
views/fragmente
Product catalog
- Catalog page
views/pagini/produse.ejs - Product detail
views/pagini/produs.ejs - Comparison page
views/pagini/comparare.ejs - PostgreSQL products
Browser features
- Catalog filtering
resurse/js/produse.js - Compare selection
resurse/js/comparare.js - Product interactions
resurse/js/produs.js - Cookie preferences
resurse/js/cookies.js - Theme selection
resurse/js/tema.js
Accounts and access
- User accounts
clase/Utilizator.js - Database access
clase/AccesBD.js - Role factory
clase/roluri.js - Permission symbols
clase/drepturi.js
Other components
- Shopper
Connections 15
- Shopper → Web application: uses storefront
README.md - Web application → PostgreSQL products: queries products
index.js - Web application → Page templates: renders pages
index.js - Web application → Catalog page: serves catalog
- Web application → Product detail: serves details
- Web application → Comparison page: serves comparison
- Web application → Shared page fragments: uses shared layout
- Shopper → Catalog filtering: filters products
README.md - Shopper → Compare selection: selects products
README.md - Shopper → Cookie preferences: sets consent
resurse/js/cookies.js - Shopper → Theme selection: chooses theme
resurse/js/tema.js - Shopper → Product interactions: uses product page
resurse/js/produs.js - User accounts → Database access: queries users
clase/Utilizator.js - User accounts → Role factory: uses role factory
clase/Utilizator.js - Role factory → Permission symbols: assigns rights
clase/roluri.js