This is a solo project built as part of the Scrimba Full Stack Developer Career Path. The goal was to create a dynamic, multi-page web application that allows users to search for movies and manage a personal watchlist. The project focuses on clean JavaScript, asynchronous API calls, and local state management.
- Movie Search: Search for movies by title using the OMDb API.
- Detailed Information: View movie details including poster, rating, plot, and genre.
- Dynamic Watchlist:
- Add movies to a personal watchlist from the search results.
- Remove movies from the watchlist.
- The UI instantly updates to show whether a movie is on the watchlist or not.
- Data Persistence: The user's watchlist is saved to
localStorage, so it persists across browser sessions. - Dedicated Watchlist Page: A separate page (
/watchlist.html) that displays all the movies saved by the user.
This project was a deep dive into vanilla JavaScript and modern web development practices. The key concepts covered include:
- HTML5 & CSS3: For structure and styling.
- JavaScript (ES6+):
- Asynchronous JavaScript:
fetch()API for making requests to the OMDb API.async/awaitfor handling promises in a clean and readable way.Promise.all()to efficiently fetch details for multiple movies at once.
- DOM Manipulation:
- Dynamically generating HTML from JavaScript data (
.map()and.join()). - Using
document.getElementByIdto select elements. - Mastering
addEventListenerwith Event Delegation to handle clicks on dynamically created elements.
- Dynamically generating HTML from JavaScript data (
- Local State Management:
- Using Browser
localStorageto persist the watchlist data. - Correctly serializing (
JSON.stringify()) and deserializing (JSON.parse()) data. - Managing state across multiple pages.
- Using Browser
- Modern ES6+ Syntax:
constandletfor variable declarations.- Arrow Functions (
=>). - Template Literals for easy HTML string creation.
- Array methods like
.map(),.filter(), and.includes().
- Asynchronous JavaScript:
- Clone this repository to your local machine.
- Obtain a free API key from OMDb API.
- In both
index.jsandwatchlist.js, replace the placeholderYOUR_API_KEYwith your actual key in thefetchURLs. - Open the
index.htmlfile in your browser.
This project was built following the guidance and curriculum of the Scrimba Frontend Developer Career Path. It was a challenging and incredibly rewarding experience that solidified fundamental concepts of frontend development.