{"id":21285621,"url":"https://github.com/justinhartman/imdb-app","last_synced_at":"2025-07-11T11:32:26.463Z","repository":{"id":240527589,"uuid":"802819104","full_name":"justinhartman/imdb-app","owner":"justinhartman","description":"This project is a web application that provides a user-friendly interface for searching and  browsing movies and TV shows, along with a feature to watch the videos directly in the app.","archived":false,"fork":false,"pushed_at":"2024-12-03T12:41:49.000Z","size":1747,"stargazers_count":1,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T03:12:21.096Z","etag":null,"topics":["axios","express","expressjs","imdb","imdb-api","mongodb","mongodb-express","mongodb-express-nodejs","nodejs","omdb","vidsrc"],"latest_commit_sha":null,"homepage":"https://binger.uk","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinhartman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-19T11:04:35.000Z","updated_at":"2024-08-11T12:21:09.000Z","dependencies_parsed_at":"2024-05-31T01:57:02.648Z","dependency_job_id":"687bce18-131c-4b4e-bbdc-84890dce533f","html_url":"https://github.com/justinhartman/imdb-app","commit_stats":null,"previous_names":["justinhartman/imdb-app"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/justinhartman/imdb-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinhartman%2Fimdb-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinhartman%2Fimdb-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinhartman%2Fimdb-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinhartman%2Fimdb-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinhartman","download_url":"https://codeload.github.com/justinhartman/imdb-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinhartman%2Fimdb-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264795401,"owners_count":23665230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axios","express","expressjs","imdb","imdb-api","mongodb","mongodb-express","mongodb-express-nodejs","nodejs","omdb","vidsrc"],"created_at":"2024-11-21T11:21:30.027Z","updated_at":"2025-07-11T11:32:26.181Z","avatar_url":"https://github.com/justinhartman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IMDb Movie \u0026 TV Search Engine WebApp\n\nThis project is a web application that allows users to search for movies and TV shows using the OMDb API. The \napplication is built using Node.js, Express.js, Axios and MongoDB. It provides a user-friendly interface for searching  \nand browsing movies and TV shows, along with a feature to watch the videos directly in the app.\n\n## Features\n\nThe application provides the following features:\n\n1. Search for movies and TV shows using the OMDb API. \n2. Display search results on the screen. \n3. Watch videos directly on the webpage using the VidSrc video API. \n4. Display movie and TV show posters on the screen.\n5. Comments under each movie/series via Disqus.\n6. User registration, login, logout, profile and watchlist functionality via a MongoDB database.\n7. Configuration files to set up Nginx and systemd for running as a webapp under a domain name.\n8. Documentation to help you get setup with MongoDB and other items for making the app work.\n9. A RapidAPI file for macOS and Visual Studio with all the OMDb API endpoints for you to test with.\n\n## Core Project Structure\n\nThe core project's structure is as follows:\n\n- `app.js`: The main entry point of the application, which sets up the server and listens for incoming requests.\n- `.env.example` file: Example file containing environment variables used by the application (see instructions below).\n- `/config` directory: Contains all the application config files.\n- `/helpers` directory: Contains helper files for reusable components.\n- `/public` directory: Contains static assets that are served directly to the client browser.\n- `/routes` directory: Contains various app route files.\n- `/views` directory: Contains EJS templates for rendering web pages.\n\n## Authentication \u0026 User Project Structure\n\nBy default, the app will work out the box, however, it is also capable of handling user registration,\nlogin, logout, profile and watchlist functionality through the use of a MongoDB database.\nI figured that MongoDB may be beyond some people's scope, so I wanted to keep the app lightweight and easy to get \nrunning without complex configuration, therefore enabling MongoDB is optional.\n\nThe authentication and user project structure is as follows:\n\n- `migrate-mongo-config.js`: The configuration file for running MongoDB migrations\n- `/controllers` directory: Contains auth and watchlist application controller login. \n- `/middleware` directory: Contains the application auth middleware.\n- `/migrations` directory: Contains migrations to setup and alter the MongoDB.\n- `/models` directory: Contains the User model and any future models. \n\n## Installation and Setup\n\nYou can decide to run the app in its basic format where it will just act as a search engine and video player.\nHowever, you can also enable the Authentication \u0026 User format which uses MongoDB to save items to user's profiles.\n\n### Basic Application\n\nTo install and set up the basic project, follow these steps:\n\n1. Clone the repository to your local machine.\n2. Navigate to the project directory in your terminal.\n3. Install the required dependencies by running `yarn install`.\n4. Rename `.env.example` to simply `.env` in the project root directory and change the following lines:\n   - [ ] `OMDB_API_KEY=your_api_key_here` - replace `your_api_key_here` with your actual OMDB API key.\n   - [ ] `API_PORT=3000` - replace `3000` with the port you want the node server to run on. \n   - [ ] `APP_URL=binger.uk` - replace `binger.uk` with your website/app's live URL.\n5. Start the application by running `yarn start`.\n\n### Nginx and Systemd Server Setup\n\nIncluded in the `/system` folder are two configuration files:\n\n1. `/system/nginx/binger.uk.conf`: this is an Nginx config file for running the app using Nginx\n2. `/system/systemd/binger.service`: this is an Ubuntu/Debian systemd config file for booting up the Node.js server\n\nModify these to suite your environment to get the app running.\n\n**Note:** the empty folder `/system/nginx-root/` is used in the `/system/nginx/binger.uk.conf` nginx file for SSL.\nIf you would like to use SSL we recommend installing `certbot` and then executing this command:\n\n```bash\n# replace binger.uk with your domain name\n$ sudo certbot --nginx -d binger.uk\n```\n\n### Advanced Application (optional)\n\nTo get the authentication and user functionality working, make sure you've followed all the steps above in the Basic \nApplication and then follow these steps.\n\n1. Install and configure MongoDB. There are detailed instructions here:\n   - [Install for Debian Bookworm](./docs/mongodb/INSTALL_DEBIAN.md) found at `./docs/mongodb/INSTALL_DEBIAN.md`\n   - [Install for Ubuntu 20.04](./docs/mongodb/INSTALL_UBUNTU.md) found at `./docs/mongodb/INSTALL_UBUNTU.md` - note \n     that these instructions come from ChatGPT and I haven't tested them.\n     I have a Debian server so please correct the instructions if you find any are incorrect and submit a PR.\n\n2. Uncomment the following in your `.env` file:\n   ```dotenv\n    #MONGO_URI=\"mongodb://localhost:27017\"\n    #MONGO_DATABASE=binger-uk\n    #MONGO_USERNAME=\n    #MONGO_PASSWORD=\n    #MONGO_HOST=localhost\n    #MONGO_PORT=27017\n   ```\n   With them uncommented your `.env` file should look like this (assuming you followed the supplied tutorial in step 1): \n    ```dotenv\n    MONGO_URI=\"mongodb://localhost:27017\"\n    MONGO_DATABASE=binger-uk\n    MONGO_USERNAME=myAdminUser\n    MONGO_PASSWORD=myAdminPassword\n    MONGO_HOST=localhost\n    MONGO_PORT=27017\n   ```\n   At a minimum, you must have added in values for `MONGO_URI` and `MONGO_DATABASE`.\n   You only need to add username and password if you secured your MongoDB installation as per my Step 1 documentation.   \n\n3. You need to run the MongoDB migrations once you've added your MongoDB details to your `.env` file. \n   Open up a terminal and in the project root run the following:\n   ```bash\n   yarn db:migrate\n   ```\n   Or if you are using NPM:\n   ```bash\n   npm run db:migrate\n   ```\n\n4. With the MongoDB collection now migrated, you can begin using your app. Simply restart your node server so your \n   latest configs are loaded. If you've used the [systemd service file](./system/systemd/binger.service) I've supplied \n   at `./system/systemd/binger.service` then all you need to do is restart the service with:\n   ```bash\n   sudo systemctl restart binger.service\n   ```\n\n5. You can now test your app URL paths like `./user/register`, `./user/login` and `./user/profile` paths to see if data \n   is being stored correctly.\n\n## OMDb API\n\nIncluded in this repository is a [RapidAPI](https://rapidapi.com) file created by the macOS app RapidAPI which is free.\nThere is also a VSCode extension which should be able to work with this file but YMMV.\n\nThe file is located at [/docs/api/OMDb_API.paw](/docs/api/OMDb_API.paw) and contains a working implementation of the \nOMDb API used in this project. Open the file and begin testing the API to see responses.\n\n## Known Issues\n\n- [ ] The application currently does not handle errors gracefully. If an error occurs during the search request or \n      while rendering the webpage, it may cause the application to crash.\n- [x] ~~The application does not have a proper authentication mechanism. Anyone with access to the application can \n      perform searches and watch videos.~~\n- [ ] The application does not have a proper logging mechanism. If an error occurs during the search request or while \n      rendering the webpage, it may not be logged or displayed to the user.\n- [x] ~~There are some layout issues on mobile and tablet that need resolving.~~\n\n## Future Enhancements\n\n- [x] ~~Improve UI on View player page to include movie/tv information and title.~~\n- [ ] Change layout to include all episodes on the view screen.\n- [x] ~~Implement a proper authentication mechanism to restrict access to the application.~~\n- [ ] Add more features such as: \n  - [x] ~~User profiles~~ \n  - [ ] Personalised recommendations\n  - [x] ~~Better search interface~~\n  - [x] ~~Bookmarks to save items to profile~~\n- [ ] Implement a proper logging mechanism to track errors and user interactions.\n- [ ] Improve the error handling mechanism to provide better feedback to the user when an error occurs.\n\n## License\n\n\u003e Copyright (c) 2024 [Justin Hartman](https://justhart.com). All rights reserved.   \n\u003e The application is licensed under the [MIT license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinhartman%2Fimdb-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinhartman%2Fimdb-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinhartman%2Fimdb-app/lists"}