Skip to content

infant-official/micro-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

#๐Ÿ“ฆ E-Commerce Product Filter System

A modern front-end web application that allows users to dynamically filter products based on categories, price range, ratings, search queries, and availability โ€” all with real-time updates.

Designed as a responsive mini-project for showcasing UI/UX skills, JavaScript filtering logic, and client-side performance.

๐Ÿš€ Project Overview

This project demonstrates how an e-commerce platform can provide instant, client-side product filtering without requiring page reloads or a backend.

Users can smoothly browse through products, apply multiple filters, and get immediate results thanks to JavaScript DOM manipulation and event-driven rendering.

โœจ Key Features ๐Ÿ” 1. Dynamic Category Filtering

Users can select product categories (Electronics, Fashion, Home, Sports, etc.) to instantly filter visible items.

๐Ÿ’ฐ 2. Price Range Slider

A smooth, real-time slider allows users to adjust the maximum price. Products update instantly based on the selected price range.

โญ 3. Rating Filter / Sorter

Products can be sorted by:

Featured

Price: Low โ†’ High

Price: High โ†’ Low

Highest Rated

๐Ÿ“ฆ 4. Availability Toggle

Enable In Stock Only to hide products that are currently unavailable.

๐Ÿ“ 5. Search Functionality

Users can search products by:

Product name

Brand name

The results update as you type.

โšก 6. Real-Time Results (No Reloads)

All filtering and sorting happens instantly using:

JavaScript arrays

Filter conditions

DOM rendering

No backend required.

๐Ÿ–ฅ๏ธ 7. Responsive Layout

Works seamlessly on:

Desktop

Tablet

Mobile

Built using Bootstrap 5 grid system.

โค๏ธ 8. Wishlist Support (Optional)

Users can mark items as favorites using the heart icon.

๐Ÿ›’ 9. Mini Floating Cart

Add items to cart and instantly view:

Item count

Subtotal

Quick remove options

๐ŸŽจ 10. Clean & Modern UI

Features include:

Soft gradients

Rounded cards

Minimalistic icons

Smooth hover effects

๐Ÿ”ง Technologies Used Technology Purpose HTML5 Structure CSS3 Styling, UI Design Bootstrap 5 Layout, components, responsiveness JavaScript (ES6) Filtering, UI updates, cart/wishlist logic Bootstrap Icons Icons for UI elements ๐Ÿง  How Filtering Works (Logic Explained)

Product data is stored as an array of objects:

{ id: 101, title: "iPhone 15 Pro Titanium", category: "Electronics", brand: "Apple", price: 134900, rating: 4.9, stock: true, sale: false }

Filters include:

Search Filter

p.title.toLowerCase().includes(query)

Category Filter

p.category === selectedCategory

Price Range

p.price <= maxPrice

Stock Availability

inStockOnly ? p.stock === true : true

Sorting

list.sort((a, b) => a.price - b.price);

Finally, filtered results are rendered back to the DOM using:

document.getElementById('productArea').innerHTML = html;

๐Ÿ› ๏ธ How to Run the Project

Download the project folder

Open index.html in any browser

No installation requiredโ€”fully client-side

To add new products: Open script.js, and push new items into productCatalog[]

๐Ÿ“ Folder Structure project-folder/ โ”œโ”€โ”€ index.html โ”œโ”€โ”€ script.js โ”œโ”€โ”€ styles.css (optional) โ”œโ”€โ”€ assets/ (images, icons) โ””โ”€โ”€ README.md

๐Ÿ“ธ Screenshots (Placeholders)

Add screenshots in your GitHub later.

Home Page

Filters Panel

Product Cards

Floating Cart

Mobile View

๐ŸŽ“ Learning Outcomes

By completing this project, you will gain experience in:

โœ” JavaScript DOM manipulation โœ” Event-driven programming โœ” Client-side product filtering logic โœ” Responsive web design โœ” UI/UX design โœ” Bootstrap 5 layout mastery โœ” Working with arrays & data structures

๐Ÿ”ฎ Future Enhancements

Backend integration (Node.js / Firebase)

User login & authentication

Database-driven product list

Pagination

Dark/Light mode sync

Add to cart persistence (LocalStorage)

API-based filters#

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages