Cookie Consent by Free Privacy Policy Generator ๐Ÿ“Œ Movie Database - find the perfect movie

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Movie Database - find the perfect movie


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: dev.to

What I built

The app that let's you discover more information about your favorite movie.

Category Submission:

Search No More

App Link

https://movie-database-33.vercel.app/

Screenshots

hero page

filter movies

Description

Inside the app the main functionality is to quickly search for a movie that you are looking for. When typing you get autosuggestion with links to movies, or you can press enter to go to search page. On the top menu you can also go to all movies and filter or sort them as you wish. Clicking on single movie navigates you on the page with more information about it. There you will find a link to the page with all cast and crew.

To enable saving films to watchlist you need to login using your Google account. Then inside your profile you can see the watchlist.

Link to Source Code

https://github.com/eruj22/movie-database

Permissive License

MIT

Background

It was so exciting to learn about this hackathon, as I love to use MongoDB. The idea for it came rather easy, as I frequently use look up more information about movies to watch. It was a good challenge to make something similar on my own.

Inspiration for the layout came from TMDB, IMDb and Rotten Tomatoes. Color scheme was heavily inspired by socks that were a gift right before I started making the design for an app (not kidding, proof is in the image below).

red socks with many little popcorns

Technologies used

  • Next.js
  • MongoDB
  • Emotion
  • NextAuth
  • Typescript

How I built it

First phase of the app was sketching wireframes by hand and making a rough design in Figma.

Then it was time to set up database and basic search functionality. I have populated the data in the database using data from TMDB and modified it a bit for my use case. Next up I set up search indexes to search all movies and autocomplete. These were connected to the functions in App Services.

Moving on comes my favorite part, building out the frontend part of the app. The framework that helped me make data visible to users is Next.js.

First I made the hero page and a connection to the database. Next page was movies page, where you can filter through all movies. Clicking on single movie navigates you to the page with more data about the movie. Inside it is also a link to the page with all the cast and crew.

Search page is a page that you see when you submit search query. Inside it there is a search component (also on hero page) that uses the function in the MongoDB called searchMovies. This function searches through the whole database and returns what it finds.

exports = (title) => {
    let collection = context.services.get("mongodb-atlas").db("test").collection("singlemovies");

    const pipeline = [
      {
        $search: {
          index: "searchMovies",
          text: {
            query: title,
            path: {
              "wildcard": "*"
            },
            fuzzy: {}
          }
        }
      }
    ]

  return collection.aggregate(pipeline)  
};

The index field below is used inside the function on the top to form aggregation pipeline.

{
  "mappings": {
    "dynamic": true,
    "fields": {
      "title": [
        {
          "dynamic": true,
          "type": "document"
        }
      ]
    }
  }
}

Inside search component there is also autocomplete functionality that suggests movies based on what you type in. The function autocompleteMovies returns maximum 6 items and each field consists of only title and id.

exports = function(arg){
 let collection = context.services.get("mongodb-atlas").db("test").collection("singlemovies");

 let pipeline = [
    {
      $search: {
        index: "autocompleteMovies",
        "autocomplete": {
          "query": arg,
          "path": "title",
          "tokenOrder": "sequential"
        }
      }
    },
    {
      $limit: 6
    },
    {
      $project: {
        "title": 1,
        "_id": {"$toString" : "$_id"},
      }
    }
  ]

  return collection.aggregate(pipeline)
};

The function uses search index with index field set only to title and it starts suggesting when you write at least 3 letters.

{
  "mappings": {
    "dynamic": false,
    "fields": {
      "title": [
        {
          "analyzer": "lucene.standard",
          "foldDiacritics": true,
          "maxGrams": 14,
          "minGrams": 3,
          "tokenization": "edgeGram",
          "type": "autocomplete"
        }
      ]
    }
  }
}

Last but not least is the login functionality. For this job I picked NextAuth as widely used solution for authentication in a Next.js app. In the app you can only login using your Google account.

