GithubHelp home page GithubHelp logo

benms / whatscooking Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mongodb-developer/whatscooking

0.0 0.0 0.0 39.11 MB

Restaurant Finder application for NYC demonstrating Atlas Search Features. Uses React and Tailwind.

License: Apache License 2.0

JavaScript 98.33% CSS 0.51% HTML 1.16%

whatscooking's Introduction

What's Cooking with Atlas Search

A Restaurant Finder Application Demo MongoDB Atlas Search

Hello! ๐Ÿ‘‹ This application allows you to search lightning fast through over 25,000 restaurants in the New York city area based on a variety of search parameters and data types:

  • restaurant name
  • geolocation coordinates
  • cuisine type
  • average star rating
  • borough


Note: This dataset is mocked. Please do not use to make actual dining decisions.

What's Cooking implements many Atlas Search features from autocomplete to custom function scoring. Using the $search operator in a MongoDB aggregation pipeline, we can build fine-grained searches across text, numerics, and geospatial data. By building out What's Cooking, you'll learn all sorts of ways MongoDB allows you to build complex, fine-grained full-text searches on your Atlas data.

No additional servers or software needed. No need to keep data in sync. Everything is done in MongoDB Atlas.

  • fuzzy matching
  • highlighting
  • autocomplete
  • range queries
  • geoqueries
  • facets
  • relevance-based scoring
  • custom function scoring
  • synonyms

Check out the video of the MongoDB .Live keynote to see a demonstration of all the features or visit the link below to play around with the finished application, hosted entirely in MongoDB Atlas:

This application is hosted entirely by MongoDB Atlas was created using:

  • React
  • Tailwind CSS
  • MongoDB Realm for backend HTTPs endpoints and webhooks
  • A modified sample dataset based on MongoDB's Atlas sample_restaurants dataset

Currently this app is not suitable for mobile, but feel free to send a PR. ๐Ÿ˜Š

Prerequisites

  • A MongoDB Atlas account. Get one for free here.
  • A recent version of Node.js and npm.
  • Restaurant sample dataset.
  • Synonyms dataset.
  • (Recommended) MongoDB Compass - GUI

You can read and download the dataset using the MongoDB Shell, any MongoDB driver, or my favorite MongoDB Compass using the following URI:

  
mongodb+srv://mongodb:[email protected]/whatscooking

It is also included in this repo's Supplemental Files branch as

whatscooking.json


To Run This Application....

  1. Clone the repo.
  2. Navigate inside WhatsCooking directory.
  3. Run npm install .
  4. Run npm start .

To Build This Application...

Prepare Data

  1. Load data to Atlas cluster:
    • database: whatscooking
    • collection: restaurants
  2. Create Search indexes. (Index definitions includes in `supplement-files` .)

React Components....

Using Realm as Your Serverless Backend....

What's Cooking uses HTTP services in Realm to create 5 APIs to allow you to query for your restaurant data over HTTP:

  • GetRestaurantsEndPoint called from the useHomeFetch.js hook.
  • GetFacetsEndpoint called from the useHomeFetch.js hook.
  • Suggestions_AC_Endpoint called from the SearchBar.js component.
  • getSynonyms called in the SynonymsPage.js.





Find the Realm application and code for these webhooks in the WhatsCookingRealm folder.

If you have any questions or feedback about this repo, feel free to create an Issue or PR in this repo or reach out to me on Twitter @YouOldMaid.

Also please join our online MongoDB Community to interact with our product and engineering teams along with thousands of other MongoDB and Realm users.

Have fun and happy coding!

whatscooking's People

Contributors

khuaulme avatar sebawita avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.