A modern shopping cart and store checkout flow pattern with advanced Material Design features, built as a sample e-commerce application.
✨ Experience the full e-commerce demo at Live Demo
|
|
|
|
- 🏗️ Polymer Framework - Web Components based architecture
- 📱 Progressive Web App - Installable, offline-first experience
- 🎨 Material Design - Google's design system components
- ⚛️ Vanilla JavaScript - ES6+ modern JavaScript features
- 🎭 Custom Elements - Reusable web components
- 🔧 Polymer CLI - Official Polymer build tools
- 📦 npm - Package management and scripts
- 🌊 Gulp - Build automation and task runner
- 🧪 Mocha & Chai - Testing framework
- 📊 PRPL Server - Optimized server for PWAs
{
"@polymer/polymer": "^3.0.0",
"@polymer/app-layout": "^3.0.0",
"@polymer/app-route": "^3.0.0",
"@webcomponents/webcomponentsjs": "^2.0.0"
}- ⚡ Service Worker - Background sync and caching
- 📱 Web App Manifest - Installable app experience
- 🔄 Offline Support - Works without internet connection
- 🚀 Fast Loading - Optimized for performance
- 📊 Real-time Diagnostics - Built-in monitoring tools
Before you begin, ensure you have the following installed:
- Node.js 16.0 or higher (Download)
- npm (comes with Node.js) or yarn
- Git for version control (Download)
- Modern web browser (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+)
# 1. Clone the repository
git clone https://github.com/michaelgermini/ModernShop.git
# 2. Navigate to project directory
cd ModernShop
# 3. Install dependencies
npm install
# 4. Start development server
npm startOnce the server is running, access these URLs:
| Page | URL | Description |
|---|---|---|
| 🏠 Main Demo | http://localhost:8080/index.html |
Full-featured Material Design demo |
| 📊 Interface Comparison | http://localhost:8080/demo.html |
Compare Polymer vs Material Design |
| 🎨 Material Design | http://localhost:8080/material-shop.html |
Alternative Material Design version |
# Development
npm start # Start development server with polymer serve
npm run build:prpl-server # Build for PRPL server deployment
npm run build:static # Build static version for hosting
npm run serve:prpl-server # Serve PRPL server build locally
npm run serve:static # Serve static build on port 5000
# Production
npm run build # Build both PRPL and static versions
# Testing & Quality
npm test # Run full test suite (lint + tests)- Start the development server:
npm start - Open browser and navigate to
http://localhost:8080 - Make changes to HTML, CSS, or JavaScript files
- Refresh browser to see live updates
- Check console for diagnostic information
- Test features using the interactive demo interface
- 🔍 Advanced Search - Type in the search bar to see real-time filtering
- 🎠 Product Carousel - Scroll through featured products
- ❤️ Wishlist - Click heart icons on products to add/remove from wishlist
- 🛒 Shopping Cart - Add items to cart and manage quantities
- ⚖️ Product Comparison - Compare multiple products side by side
- 🎛️ Smart Filters - Filter by category and price range
- 📱 Responsive Design - Resize browser to see mobile adaptation
ModernShop/
├── 📁 data/ # Product data and images
│ ├── images/ # Product images (162 files)
│ └── *.json # Product data files
├── 📁 images/ # App icons and assets
├── 📁 src/ # Original Polymer components
├── 📁 server/ # Server configuration
├── 📁 test/ # Test pages
├── 📄 index.html # Main demo page with Material Design
├── 📄 demo.html # Interface comparison page
├── 📄 material-shop.html # Alternative Material Design version
├── 📄 modern-design.css # Enhanced CSS with animations
├── 📄 *.js # Modern JavaScript modules
├── 📄 package.json # Dependencies and scripts
├── 📄 manifest.json # PWA configuration
└── 📄 service-worker.js # Service worker for PWA
- 🏗️ Polymer 3.0 - Modern web components framework
- 📱 Web Components - Native browser standards
- 🎨 Material Design Components - Google's design system
- @polymer/polymer - Core Polymer framework
- @polymer/app-layout - Application layout components
- @polymer/app-route - Client-side routing
- @polymer/app-storage - Data persistence layer
- @webcomponents/webcomponentsjs - Polyfills for older browsers
- 🔧 Polymer CLI - Official build and development tools
- 📦 npm - Package management
- 🌊 Gulp - Task automation
- 🧪 Mocha & Chai - Testing framework
- 📊 PRPL Server - PWA-optimized server
- ⚛️ JavaScript (ES6+) - Modern JavaScript features
- 🎨 HTML5 - Semantic markup
- 💅 CSS3 - Advanced styling and animations
# Development workflow
npm start # Start Polymer development server
npm run build:prpl-server # Build optimized version for PRPL server
npm run build:static # Build static version for any hosting
npm run serve:prpl-server # Test PRPL server build locally
npm run serve:static # Test static build locally (port 5000)
npm run build # Build both versions
npm test # Run linting and testsThe project is optimized for Netlify deployment:
- Connect Repository: Link your GitHub repo to Netlify
- Auto-Deployment: Deploys automatically on git push
- Build Settings:
- Build Command:
npm run build - Publish Directory:
dist - Node Version: 18
- Build Command:
- Live URL:
https://your-site-name.netlify.app
Alternative deployment option:
- Automatic Deployment: Push to
masterbranch - Live URL:
https://michaelgermini.github.io/ModernShop/ - CDN: Assets served via GitHub's CDN
- Vercel: Connect GitHub repository (use
vercel.json) - Firebase: Hosting with CDN
- App Engine: Full server deployment
# Build for any static host
npm run build
# Deploy the 'dist' directory to your hosting provider
# All files are ready for static hosting- ⏱️ Load Time: < 2 seconds on 3G
- 📱 Mobile Score: 95+ (Lighthouse)
- 🖥️ Desktop Score: 98+ (Lighthouse)
- ♿ Accessibility: WCAG 2.1 AA compliant
- 🎯 SEO Score: 90+ (Search optimized)
// Add to localStorage for custom themes
localStorage.setItem('theme', 'dark'); // or 'light'/* Override Material Design colors */
:root {
--primary-color: #667eea;
--secondary-color: #764ba2;
--accent-color: #f093fb;
}We welcome contributions! This project serves as a learning resource for modern web development patterns.
- 🐛 Bug Reports - Report issues you find
- 💡 Feature Requests - Suggest new patterns or improvements
- 📖 Documentation - Improve guides and comments
- 🧪 Tests - Add test cases for existing functionality
- 🎨 UI/UX - Enhance the Material Design implementation
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature) - Make your changes following the existing patterns
- Test your changes with
npm test - Commit your changes (
git commit -m 'Add: brief description') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request with a clear description
- Follow existing code patterns and architecture
- Use semantic HTML and accessible markup
- Maintain PWA best practices
- Add comments for complex logic
- Test your changes thoroughly
This project is licensed under the MIT License - see the LICENSE file for details.
- Original Polymer Shop - Base project structure and PWA patterns
- Hamza Salem - Initial modifications and enhancements
- Polymer Team - Polymer framework and components
- Google Material Design - Design system and components
- Web Components Community - Standards and best practices
- PWA Community - Progressive Web App patterns and tools
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
- Advanced PWA Patterns - Push notifications, background sync
- Performance Monitoring - Real user monitoring integration
- A11y Testing - Automated accessibility testing
- Component Documentation - Storybook integration
- State Management - Flux/Redux patterns implementation
- TypeScript Migration - Type safety and better DX
- Micro-frontend Architecture - Component isolation
- GraphQL Integration - Modern API patterns
- CSS Grid & Container Queries - Advanced layout techniques
- WebAssembly Integration - Performance-critical features
- Web Components v2 - Latest standards adoption
- Import Maps - Modern module resolution
This project demonstrates several important web development patterns:
- Complete Shopping Cart Flow - From product selection to checkout
- Product Catalog Management - Efficient product display and filtering
- State Management - Client-side data persistence patterns
- Custom Announcers - Screen reader friendly notifications
- Semantic HTML - Proper document structure for assistive technologies
- Keyboard Navigation - Full keyboard accessibility
- Service Worker Implementation - Offline capability and caching
- Web App Manifest - Installable app experience
- PRPL Architecture - Performance-focused loading patterns
- Polymer Documentation - Official Polymer guides
- Web Components - MDN Web Components
- Material Design - Google's design system
- PWA Guides - Progressive Web Apps
This project is perfect for developers looking to learn:
- 🏗️ Web Components Architecture - Modern component development
- 📱 PWA Implementation - Progressive Web App patterns
- ♿ Accessibility Best Practices - Inclusive web development
- 🎨 Material Design Integration - Professional UI/UX patterns
- ⚡ Performance Optimization - Web performance techniques
- 🧪 Testing Strategies - Quality assurance approaches
🚀 Ready to explore? Visit Live Demo and experience modern web development patterns!
⭐ Star this repo if you find it useful for learning modern web development!
📚 Use this project as a reference for building your own e-commerce PWA applications.
