Interactive, beginner-friendly e‑commerce frontend (vanilla HTML/CSS/JS) with a polished UI, accessibility-first behaviours, and a lightweight 3D hero integration for a premium feel.
- Live demo: (add deployed URL here)
- Short GIF: assets/screenshots/flow.gif (browse → add to cart → checkout)
- Screenshots:
assets/screenshots/hero-desktop.pngassets/screenshots/hero-mobile.pngassets/screenshots/quickview.pngassets/screenshots/receipt.png
This repository is a focused learning project and a polished reference for building accessible, high-quality e‑commerce UIs without frameworks. It demonstrates:
- Design tokens and a reusable UI system (spacing, shadows, button tiers)
- Progressive enhancement: lazy-loaded Spline hero with fallback image and reduced-motion support
- Accessibility best-practices (focus management, ARIA roles, keyboard flows)
- Lightweight, dependency-free interactive components that are easy to read and extend
- Clone:
git clone https://github.com/E-commerce-foundation/FrontEnd.git
cd FrontEnd- Open locally:
# Windows
start index.html
# macOS
open index.htmlNo build tools required.
docs/JS_ARCHITECTURE.md— how the JS works (single entrypoint, page initializers)docs/PROJECT_STRUCTURE.md— where things live
- Branch from
mainfor features:git checkout -b feat/my-feature - Make small, focused commits with clear messages
- Push branch and open a PR with screenshots / short GIF
index.html— main entrypointindex.css— single CSS entrypoint (imports core styles + legacy CSS)main.js— app orchestrator loaded by all pagesassets/— images and iconscore/— shared utilities, libs, and global styles/tokensstyles/— all CSS (base, components, pages, utilities)modules/— feature modules (products, cart, auth, admin)pages/— standalone HTML pages (product, checkout, auth)
- Responsive product grid and cards with image ratio control
- Search with debounce, category & sort filters
- Add to Cart, update quantity, remove items; cart drawer + checkout modal
- Printable receipt (salePrice respected)
- Favorites (localStorage)
- Toast notifications with accessible ARIA attributes
- Lazy-loaded Spline hero (performance-minded) and noscript/image fallback
- Design tokens in CSS (:root) for consistent spacing, typography and color.
- Button system: primary, secondary, and icon/tertiary for clear affordances.
- Product card ratio 4:3 to keep imagery visually dominant and consistent.
- Spline integration: lazy-load via IntersectionObserver; provide static fallback and reduced-motion path.
- Keyboard accessible controls for cart and modal
- Focus trap helpers and focus restore on modal/drawer close
- Toasts use
role="status"andaria-livefor screen reader announcements -
prefers-reduced-motionrespected in CSS - Add aria-labels to any remaining interactive SVG-only buttons (ongoing review)
- Run a full a11y audit (axe/Lighthouse) and publish results
- Images use
loading="lazy"; optimize (resize + WebP) before production. - Spline hero is lazy-loaded and injected only when near viewport to improve LCP.
- Avoid heavy backdrop-filter/shadow on low-end devices (CSS fallbacks in place).
- Suggested CI: GitHub Actions — run lint, unit tests (when added), and Lighthouse snapshot.
- Add basic unit tests for cart logic (Jest) and visual smoke tests with Playwright.
- Add GitHub Actions workflow to run lint & tests on PRs and Lighthouse snapshots on deploy.
We welcome contributions aimed at improving the learning and production-readiness of this repo.
Suggested issues:
good-first-issue— Add annotated screenshots for READMEgood-first-issue— Improve mobile navigation layoutenhancement— Add Playwright smoke tests for checkout flow
- Fork and branch:
git checkout -b feat/my-feature - Make changes and include screenshots/GIF in PR description
- Use a clear commit message and link to an issue when applicable
- Proposed UI/Spline changes:
docs/PROPOSED_UI_CHANGES.md - Changelog (template):
docs/CHANGELOG.md(will be added/maintained for releases)
See docs/PROPOSED_UI_CHANGES.md for the latest planned UI improvements. A changelog will be created in docs/CHANGELOG.md and updated with each release.
MIT — see LICENSE
Listed contributors are in the original project. Add a preferred contact or maintainer link here.
- Robust HTML escaping and salePrice usage in totals/receipts (prevents XSS & pricing bugs).
- Debounced search input, toast lifecycle with class-based transitions, one-shot cart-count animation.
- Spline viewer moved into responsive hero grid with lazy-loading placeholder and noscript fallback.
- Focus-trap helpers wired into modals/drawer for better keyboard accessibility.
- Run a full accessibility and Lighthouse audit and add badges.
- Add optimized image assets and a short GIF demonstrating the core flow.
- Create
docs/CHANGELOG.mdand a GitHub Actions workflow for CI.