A modern, open-source streaming service UI built with React, Vite, and Tailwind CSS, featuring beautiful GSAP animations and real-time movie data from TMDB.
- Live Movie Data: Fetches trending, top-rated, and kids movies from the TMDB API
- Multiple Categories: Trending Movies, Kids Movies, and Top Rated Movies
- Responsive Design: Optimized for all screen sizes with mobile-first approach
- Instant Search: Real-time search with debounced API calls
- Search Page: Full search results page with pagination (20 results per page)
- URL-based Search: Shareable search URLs with query parameters
- React 18 (with functional components and hooks)
- React Router 6 (for client-side routing)
- Vite (for fast development and HMR)
- Tailwind CSS (utility-first styling)
- GSAP (for advanced animations)
- TMDB API (for real movie data)
- React Icons (for icons)
- Axios (for API requests)
-
Clone the repo:
git clone https://github.com/adityabhatkar23/primevision.git cd primevision -
Install dependencies:
npm install
-
TMDB API Key:
- Create a
.envfile in the root:
VITE_TMDB_API_KEY=your_tmdb_api_key_here
- Create a
-
Run the app:
npm run dev
src/
├── App.jsx
├── main.jsx
├── index.css
├── constants.js
├── components/
│ ├── Navbar.jsx
│ ├── MovieRow.jsx
│ ├── Preview.jsx
│ ├── Marquee.jsx
│ ├── Button.jsx
│ └── Box.jsx
├── pages/
│ ├── Home.jsx
│ ├── MoviesDetails.jsx
│ └── Search.jsx
└── services/
└── tmdbAPI.js All TMDB API calls are centralized in src/services/tmdbAPI.js:
getTrendingMovies(limit)- Get trending moviesgetTopRatedMovies(limit)- Get top-rated moviesgetKidsMovies(limit)- Get family-friendly moviesgetNowPlayingMovies(limit)- Get movies in theaters
searchMovies(query, limit, page)- Search movies with paginationgetMovieDetails(movieId)- Get comprehensive movie infogetMovieCredits(movieId)- Get cast and crewgetMovieVideos(movieId)- Get trailers and videosgetSimilarMovies(movieId, limit)- Get similar moviesgetRecommendedMovies(movieId, limit)- Get recommended movies
- Debounced search to reduce API calls
- Lazy loading for images
- Efficient pagination
- Optimized re-renders with React hooks
- Styling:
Easily customize colors, fonts, and layout via Tailwind and the CSS files. - Animations:
All major UI elements use GSAP for smooth, modern animations. - Extendability:
Add more TMDB endpoints (e.g., movie details, genres, actors) by extendingtmdbAPI.jsand creating new components.
- TMDB API for movie data and images
- React Icons for beautiful icons
- GSAP for smooth animations
This project is licensed under the MIT License. See the LICENSE file for details.
Made with ❤️ by Aditya