Project Architecture
This tutorial walks you through building a complete e-commerce web store inspired by Mercado Libre, using HTML, CSS, and TypeScript. You’ll learn professional development practices including BEM methodology, responsive design, and modern JavaScript patterns.What You’ll Build
A fully functional product catalog with:- Responsive header with search and navigation
- Hero banner with call-to-action
- Dynamic product grid loaded from an API
- Shopping cart with real-time updates
- Professional footer with multiple sections
Project Structure
Technology Stack
HTML5
Semantic markup with modern elements like
<header>, <nav>, <main>, <article>, and <footer>CSS3
Custom properties (variables), Flexbox, Grid, animations, and BEM methodology
TypeScript
Type-safe JavaScript with interfaces, enums, generics, and async/await
Key Concepts Covered
BEM Methodology
The entire project uses BEM (Block Element Modifier) naming convention:BEM makes your CSS predictable and maintainable. You’ll never have naming conflicts or specificity wars.
Component-Based Structure
Each major section is a self-contained component:- Header (
.header) - Navigation and branding - Hero (
.hero) - Marketing banner - Benefits (
.benefits) - Feature highlights - Products (
.products) - Product catalog - Product Card (
.product-card) - Reusable product display - Footer (
.footer) - Site information
State Management
The application uses a centralized state object:Design System
The project implements a complete design system with CSS variables:API Integration
The project fetches real product data from the Platzi Fake Store API:Responsive Design Strategy
Mobile-First Approach: The base styles work on mobile, then we enhance for larger screens. CSS Grid Auto-Responsive:Data Flow
Understand how data flows through the application:File Organization
index.html
- Semantic HTML structure
- Accessibility attributes (ARIA labels)
- SEO meta tags
- Organized into logical sections
style.css
- CSS reset for consistency
- CSS variables for design tokens
- Components organized by BEM blocks
- Comprehensive comments explaining every concept
main.ts
- TypeScript interfaces for type safety
- Enums for state management
- Helper functions for common tasks
- Event delegation for performance
- Async/await for API calls
Learning Path
Follow these pages in order to build the complete project:- Header Component - Navigation, search, and sticky positioning
- Hero Section - Gradients, centering, and call-to-action buttons
- Product Catalog - Grid layouts and responsive design
- Shopping Cart - Map data structure and state management
- Footer Component - Multi-column layouts
- API Integration - Fetch, async/await, error handling
- State Management - Centralized state and UI updates
Best Practices Demonstrated
Semantic HTML - Using the right elements for better SEO and accessibility
BEM Naming - Consistent, collision-free CSS class names
CSS Variables - Maintainable design system
TypeScript - Type safety prevents runtime errors
Event Delegation - Efficient event handling for dynamic content
Error Handling - Try/catch blocks for robust applications
Loading States - Better UX with loading and error feedback
Next Steps
Ready to start building? Head to the Header Component page to create your first component!Header Component
Build the navigation bar with logo, search, and cart
Product Catalog
Create a responsive product grid with CSS Grid