MovieFlixer is a web app where you can search 🔍 for your favorite movies and shows, you can Buy 💲 those movies and also rate ⭐ them out of 10.
- Node.js v14.18.2^
- NPM v6.14.0^
git clone https://github.com/rohitdhas/Dev-Hackathon.git cd frontend npm install cd backend npm install
You'll need a
.env file in the
It looks like this -
PORT = 8080 MONGO_URI = Database connection String EMAIL = Your Email PASSWORD = Your Password
Starting the application
cd frontend npm run dev
cd backend node server.js
Implemented using Atlas Search
Autocomplete is pretty handy because it predicts whatever you want to type even if you make silly typos 😄 like here I typed kong fu pa and it guessed correct movie name.
Whenever you start typing in the input field it makes a request to an API endpoint along with the input string.
That API endpoint aggregates data based on input string using an Aggregation Pipeline with
search stage, and then sends the results in response.
And finally, those search results are being used to render autocomplete list on frontend.
Implemented using Realm Triggers & Function + nodemailer
In this web application you receive an email on rating ⭐ a movie or on successfully purchasing 💲 a movie. For both the cases the logic is almost same.
To achieve this, I am making use of Database triggers which automatically responds based on certain events.
So, When you rate a movie it inserts a document in
ratings collection. On this insert operation the trigger fires and executes a
Realm Function which is making an API call telling the server to send an email to the given mail address.
You should receive an email like this after rating a movie 👇🏻
Also, when you click on Proceed to Purchase button it inserts a document in
purchases collection, and then after your checkout session is successfully completed it updates the corresponding document in DB. Now, on this update operation the trigger fires and executes a
Realm Function which helps the app to send an email.
You should receive an email like this after buying a movie 👇🏻
Now here's the link to my project. Go ahead and explore rest of the application 🙂
And please let me know your thoughts on it below 👇🏻