IMDb-MongoDb
Tags: atlashackathon, javascript, node, mongodb
Published: 2022-01-12 08:38:36

[IMDb-MongoDb](http://imdb-mongodb.dec96de7-e7f9-4b06-9f21-2e0f053e0bfd.k8s.civo.com/)
### Overview of My Submission
This project is created for participating in MongoDB Atlas Hackathon on DEV in category "Choose Your Own Adventure" and to learn more about the modern database platform of MongoDB Atlas.

This is a simple Node.js Express web app in which you can search for movies based on various criteria and see the stats & details of the movies e.g. duration, language, ratings, Cast & Crew etc.
I have not learnt Node.js Express or pug before. I created a new project in Visual Studio, experimented with the base code created by VS and modified the code as required based on my requirements by googling for solutions.

- This is a Node.js Express web app with only 2 routes: [index](https://github.com/AdhirKirtikar/IMDb-MongoDb/blob/master/routes/index.js) & [search](https://github.com/AdhirKirtikar/IMDb-MongoDb/blob/master/routes/search.js).
- The source code is in this repo [IMDb-MongoDb](https://github.com/AdhirKirtikar/IMDb-MongoDb).
- The code uses Node.js native drivers for MongoDB and connects to a MongoDB database deployment which is Multi Region Replica Set of 12 nodes.
- The database consists of data from IMDb sourced from a [Kaggle dataset](https://www.kaggle.com/trentpark/imdb-data).
- The app is packaged in a [Docker container](https://hub.docker.com/repository/docker/adhirkirtikar/imdb-mongodb) _automagically_ using [GitHub actions](https://github.com/AdhirKirtikar/IMDb-MongoDb/actions). 
- The docker container is deployed to 3-node Kubernetes cluster hosted on [Civo](https://www.civo.com) using Helm charts with ArgoCD which was installed very easily and quickly in the Civo cluster.
- The app endpoint is published via Traefik Ingress (again auto install in Civo cluster) and is embedded in the home page hosted on [.xyz](https://gen.xyz) domain. (Note: There were issues with embedding the application link with the Weebly homepage editor, so the direct link for the application is as below. The [xyz link](http://www.adhirkirtikar.xyz/imdb-mongodb.html) gives "Bad Gateway" error some times.)
- The webpage link for the application is [IMDb-MongoDb](http://imdb-mongodb.dec96de7-e7f9-4b06-9f21-2e0f053e0bfd.k8s.civo.com/).


### Submission Category: Choose Your Own Adventure
- I only wanted to learn MongoDB and participate in this challenge. The idea that I had for movies search app does not fit in to the other categories.

### Link to Code
{% github AdhirKirtikar/IMDb-MongoDb %}


### Additional Resources / Info
[Video Demo: MongoDB Atlas Hackathon on DEV - iMovieDB](https://youtu.be/a_0XzXzTTjI)

![Kubernetes Dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/60tuv0jezdp4ej4qmj9m.png)
![Civo Kubernetes Cluster](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/whm99mi6u9rr5h6mqob1.png)
![GitHub Actions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f1b367adp6n86xkxkrf4.png)
![ArgoCD](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljqdlwr8utf966r6e5e7.png)
![MongoDB Atlas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udap9rjs3sjshq0x51kp.png)
![MongoDB Collections](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5dajb0k84300ho1gri6.png)
![Movie Search App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vaf64ht1tks65t3rooxl.png)