Skip to content

REVANTH-90/javascript-amazon-project-main

Repository files navigation

🛒 JavaScript Amazon Clone

A fully functional e-commerce website built with vanilla JavaScript, featuring shopping cart, checkout process, and order management.

✨ Features

  • Product Catalog: Browse and search products with ratings and prices
  • Shopping Cart: Add/remove items with quantity management
  • Checkout Process: Multiple delivery options and payment processing
  • Order Tracking: View order history and track deliveries
  • Responsive Design: Works on all devices
  • Testing Suite: Jasmine framework for unit tests

�️ Technologies

  • Frontend: HTML5, CSS3, Vanilla JavaScript (ES6+)
  • Storage: LocalStorage for cart persistence
  • API: Fetch API for backend communication
  • Testing: Jasmine Framework
  • Styling: Flexbox, CSS Grid, Responsive Design

🚀 Quick Start

  1. Clone the repository

    git clone https://github.com/REVANTH-90/javascript-amazon-project-main.git
    cd javascript-amazon-project-main
  2. Start a local server

    • Using VS Code: Right-click amazon.html → "Open with Live Server"
    • Or visit: http://localhost:5500
  3. Explore the app

    • amazon.html - Main shopping page
    • checkout.html - Cart and checkout
    • orders.html - Order history
    • test-jasmine/tests.html - Run tests

📁 Project Structure

├── amazon.html          # Main shopping page
├── checkout.html        # Cart and checkout
├── orders.html          # Order history
├── data/                # Data models (cart, products, orders)
├── scripts/             # JavaScript modules
├── styles/              # CSS files
├── images/              # Product images
└── test-jasmine/        # Testing suite

🎯 Key Features Implemented

Cart Management

// Persistent cart with localStorage
export function addtocart(productId) {
    // Add item and save to storage
}

Asynchronous Product Loading

// Load products from API
loadProducts(() => {
    renderProductsGrid();
});

Modern Checkout Process

// Place order with fetch API
const response = await fetch('/orders', {
    method: 'POST',
    body: JSON.stringify({ cart })
});

🧪 Testing

Run tests by opening test-jasmine/tests.html in your browser.

Tests cover:

  • Cart operations
  • Money formatting
  • Order processing

📱 Responsive Design

Optimized for desktop, tablet, and mobile devices with CSS Grid and Flexbox.

� Learning Objectives

  • ✅ Vanilla JavaScript & ES6+
  • ✅ DOM manipulation & event handling
  • ✅ Asynchronous programming (Promises, async/await)
  • ✅ Object-oriented programming (Classes, Inheritance)
  • ✅ Local storage & state management
  • ✅ API integration & error handling
  • ✅ Testing with Jasmine
  • ✅ Responsive web design

📄 License

Educational project - free to use and modify for learning purposes.


🚀 A complete e-commerce experience built with vanilla JavaScript!

About

JavaScript-based Amazon Clone implementing e-commerce features like product listing, cart management, checkout, and order tracking using HTML, CSS, and backend integration

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors