How steffenwaldvogel/ishop works
Project Type and Purpose
• This is a full-stack distributed e-commerce prototype called “iShop.”
• It comprises a static single‐page frontend, a RESTful Node.js/Express backend, Redis for session/cart caching, and PostgreSQL for persistent storage.
File Structure Analysis
• Top-level directories:
• backend/ – Node.js service with config/, routes/, server.js
• frontend/ – Static assets (HTML/CSS/JS) and app code
• Key backend patterns: configuration modules (db.js, redisClient.js, paypalClient.js), modular Express routes (products, cart, checkout, orders, shipping, paypal).
• Frontend is organized around pages and widgets (shopfront, cart, checkout, order confirmation) with a single app.js entry.
README Insights
• Service-oriented architecture: clear separation of concerns.
• Technologies: HTML/CSS/JS frontend, Express backend, PostgreSQL (normalized schema), Redis caching, mock PayPal.
• Features: product catalog, session-based cart, checkout flows, future order-confirmation UI.
a. Main Components
• Frontend (Browser)
• API Gateway / Express Backend
• PostgreSQL Database
• Redis Cache
• External/MOCK PayPal Service
b. Relationships & Data Flow
1. Browser ↔ REST endpoints on Express
2. Express → PostgreSQL for CRUD on orders, products, shipping/payment methods
3. Express → Redis for session cart persistence
4. Express → Mock PayPal for payment simulation
c. Architectural Patterns
• Layered: Presentation (frontend), API layer (Express routes/controllers), Data layer (Postgres + Redis)
• Service-oriented: each route group (cart, checkout, products…) acts as a mini-service module
d. Key Technologies
• Frontend: HTML, CSS, vanilla JS
• Backend: Node.js, Express
• Data: PostgreSQL (ER-modeled schema)
• Cache: Redis
• Payments: custom mock PayPal client module