-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update readme and move codesandbox into it's own component
- Loading branch information
1 parent
7853895
commit 18ca338
Showing
14 changed files
with
135 additions
and
85 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,110 @@ | ||
# Getting Started with Create React App | ||
## Atlas Search Workshop | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
Hello! 👋 Do you want to run an Atlas Search Workshop the easy way? Clone this repo! | ||
|
||
## Available Scripts | ||
https://www.atlassearchworkshop.com | ||
|
||
In the project directory, you can run: | ||
<br/> | ||
<div align="center"> | ||
<img src="WorkshopWebSite.png" width="650" /> | ||
</div> | ||
<br/> | ||
|
||
### `npm start` | ||
In the web application, you'll find: | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | ||
|
||
The page will reload when you make changes.\ | ||
You may also see any lint errors in the console. | ||
- a Google document with step-by-step instructions | ||
- an embedded CodeSandbox (ready to fork for workshop attendees) with the code for the MongoDB Netflix Clone found at www.atlassearchmovies.com (https://github.com/khuaulme/AtlasSearchWorkshop2022) | ||
|
||
### `npm test` | ||
<br/> | ||
<div align="center"> | ||
<img src="NetflixClone.png" width="650" /> | ||
</div> | ||
<br/> | ||
<p> By building out the MongoDB Netflix Clone application, you'll demonstrate all sorts of complex, fine-grained full-text searches on your Atlas data.</p> | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
Current features implemented in this Movie Search Engine demo application include: | ||
|
||
### `npm run build` | ||
- fuzzy matching | ||
- highlighting | ||
- autocomplete | ||
- relevance-based scoring | ||
- custom function scoring | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
Future Atlas Search features to implement can include: | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
- [ ] facets | ||
- [ ] synonyms | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
<h2 align="center"><a href="netflixclone-xwaaq.mongodbstitch.com/">www.atlassearchmovies.com</a></h2> | ||
|
||
### `npm run eject` | ||
<p>The movie search application was created using:</p> | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can't go back!** | ||
- React | ||
- MongoDB Realm for backend HTTPs endpoints and webhooks | ||
- The Atlas sample dataset of sample_mflix.movies | ||
|
||
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
<h3>API Points of Integration</h3> | ||
This application is hosted entirely on Realm and calls 2 API endpoints: | ||
|
||
* getProductsEndpoint in the Home.js page on line 24 | ||
* Suggestions_AC_Endpoint, used for autocompleted product names, in the Header.js component on line 17. | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. | ||
<p><em>Currently this app is not suitable for mobile, but feel free to send a PR.</em> 😊</p> | ||
|
||
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. | ||
<h3>Attendee Prerequisites:</h3> | ||
|
||
## Learn More | ||
- A MongoDB Atlas account. Get one for free <a href="https://www.mongodb.com/cloud/atlas">here.</a> | ||
- A recent version of Node.js and npm. | ||
- Atlas sample dataset | ||
- (Recommended) <a href="https://www.mongodb.com/try/download/compass">MongoDB Compass - GUI (optional)</a> | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
<p>This application is hosted entirely by MongoDB Atlas was created using:</p> | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
- React | ||
- MongoDB Realm for backend HTTPs endpoints and webhooks | ||
- MongoDB's Atlas sample_mflix dataset | ||
|
||
### Code Splitting | ||
<h2>Workshop Attendees Will Need to:</h2> | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) | ||
<ol> | ||
<li> Load data to Atlas cluster: | ||
<ul> | ||
<li>database: <code>sample_mflix</code></li> | ||
<li>collection: <code>movies</code></li> | ||
</ul> | ||
</li> | ||
|
||
### Analyzing the Bundle Size | ||
<li> Create Search indexes.</li> | ||
<li> Create a Realm Application.</li> | ||
<li> Create 2 HTTP Endpoints inside of Realm.</li> | ||
</ol> | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) | ||
<h2>To Build and Run this Search Workshop Application:</h2> | ||
|
||
### Making a Progressive Web App | ||
1. Clone the repo. | ||
2. Navigate inside directory. | ||
3. Run <code>npm install</code> . | ||
4. Run <code>npm start </code> . | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) | ||
|
||
### Advanced Configuration | ||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) | ||
<h2>To Customize this Workshop:</h2> | ||
The workshop is all entirely on App.js with the following React components: | ||
<div style="display:flex;"> | ||
<img src="Header.png" width="350" /> | ||
<img src="Footer.png" width="350" /> | ||
</div> | ||
|
||
### Deployment | ||
Feel free to customize for the event name and details, presenters, resources or even the git repo in the embedded code sandbox. | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) | ||
<h2>Special Thanks </h2> | ||
<br/> | ||
|
||
### `npm run build` fails to minify | ||
<div style="display: flex;"> | ||
<iframe src="https://giphy.com/embed/3ohhwkfYcpOyeuepqw" width="434" height="200" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><b>Brian Leonard</b> - In my 4+ years at MongoDB, I have never written a workshop that wasn't ripped off of Brian in some way. #BeLikeBrian<br></br> | ||
<b>Snehal Bhatia</b>- That Google doc, tho!</p> | ||
</div> | ||
<br/> | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) | ||
Also please join our online <a href="https://developer.mongodb.com/community/forums/">MongoDB Community</a> to interact with our product and engineering teams along with thousands of other MongoDB and Realm users. <br/><br/>Have fun and happy coding! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from "react"; | ||
|
||
const CodeSandbox = () => { | ||
return ( | ||
<div className="h-full w-100"> | ||
<iframe | ||
src="https://codesandbox.io/embed/github/khuaulme/AtlasSearchWorkshop2022/tree/main/?fontsize=14&hidenavigation=1&theme=dark" | ||
className="mt-10 w-11/12 mx-auto h-96" | ||
title="festive-platform-gshdc3" | ||
allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking" | ||
sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts" | ||
></iframe> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CodeSandbox; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.