Skip to content

MaBeuLux88/mongodb-stitch-movie-collection

Repository files navigation

MongoDB Stitch - Movie Collection Demo

What is this app doing?

This application provides several ways to save a movie title into your MongoDB Atlas cluster using MongoDB Stitch.

  • HTTP POST,
  • Twilio text message,
  • Using the Stitch Javascript SDK in a website hosted on Stitch.

Google configuration

Once we have our movie saved in our collection, a trigger is used to enrich our document automatically with data from the OMDB API.

Then another trigger detects the movie ratings so we calculate stats when a movie is updated or deleted.

Google configuration

Deploy the Stitch App

export STITCH_USERNAME="<your Atlas login email>"
export STITCH_API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  • [Optional] To make the website work,
  • [Optional] To be able to send movie title from your phone,
    • Setup Twilio,
    • You will need the Twilio SID and auth token.
    • Then when the app is created, you will need to forward the text messages from Twilio to the Stitch webhook provided in the IMDB_Twilio service.
  • Generate a free API key for OMDB API. They will send you an email in which you need to click the validation link.
  • Start the 1_pushToNewStitchProject.sh script and follow the instructions.
    • If you don't have something, just hit enter, you can fix it later in Stitch.
    • Secrets are not echoed in the shell so don't be surprised.
  • Add the following environment variable in your env. You can find your APPID in the Stitch website or at the end of the previous script output.
export STITCH_APPID="myproject-abcde"
  • You can now use the scripts 2 & 3 to work with your own new project now.

Trouble with Google Credentials to make the website work?

It should look like this.

Google configuration

  • The first authorized redirect URI is for Stitch Global deployments.
  • The second one is for Stitch Local deployment in Ireland.

Ideas & support

  • Please open Github tickets.
  • This is still a work in progress project so please don't judge me too much just yet :-).

About

Simple MongoDB Stitch examples for demos

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published