{"id":18398810,"url":"https://github.com/mongodb-developer/whatscooking","last_synced_at":"2025-04-07T05:33:45.376Z","repository":{"id":41195999,"uuid":"383952598","full_name":"mongodb-developer/WhatsCooking","owner":"mongodb-developer","description":"Restaurant Finder application for NYC demonstrating Atlas Search Features. Uses React and Tailwind.","archived":true,"fork":false,"pushed_at":"2024-09-18T12:05:56.000Z","size":38599,"stargazers_count":74,"open_issues_count":9,"forks_count":40,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-02T01:14:02.491Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb-developer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-07T23:58:55.000Z","updated_at":"2025-01-11T08:13:36.000Z","dependencies_parsed_at":"2022-08-25T15:11:09.346Z","dependency_job_id":null,"html_url":"https://github.com/mongodb-developer/WhatsCooking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2FWhatsCooking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2FWhatsCooking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2FWhatsCooking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb-developer%2FWhatsCooking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb-developer","download_url":"https://codeload.github.com/mongodb-developer/WhatsCooking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601378,"owners_count":20964861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:24:31.619Z","updated_at":"2025-04-07T05:33:40.360Z","avatar_url":"https://github.com/mongodb-developer.png","language":"JavaScript","readme":"# Notice: Repository Deprecation\nThis repository is deprecated and no longer actively maintained. It contains outdated code examples or practices that do not align with current MongoDB best practices. While the repository remains accessible for reference purposes, we strongly discourage its use in production environments.\nUsers should be aware that this repository will not receive any further updates, bug fixes, or security patches. This code may expose you to security vulnerabilities, compatibility issues with current MongoDB versions, and potential performance problems. Any implementation based on this repository is at the user's own risk.\nFor up-to-date resources, please refer to the [MongoDB Developer Center](https://mongodb.com/developer).\n\n\n\u003ch1 align=\"center\"\u003eWhat's Cooking with Atlas Search\u003c/h1\u003e\n\n\u003ch2 align=\"center\"\u003eA Restaurant Finder Application Demo MongoDB Atlas Search\u003c/h2\u003e\n\u003cp\u003eHello! 👋 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:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003erestaurant name\u003c/li\u003e\n\u003cli\u003egeolocation coordinates\u003c/li\u003e\n\u003cli\u003ecuisine type\u003c/li\u003e\n\u003cli\u003eaverage star rating\u003c/li\u003e\n\u003cli\u003eborough\u003c/li\u003e\n\u003c/ul\u003e\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"restaurantDemo.gif\" width=\"450\"  /\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\u003cp\u003e\u003cem\u003eNote: This dataset is mocked. Please do not use to make actual dining decisions.\u003c/em\u003e\u003c/p\u003e\n\n\u003cp\u003e 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.\u003c/p\u003e\n\n**No additional servers or software needed. No need to keep data in sync. Everything is done in MongoDB Atlas.**\n\n- fuzzy matching\n- highlighting\n- autocomplete\n- range queries\n- geoqueries\n- facets\n- relevance-based scoring\n- custom function scoring\n- synonyms\n\n\u003cp\u003eCheck 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:\u003c/p\u003e\n\u003ch2 align=\"center\"\u003e\u003ca href=\"https://www.atlassearchrestaurants.com\"\u003ewww.atlassearchrestaurants.com\u003c/a\u003e\u003c/h2\u003e\n\n\u003cp\u003eThis application is hosted entirely by MongoDB Atlas was created using:\u003c/p\u003e\n\n- React\n- Tailwind CSS\n- MongoDB Realm for backend HTTPs endpoints and webhooks\n- A modified sample dataset based on MongoDB's Atlas sample_restaurants dataset\n\n\u003cp float=\"left\"\u003e\n    \u003cimg src=\"WhatsCookingArchitecture.png\" width=\"750\"  /\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\u003cem\u003eCurrently this app is not suitable for mobile, but feel free to send a PR.\u003c/em\u003e 😊\u003c/p\u003e\n\n\u003ch3\u003ePrerequisites\u003c/h3\u003e\n\n- A MongoDB Atlas account. Get one for free \u003ca href=\"https://www.mongodb.com/cloud/atlas\"\u003ehere.\u003c/a\u003e\n- A recent version of Node.js and npm.\n- Restaurant sample dataset.\n- Synonyms dataset.\n- (Recommended) \u003ca href=\"https://www.mongodb.com/try/download/compass\"\u003eMongoDB Compass - GUI\u003c/a\u003e\n\n\u003cp\u003eYou can read and download the dataset using the MongoDB Shell, any MongoDB driver, or my favorite MongoDB Compass using the following URI:\u003c/p\u003e\n\n\u003cpre\u003e\n  \u003ccode\u003e\nmongodb+srv://mongodb:atlassearch@shareddemoapps.dezdl.mongodb.net/whatscooking\n\u003c/code\u003e\n\u003c/pre\u003e\n\n\u003cp\u003eIt is also included in this repo's Supplemental Files branch as \u003cpre\u003ewhatscooking.json\u003c/pre\u003e\u003c/p\u003e\n\n---\n\n\u003ch2\u003eTo Run This Application....\u003c/h2\u003e\n\n1. Clone the repo.\n2. Navigate inside `WhatsCooking` directory.\n3. Run \u003ccode\u003enpm install\u003c/code\u003e .\n4. Run \u003ccode\u003enpm start \u003c/code\u003e .\n\n---\n\n\u003ch2\u003eTo Build This Application...\u003c/h2\u003e\n\n\u003ch2\u003ePrepare Data\u003c/h2\u003e\n\n\u003col\u003e\n\u003cli\u003e Load data to Atlas cluster:\n\u003cul\u003e\n\u003cli\u003edatabase: \u003ccode\u003ewhatscooking\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003ecollection: \u003ccode\u003erestaurants\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\n\u003cli\u003e Create Search indexes. (Index definitions includes in `supplement-files` .)\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003ch2\u003eReact Components....\u003c/h2\u003e\n\u003cp float=\"left\"\u003e\n    \u003cimg src=\"Main.png\" width=\"550\"  /\u003e\n\u003c/p\u003e\n\n\u003ch2\u003eUsing Realm as Your Serverless Backend....\u003c/h2\u003e\n\u003cp\u003eWhat's Cooking uses HTTP services in Realm to create 5 APIs to allow you to query for your restaurant data over HTTP: \u003c/p\u003e\n\n- `GetRestaurantsEndPoint` called from the `useHomeFetch.js` hook.\n- `GetFacetsEndpoint` called from the `useHomeFetch.js` hook.\n- `Suggestions_AC_Endpoint` called from the `SearchBar.js` component.\n- `getSynonyms` called in the `SynonymsPage.js`.\n\u003cp float=\"left\"\u003e\n    \u003cimg src=\"RestaurantsFunction.png\" width=\"550\"  /\u003e\n\u003c/p\u003e\n\u003chr\u003e\n\u003cp float=\"left\"\u003e\n    \u003cimg src=\"FacetFunction.png\" width=\"550\"  /\u003e\n\u003c/p\u003e\n\u003chr\u003e\n\u003cp float=\"left\"\u003e\n    \u003cimg src=\"ACFunction.png\" width=\"550\"  /\u003e\n\u003c/p\u003e\n\u003chr\u003e\n\u003cp float=\"left\"\u003e\n    \u003cimg src=\"SynonymsFunction.png\" width=\"550\"  /\u003e\n\u003c/p\u003e\n\u003chr\u003e\nFind the Realm application and code for these webhooks in the \u003ccode\u003eWhatsCookingRealm\u003c/code\u003e folder.\u003c/p\u003e\n\n\u003ch5\u003eIf 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.\u003c/h5\u003e\n\n\u003ch4\u003eAlso please join our online \u003ca href=\"https://developer.mongodb.com/community/forums/\"\u003eMongoDB Community\u003c/a\u003e to interact with our product and engineering teams along with thousands of other MongoDB and Realm users. \u003cbr/\u003e\u003cbr/\u003eHave fun and happy coding!\u003c/h4\u003e\u003c/h4\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Fwhatscooking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb-developer%2Fwhatscooking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb-developer%2Fwhatscooking/lists"}