A fully functional e-commerce website built with vanilla JavaScript, featuring shopping cart, checkout process, and order management.
- 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
- 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
-
Clone the repository
git clone https://github.com/REVANTH-90/javascript-amazon-project-main.git cd javascript-amazon-project-main -
Start a local server
- Using VS Code: Right-click
amazon.html→ "Open with Live Server" - Or visit:
http://localhost:5500
- Using VS Code: Right-click
-
Explore the app
amazon.html- Main shopping pagecheckout.html- Cart and checkoutorders.html- Order historytest-jasmine/tests.html- Run tests
├── 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
// Persistent cart with localStorage
export function addtocart(productId) {
// Add item and save to storage
}// Load products from API
loadProducts(() => {
renderProductsGrid();
});// Place order with fetch API
const response = await fetch('/orders', {
method: 'POST',
body: JSON.stringify({ cart })
});Run tests by opening test-jasmine/tests.html in your browser.
Tests cover:
- Cart operations
- Money formatting
- Order processing
Optimized for desktop, tablet, and mobile devices with CSS Grid and Flexbox.
- ✅ 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
Educational project - free to use and modify for learning purposes.
🚀 A complete e-commerce experience built with vanilla JavaScript!