A modern, high-performance, responsive e-commerce web application built with React 19, TypeScript, Vite, and Lucide Icons, crafted according to the popular Figma community design system.
- Node 26 LTS & React 19: Powered by Node.js 26 LTS (
26.13.0) and React 19.3 (19.3.1). - Complete TypeScript Migration: Full end-to-end type safety across domain models (
Product,CartItem,Rating), hooks, contexts, and API services. - Modular Architecture: Feature-based directory structure separating UI components, features, domain contexts, custom hooks, and data services.
- Original Color Palette Preserved: Design tokens defined with CSS variables honoring the original red accent (
#DB4444), dark neutrals (#000000,#111111), and subtle light neutrals. - Interactive UI Capabilities:
- Dynamic Hero Carousel with manual controls, auto-play, and dot indicators.
- Live Countdown Flash Sales Timer.
- Interactive Shopping Cart & Wishlist counters with badge updates.
- Instant Toast feedback system (replacing browser alerts).
- Product Quick View Modal with full product details, ratings, and price calculations.
- Search bar with live autocomplete filtering and thumbnail preview.
- Multi-language support (English & Spanish) with persistent user preference.
The application strictly preserves the initial brand color palette:
| Token | Hex / Value | Role |
|---|---|---|
--color-primary |
#DB4444 |
Primary brand accent, discount badges, active indicators |
--color-primary-hover |
#DB3333 |
Button hover and active states |
--color-dark |
#000000 |
Header text, footer background, primary buttons |
--color-dark-secondary |
#111111 |
Secondary dark backgrounds |
--color-star |
#FFAD33 |
Customer review star ratings |
--color-success |
rgb(67, 149, 65) |
"NEW" product badges, in-stock indicators |
--color-bg-card |
#F5F5F5 |
Product card image backgrounds |
--color-border |
#E5E5E5 |
Structural dividers and container borders |
All tokens are defined in src/styles/variables.css.
ecommerce-react/
├── .nvmrc # Node LTS version specification (26.13.0)
├── index.html # HTML entry point (pointing to main.tsx)
├── tsconfig.json # TypeScript configuration with path aliases (@/*)
├── tsconfig.node.json # Vite TypeScript configuration
├── vite.config.ts # Vite configuration (SWC + SVGR)
├── public/ # Static media and preview assets
└── src/
├── assets/ # SVGs and UI iconography
├── components/
│ ├── common/ # Reusable UI primitives
│ │ ├── Carousel/ # Hero carousel with autoplay & controls
│ │ ├── FlashTimer/ # Countdown timer component
│ │ ├── SlideButton/ # Section slide navigation controls
│ │ ├── StarRating/ # Dynamic star rating component
│ │ └── Toast/ # Toast container & message pills
│ └── layout/ # Structural application layouts
│ ├── Header/ # Sticky navigation header with search & badges
│ ├── TopBanner/ # Announcement bar & language switcher
│ ├── SidebarNav/ # Vertical category navigation
│ ├── SectionWrapper/ # Uniform section layout with red accent pill
│ └── Footer/ # Responsive multi-column footer
├── context/ # Global React context providers
│ ├── CartContext.tsx # Shopping cart state & localStorage persistence
│ ├── WishlistContext.tsx # Wishlist state & toggle logic
│ ├── ToastContext.tsx # Toast notification queue
│ └── ProductSectionContext.tsx # Pagination state per section
├── features/ # Domain-driven feature slices
│ ├── products/ # ProductCard, ProductsGrid, CategoryCards, NewArrivals, QuickView
│ ├── search/ # SearchBar with debounced dropdown
│ └── services/ # Store service badges (Free delivery, 24/7 service)
├── hooks/ # Reusable custom hooks
│ ├── useTimer.ts # Resilient countdown hook
│ ├── useToast.ts # Toast trigger hook
│ ├── useCart.ts # Shopping cart hook
│ ├── useWishlist.ts # Wishlist hook
│ └── useDebounce.ts # Search debouncing hook
├── i18n/ # Localization configuration (EN & ES)
├── services/ # API clients & dataset providers
│ ├── api.ts # Fetcher with fallback caching
│ └── datasetSources.ts # Catalog of dataset sources
├── styles/ # Global styles and CSS variable design tokens
├── types/ # Centralized TypeScript definitions
└── utils/ # Pure utility helpers (storage, formatters, pagination)
- Node.js:
26.13.0(or Node 26 LTS) - NPM:
12.xor compatible
Using nvm:
nvm use 26.13.0
# or automatically read .nvmrc:
nvm use# Clone the repository
git clone https://github.com/AgusT613/ecommerce-react.git
cd ecommerce-react
# Install dependencies
npm installnpm run devOpen http://localhost:3000 in your browser.
# Typecheck and bundle
npm run build
# Preview production build locally
npm run previewnpm run lintThis project includes a ready-to-use dataset abstraction in src/services/api.ts and src/services/datasetSources.ts. Here are recommended dataset approaches:
-
DummyJSON Products API (
https://dummyjson.com/products):- Why: 194+ items with multiple gallery images per product, accurate discount percentages, ratings, brands, stock counts, and customer reviews.
- Best for: Rich product detail pages, gallery carousels, and realistic inventory filtering.
-
FakeStoreAPI (
https://fakestoreapi.com/products):- Why: Lightweight REST API with clean categories and ratings. Currently utilized with localized caching.
- Best for: Fast prototyping and minimal network payloads.
-
Platzi Fake Store API (
https://api.escuelajs.co/api/v1/products):- Why: Full CRUD support, authentication endpoints, and category hierarchies.
- Best for: Implementing simulated customer login, checkout flows, and admin management.
-
Kaggle Real-World Catalogs (Amazon, Flipkart, Olist datasets):
- Why: Exportable CSV/JSON containing thousands of real-world products.
- Best for: Advanced search, filtering by price/rating ranges, and mock recommendation algorithms.
-
Procedural Mocking via
@faker-js/faker:- Why: Generates deterministic, fully localized mock inventories on demand with custom prices and tags.
- Best for: E2E automated testing and offline development.
- Interactive Cart Drawer / Slide-Over:
- View items in cart with quantity modifiers (
+/-), subtotal calculations, shipping fee estimator, and simulated checkout flow.
- View items in cart with quantity modifiers (
- Dedicated Wishlist View:
- Page or modal displaying all wishlisted items with a single-click "Move All To Cart" action.
- Product Detail Route & Image Gallery:
- Client-side routing (
react-router) with thumbnail selectors, color/size picking, and customer review submission.
- Client-side routing (
- Faceted Filtering & Sorting:
- Filter products by price slider, minimum rating, and sort by "Price: Low to High", "Newest", or "Most Popular".
- Dark Mode Toggle:
- Semantic CSS variable inversion preserving the signature red accent while adapting background and surfaces to sleek dark shades.
- Simulated Checkout & Order Summary:
- Multi-step form for billing address, payment method selection, and order confirmation with order tracking number generation.
MIT © AgusT613
