A simple e-commerce search interface powered by Typesense with faceted filtering and 2500+ sample products.
docker-compose up -d# Generate 2500+ products
node generate_products.js
# Import them into Typesense
curl -X POST 'http://localhost:8108/collections/products_v2/documents/import?action=create' \
-H 'X-TYPESENSE-API-KEY: xyz' \
-H 'Content-Type: text/plain' \
--data-binary @bulk_products.jsonlopen search.html
# or just double-click search.html- Real-time search as you type
- Faceted filtering by category, brand, color, etc.
- Multiple filter selection with checkboxes
- Sort options by price, rating, reviews
- Active filter tags you can remove individually
- 2500+ products across 6 categories
- Electronics: Smartphones, Laptops, Tablets, etc.
- Clothing & Shoes: Running shoes, casual wear, etc.
- Home & Garden: Kitchen appliances, furniture, etc.
- Books: Fiction, non-fiction, educational, etc.
- Sports & Outdoors: Fitness, camping, cycling, etc.
- Beauty & Health: Skincare, makeup, supplements, etc.
apple- Find Apple productsrunning shoes- Athletic footwearlaptop- Computer productsnike- Nike brand itemsdiscount- Products on sale
- Typesense runs in Docker (port 8108)
- Products are stored in
products_v2collection - Search interface queries Typesense API directly
- Facets show real-time filter counts
- Filters combine with AND logic between categories, OR within categories
docker-compose.yml- Typesense container setupgenerate_products.js- Creates sample product datasearch.html- Search interfacebulk_products.jsonl- Generated product data (2500+ items)
- Health check:
http://localhost:8108/health - Collections:
http://localhost:8108/collections - Search:
http://localhost:8108/collections/products_v2/documents/search
That's it! You now have a fully functional e-commerce search with thousands of products.