A modern, responsive movie discovery application built with React and TypeScript. Browse popular movies, search for your favorites, and manage your personal collection with favorites and watchlist features.
Screencast_20250904_190734.webm
- Movie Discovery: Browse popular movies with beautiful, interactive cards
- Advanced Search: Search for any movie using TMDB's extensive database
- Detailed Movie Info: View comprehensive movie details including cast, budget, revenue, and production companies
- Favorites System: Add/remove movies to your personal favorites collection
- Watchlist Management: Save movies you want to watch later
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Modern UI: Glassmorphism design with smooth animations and hover effects
- Persistent Storage: Your favorites and watchlist are saved locally
- Frontend: React 18 with TypeScript
- Routing: React Router DOM
- Styling: CSS Modules with modern CSS features
- API: The Movie Database (TMDB) API
- State Management: React Context API
- Storage: Local Storage for persistence
- Build Tool: Vite
- Node.js (version 16 or higher)
- npm or yarn
- TMDB API Key (free registration required)
-
Clone the repository
git clone <https://github.com/PAKIWASI/Movie-App-React-TS> cd movie-app
-
Install dependencies
npm install
-
Set up environment variables
Create a
.envfile in the root directory:VITE_TMDB_API_KEY=your_api_key_here
Get your free API key from The Movie Database (TMDB)
-
Start the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:5173to view the application
src/
├── components/
│ ├── MovieCard.tsx # Individual movie card component
│ ├── MovieCard.module.css # Movie card styles
│ ├── Navbar.tsx # Navigation component
│ └── Navbar.module.css # Navigation styles
├── contexts/
│ └── MovieContext.tsx # Global state management
├── pages/
│ ├── Home.tsx # Homepage with search and popular movies
│ ├── Home.module.css # Homepage styles
│ ├── Favorites.tsx # Favorites page
│ ├── Favorites.module.css # Favorites page styles
│ ├── Watchlist.tsx # Watchlist page
│ ├── MovieDetail.tsx # Detailed movie view
│ └── MovieDetail.module.css # Movie detail styles
├── services/
│ └── api.ts # TMDB API integration
├── types.ts # TypeScript type definitions
└── App.tsx # Main application component
The application uses The Movie Database (TMDB) API to fetch movie data:
- Popular Movies: Fetches trending movies for the homepage
- Movie Search: Allows users to search through TMDB's movie database
- Movie Details: Retrieves comprehensive information about individual movies
- Hover animations with image scaling and glow effects
- Heart icon for favorites (filled/empty states)
- Bookmark icon for watchlist items
- Click to navigate to detailed movie view
- Hero section with backdrop image and movie poster
- Complete movie information including runtime, budget, revenue
- Production company logos and details
- Add/remove from favorites functionality
- Responsive design for all screen sizes
- React Context API for global state
- Persistent storage using localStorage
- Separate management for favorites and watchlist
- Error handling for storage operations
The application is fully responsive with breakpoints for:
- Desktop: Full-width layout with grid displays
- Tablet: Adjusted spacing and card sizes
- Mobile: Single-column layout with touch-optimized interactions
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Lazy loading of movie images
- Efficient state updates with React Context
- CSS animations using hardware acceleration
- Optimized API calls with error handling
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- TypeScript for type safety
- CSS Modules for component-scoped styling
- Modern CSS features (Grid, Flexbox, Custom Properties)
- Consistent component architecture
- The Movie Database (TMDB) for the movie data API
- React for the frontend framework
- Vite for the build tool
For questions or support, please open an issue on GitHub.
Note: This application is for educational purposes. Movie data and images are provided by TMDB under their terms of service.