Welcome to the Movie Search App! 🎥🍿 This is a simple, beginner-friendly React app that lets you search for your favorite movies using the OMDB API. It's a fun project to help you learn React, API integration, and some Tailwind CSS for styling.
- Search for Movies: Type in the name of your favorite movie, and the app will fetch results from the OMDB database.
- Display Movie Info: See the title, poster, and year of release for each movie.
- Responsive Design: The app looks great on all devices, thanks to Tailwind CSS.
- React: JavaScript library for building user interfaces.
- Tailwind CSS: Utility-first CSS framework for styling.
- OMDB API: A free API to get movie information.
Before you start, make sure you have the following installed on your system:
git clone https://github.com/your-username/movie-search-app.git
cd movie-search-app
Run the following command to install the necessary dependencies:
npm install
# or
yarn install
- Go to the OMDB API and get your free API key.
- Create a
.env
file in the root directory of your project and add your API key:
REACT_APP_OMDB_API_KEY=your_api_key_here
Once everything is set up, start the development server:
npm start
# or
yarn start
Visit http://localhost:3000
in your browser, and you should see the Movie Search App in action!
Here’s a quick breakdown of the files in this project:
movie-search-app/
│
├── public/ # Static assets
├── src/
│ ├── components/
│ │ ├── SearchBar.js # Component for the movie search input
│ │ ├── MovieList.js # Component to display a list of movies
│ │ └── MovieCard.js # Component to show details for a single movie
│ ├── App.js # Main application component
│ ├── index.js # Entry point of the React app
│ └── index.css # Tailwind CSS imports and custom styles
│
├── .env # Environment variables (like API key)
├── .gitignore # Files and directories to be ignored by Git
├── README.md # You are here! 😎
└── package.json # Project dependencies and scripts
SearchBar.js
: Handles user input for searching movies.MovieList.js
: Displays the results from the OMDB API.MovieCard.js
: A card layout to show individual movie details (poster, title, and year).
We love contributions! Whether you’re fixing a bug, adding a feature, or improving documentation, we’d love your help. Here’s how you can contribute:
- Fork the Repository: Click on the “Fork” button in the top-right corner.
- Clone Your Fork:
git clone https://github.com/your-username/movie-search-app.git cd movie-search-app
- Create a New Branch:
git checkout -b feature/your-feature-name
- Make Changes and Commit:
git add . git commit -m "Add a new feature or fix a bug"
- Push Your Branch:
git push origin feature/your-feature-name
- Create a Pull Request: Open GitHub, go to your forked repo, and click the "New Pull Request" button.
Here are some features we're planning to add:
- 🎭 Movie Genres: Display the genres for each movie.
- 🎞️ Movie Trailers: Embed trailers using YouTube.
- ⭐ Favorites: Allow users to favorite movies.
Feel free to contribute any of these features or suggest your own!
If you're new to React, Tailwind CSS, or APIs, here are some resources to help you:
A big thank you to OMDB API for providing the movie data and to the amazing open-source community for making this project possible!
This project is licensed under the MIT License - see the LICENSE file for details.