Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 10, 2022 06:46 pm GMT

E-commerce store with search functionality and filters: Using MongoDB Atlas Search.

Overview of My Submission

A fully responsible e-commerce store, with filters, sorting, search functionality and autocomplete.

Live demo
README.md
LICENSE

Submission Category:

E-Commerce Creation

Link to Code

Getting Started

Install all the dependencies:

npm install# oryarn

Add the MONGODB_URI to .env file:

example:

MONGODB_URI=(Your connection string)

Run the development server:

npm run dev# oryarn dev

Open http://localhost:3000 with your browser.

Add products seeds:

To add the seeds you only need to go to http://localhost:3000/api/products/add-seeds (/api/products/add-seeds)

if the insert was successful, you will receive a response with a (success : true) and the data that was inserted.

the received response

Setup MongoDB Atlas Search:

1 - Create the "category_size" search index

make sure you name the index "category_size"

Index Name : "category_size"

Set the index using JSON Editor

{  "mappings": {    "dynamic": false    "fields": {      "category": {        "type": "string"      },      "options": {        "fields": {          "options": {            "fields"

Additional Resources / Info

Product listing index

Product listing search

Product listing Cart Slider

Product overview page

Technologies:

Other dependencies:


Original Link: https://dev.to/niidark/e-commerce-store-with-search-functionality-and-filters-using-mongodb-atlas-search-e0e

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To