Skip to content

A modern and performant e-commerce application built with Lit, Web Components, and Material Design 3

License

Notifications You must be signed in to change notification settings

michaelgermini/PolymerShopModern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🌊 PolymerShop Modern

License: MIT JavaScript Lit Vite PWA

A modern and performant e-commerce application built with Lit, Web Components, and Material Design 3

✨ Features

πŸ›οΈ Complete E-commerce

  • πŸͺ Product catalog with categories
  • πŸ” Advanced search and filtering
  • πŸ›’ Shopping cart with persistence
  • πŸ‘€ User management
  • πŸ“± Responsive interface

⚑ Optimized Performance

  • πŸš€ Optimized Core Web Vitals
  • πŸ“¦ Intelligent code splitting
  • πŸ–ΌοΈ Image lazy loading
  • πŸ’Ύ Optimized DOM caching
  • πŸ”„ Service Worker for PWA

β™Ώ Accessibility

  • βœ… WCAG 2.1 AA compliant
  • ⌨️ Complete keyboard navigation
  • πŸ”Š Screen reader support
  • 🎨 High contrast
  • πŸ“± Mobile navigation optimized

🎨 Modern Design

  • 🌊 Ocean-inspired theme
  • 🎭 Material Design 3
  • πŸŒ™ Dark/light mode
  • πŸ“ Smooth animations
  • 🎯 Intuitive interface

πŸš€ Quick Start

Prerequisites

  • Node.js >= 18.0.0
  • npm >= 8.0.0

Installation

# Clone the repository
git clone https://github.com/michaelgermini/PolymerShopModern.git
cd PolymerShopModern

# Install dependencies
npm install

# Start development server
npm run dev

Open http://localhost:8080 in your browser.

Build for Production

# Optimized build
npm run build

# Preview the build
npm run preview

# Deploy to GitHub Pages
npm run deploy

πŸ“ Project Structure

PolymerShopModern/
β”œβ”€β”€ πŸ“ src/
β”‚   β”œβ”€β”€ πŸ“„ main.js                 # Main entry point
β”‚   β”œβ”€β”€ πŸ“„ app.js                  # Main application
β”‚   β”œβ”€β”€ πŸ“ components/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ app-shell.js       # Application shell
β”‚   β”‚   └── πŸ“„ product-catalog.js # Product catalog
β”‚   β”œβ”€β”€ πŸ“ services/
β”‚   β”‚   β”œβ”€β”€ πŸ“„ cart-service.js    # Cart service
β”‚   β”‚   └── πŸ“„ product-service.js # Product service
β”‚   └── πŸ“„ fallback-app.js        # Fallback application
β”œβ”€β”€ πŸ“ public/
β”‚   β”œβ”€β”€ πŸ“„ manifest.json          # PWA manifest
β”‚   └── πŸ–ΌοΈ images/               # Static assets
β”œβ”€β”€ πŸ“„ index.html                 # HTML entry point
β”œβ”€β”€ πŸ“„ vite.config.js             # Vite configuration
β”œβ”€β”€ πŸ“„ package.json               # Dependencies and scripts
└── πŸ“„ README.md                  # Documentation

πŸ› οΈ Technologies Used

Core Framework

UI/UX

  • Material Design 3 - Google design system
  • CSS Custom Properties - CSS variables
  • CSS Grid & Flexbox - Modern layout
  • CSS Animations - Smooth transitions

Performance

  • Code Splitting - Modular loading
  • Lazy Loading - Images on demand
  • Service Worker - Offline cache
  • PWA - Progressive web application

Development Tools

  • ESLint - JavaScript linting
  • Prettier - Automatic formatting
  • Lighthouse - Performance audit
  • GitHub Actions - CI/CD

🎯 Available Scripts

# Development
npm run dev          # Development server
npm run build        # Production build
npm run preview      # Preview build

# Code quality
npm run lint         # ESLint check
npm run format       # Prettier formatting

# Deployment
npm run deploy       # GitHub Pages deployment

# Tests and audits
npm run audit:perf   # Performance audit
npm run audit:acc    # Accessibility audit
npm run test         # Unit tests

πŸ“Š Performance Metrics

Core Web Vitals (Targets)

  • LCP (Largest Contentful Paint): < 2.5s ⚑
  • FID (First Input Delay): < 100ms ⚑
  • CLS (Cumulative Layout Shift): < 0.1 ⚑

Lighthouse Scores (Average)

  • Performance: 90/100 🌟
  • Accessibility: 95/100 β™Ώ
  • Best Practices: 95/100 βœ…
  • SEO: 90/100 πŸ”

β™Ώ Accessibility

PolymerShop follows WCAG 2.1 AA guidelines:

  • βœ… Complete keyboard navigation
  • βœ… Screen reader support (NVDA, JAWS, VoiceOver)
  • βœ… High color contrast (4.5:1 minimum)
  • βœ… Semantic HTML5 structure
  • βœ… Appropriate ARIA attributes

Accessibility Tests

# Automated browser test
import('./test-accessibility-simple.js');
runAccessibilityCheck();

# Complete audit with axe-core
npm run audit:acc

πŸš€ Deployment

GitHub Pages

# Build and automatic deployment
npm run deploy

# Or manually
npm run build
npx gh-pages -d dist

Other Platforms

  • Vercel: Automatic GitHub connection
  • Netlify: Drag & drop deployment
  • Railway: Deployment from GitHub
  • Heroku: Node.js buildpack

🀝 Contributing

Contributions are welcome! πŸŽ‰

Process

  1. Fork the project
  2. Create a branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Guidelines

  • πŸ“ Follow Conventional Commits
  • πŸ§ͺ Tests for new features
  • β™Ώ Respect WCAG 2.1 AA accessibility
  • πŸ“Š Maintain Core Web Vitals performance
  • 🎨 Respect Material Design 3 design system

πŸ“ License

Distributed under the MIT License. See LICENSE for more information.

πŸ™ Acknowledgments

πŸ“ž Support

πŸ”„ Roadmap

v2.1.0 (Next Version)

  • πŸ›’ Stripe payment integration
  • πŸ“± Improved offline mode
  • 🎨 Customizable themes
  • πŸ” Advanced search with filters
  • πŸ“Š Analytics and user metrics

v2.2.0 (Future)

  • 🌐 Internationalization (i18n)
  • πŸ”” Push notifications
  • πŸ‘₯ Review/comment system
  • πŸ“± Native mobile app
  • πŸ€– Assistant chatbot

Made with ❀️ by Michael Germini

⭐ If you like this project, don't forget to give it a star!

πŸš€ Live Demo β€’ πŸ“– Documentation β€’ πŸ› Report a Bug

About

A modern and performant e-commerce application built with Lit, Web Components, and Material Design 3

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published