Building an E-Commerce platform has never been easier with MongoDB's Atlas Search. You can create custom indexes on your products, get lightning fast results on searches within your database, and use a wide range of popular features, like autocomplete.
Streetz Footwear is a responsive e-commerce website built with Next.js, React.js, Mongoose, and MongoDB Atlas Search.
Visit the web-app: Streetz Footwear
Investigate MongoDB's Atlas Search with autocomplete in this stunning E-Commerce Creation.
E-Commerce Store integrating Atlas Search using MongoDB and NextJS
MongoDB is a general purpose, document-based, distributed database built for modern application developers and for the cloud era. This example will show you how to connect to and use MongoDB as your backend for your Next.js app.
If you want to learn more about MongoDB, visit the following pages:
Three Indexes were set up (the maximum for a free cluster) for different purposes for this app.
The first index searches our database for a single element of a collection: type.
The type being passed as a parameter is either 'mens', or 'womens', and the database is searched accordingly.
The second index searches our database for a single element of a collection: collectionName.
The collection being passed as a parameter is either 'sport', 'luxury', or 'collectors', and the database is searched accordingly.
The third index setup for this app is the most powerful and one I would like to show off for purposes of the hackathon. This index is setup using MongoDB's Atlas Search's AutoComplete. Autocomplete allows us to take a complete index of our database, and search through a specific field for products that match the spelling of a word. We can even apply a fuzzy filter, so when users misspell our product names, MongoDB still knows what they mean. The index is as follows:
The name of this index is autocomplete, and the path we are looking through is the description of the products. We could look through names/titles if we had simpler products like groceries, but with shoe descriptions, Atlas Search uses score based returns to order the products from the query based on their score. Using a simple dropdown, I have placed the products underneath the search bar in a scrollable menu.