DEV Community

Cover image for I AM MAKING A MOVIE APP.
Mince
Mince

Posted on

I AM MAKING A MOVIE APP.

After a few years of tutorial hell and "Maybe I can't do that" moments I finally started building a web app that I was determined to finish - 'Cut'

The idea

The idea is pretty simple. You get recommended movies with the title, the poster, the synopsis, the trailer, the genres and the rating. Like this:

CUT

You click arrow right if you like it and arrow left if you don't like it. You click arrow down if you're uninterested and just want to move on. You can hit 'w' if you want to save it to the watchlist (I will add a button soon). This is just a simple movie discovery app that I wanted to make, and I felt would tons of time mindlessly searching for movies as you have a personalized movie discovery app tailored for you. Well, you might have some questions, and I do have answers for them

_But the Ott platforms already do that right? _
Yeah, they do but they tend to only show you more recent movies and there's also a feature in my app to recommend movies based on your mood right now. And also, your Ott might get used by your friends, your family etc. and that doesn't allow for personalized selection and also the Otts only recommend movies from their catalog. So, I find my app pretty unique

But let's address the elephant in the room, I am just an amateur developer who can't even call an Api properly, so I had some learning to do. But I was determined to finish this project. So, this is devlog - 1 of building "CUT".

Note: I am going to build a rough working version without any accounts, databases and try to keep it simple because all of this is a learning process, but I still had to face some problems like building an algorithm

STAGE 1: PLANNING

Of course, I had to use an API to fetch such a huge number of movies, and I went with TMDb because it provides a generous 40 requests per minute which are more than enough for this prototype of an app.

These are the features I wanted to ship in the first prototype:

  • An infinite scrolling feed with an effective algorithm
  • A watchlist with all the providers listed
  • A mood system to pick a mood and get similar movies only for a certain time

These are the features I am hoping to complete though I also have other ideas I want to implement later.

STAGE 2: THE ALGORITHM

See, the algorithm is based on a simple idea, and I honestly thought wouldn't work very well. But to my surprise it genuinely giving picks I liked. See we have a ton of genres with values at the first

Action: 100
Adventure: 100
Romance: 100
Animation: 100
Enter fullscreen mode Exit fullscreen mode

So, if you dislike or like a movie the values are increased and decreased. And we run rng and pick a random genre based on the weights so if you like a bunch of action movies, the weight of action genre increases, and you get more action movie but getting other genres is possible so you can discover all sorts of movies. Also, all the movies recommended are made sure to be popular, and have a minimum 7 rating. Also, we also often recommend local Korean, Japanese, Hindi etc... language movies. This simple algorithm worked really well (at least for me)

CUT

The reason this worked well is because there are a lot of genres in TMDb. There are 23 genres and such a huge catalog allows for a tailored algorithm.

STAGE 3: DATA

So, we have to store quite a bit of data for the app to work. The first and obvious thing is storing the algorithm values of a user. Also, all the shown movies because we shouldnt show the same movie again and again. We would also have to store the watchlist and such. I decided to use local storage. Okay... Okay... Let me explain myself

For those who dont know Local storage lets you store data directly in the browser so you don't lose your data until the user voluntarily clears it. Using local storage, we don't even need the users to sign up. But it's not on a server so we can't cross share the data between users or devices

Toy story

For a prototype, there's no need to have accounts or have multi-device support because let's be real, I don't think we are getting even 10 users, but hey you could use it once it releases. I also don't have the budget to make or rent servers or the time to learn SQL. I also didn't want to make it on firebase because that would increase the friction of making the app and I wanted to do all that if the app gets real users later on. And simply though, local storage gets the job done.

CONCLUSION

So, I talked about how I completed making the algorithm, the resources I am using and how I am storing data. In the next devlog i am going talk about how i made the watchlist. I am also going to talk about the UI.

Watchlist

Feel free to leave any suggestions, comments and critiques. Stay tuned and follow for the next devlog thats coming soon... (If this even does well)

Top comments (0)