In the end I have made final visual improvements in the app and took some time to correctly deploy it.

During the development I had a lot of fun. It is very satisfying to build something new. During the process I have faced many challenges and also successfully solved many of them.

One thing to note, there are only 40 movies stored in the database.

Thank you for reading.

...



๐Ÿ“Œ Coollector Movie Database 4.20.8 - Personal movie and video collection manager.


๐Ÿ“ˆ 27.26 Punkte

๐Ÿ“Œ Perfect Acquisition Part 3: Perfect HFS Acquisition


๐Ÿ“ˆ 23.41 Punkte

๐Ÿ“Œ Inside the Art and Science of Crafting the Perfect Movie Title


๐Ÿ“ˆ 21.64 Punkte

๐Ÿ“Œ Movie Portal Script 7.37 movie.php f sql injection


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Netflix CEO: Movie Theaters Are 'Strangling the Movie Business''


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Netflix CEO: Movie Theaters Are 'Strangling the Movie Business''


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.35 /movie.php f sql injection


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.36 /movie.php f Union sql injection


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.36 /movie.php f Reflected cross site scripting


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Box Pro APK โ€“ Download Latest Movie App


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.35 /movie.php f SQL Injection


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Industry Wants Irish ISPs To Block Pirate Movie Streaming Portals


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.35 /movie.php f SQL Injection


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ How Seven Movie Studios Forced A Pirated Movie Site Offline


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.36 /movie.php f Cross Site Scripting


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Sony Tries To Upload Movie Trailer To YouTube, Posts Entire Movie Instead


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.36 /movie.php f SQL Injection


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ IMDb Launches Ad-Supported Movie Streaming Movie


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Portal Script 7.37 movie.php f SQL Injection


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ 'Super Mario Bros. Movie' Sets Record for Highest-Grossing Animated Movie Opening Ever


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Do Movie Ratings on 'Rotten Tomatoes' Really Affect a Movie's Box Office?


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Open Source Movie Streaming Project 'Movie-Web' Shut Down By Hollywood Complaint


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ It's Time for the Movie Studios to Step In To Save the Movie Theaters


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Movie Explorer 2.6.2 - Movie and TV show catalog app.


๐Ÿ“ˆ 19.87 Punkte

๐Ÿ“Œ Microsoft Fix for Windows JET Database Bug Not Perfect, Micropatch Available


๐Ÿ“ˆ 19.09 Punkte

๐Ÿ“Œ Navigating the CAP Theorem: In Search of the Perfect Database


๐Ÿ“ˆ 19.09 Punkte

๐Ÿ“Œ India's Biometric Database Is Creating A Perfect Surveillance State -- And U.S. Tech Companies Are On Board


๐Ÿ“ˆ 19.09 Punkte

๐Ÿ“Œ [webapps] Joomla! Component SP Movie Database 1.3 - SQL Injection


๐Ÿ“ˆ 17.32 Punkte

๐Ÿ“Œ Joomla SP Movie Database 1.3 SQL Injection


๐Ÿ“ˆ 17.32 Punkte

๐Ÿ“Œ Joomla SP Movie Database 1.4 SQL Injection


๐Ÿ“ˆ 17.32 Punkte

๐Ÿ“Œ Joomla SP Movie Database 1.4 SQL Injection


๐Ÿ“ˆ 17.32 Punkte

๐Ÿ“Œ Joomla SP Movie Database 1.4 SQL Injection


๐Ÿ“ˆ 17.32 Punkte

๐Ÿ“Œ #0daytoday #Joomla SP Movie Database 1.4 SQL Injection Vulnerability [webapps #exploits #Vulnerability #0day #Exploit]


๐Ÿ“ˆ 17.32 Punkte

๐Ÿ“Œ EMDB - Eric's Movie Database 3.52 Deutsch


๐Ÿ“ˆ 17.32 Punkte











matomo