A Next.js application that displays anticipated movies with their trailers from IMDB.
- 🎬 Browse anticipated movies with beautiful card-based UI
▶️ Watch trailers in fullscreen mode- 📱 Responsive design for all screen sizes
- 🎨 IMDB-inspired dark theme
- ⚡ Fast loading with Next.js App Router
- 🔍 Only shows movies with available trailers
- Framework: Next.js 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- Font: Inter (Google Fonts)
- Node.js 18+
- npm or yarn
- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
npm run build
npm startThe application directly fetches movie data from IMDB's GraphQL API at https://api.graphql.imdb.com/. No backend server is required.
The app uses the Trl_PopularTitlesTrailers query to fetch the most anticipated movies with trailers for the next year.
Trailers are loaded using the following URL pattern:
https://imdb-video.media-imdb.com/mc/{videoId}/{videoId}_1080p.mp4
├── app/
│ ├── api/
│ │ └── trailers/
│ │ └── route.ts # API route to fetch trailers from IMDB
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main page
├── components/
│ └── MovieCard.tsx # Movie card component with fullscreen video player
├── package.json
├── tailwind.config.js
├── tsconfig.json
└── README.md
- The API route (
/api/trailers) sends a GraphQL request to IMDB's API - Fetches the most anticipated movies with trailers for the next year
- Filters out movies without trailers (videoId is null)
- Returns the data to the frontend
- The frontend displays movies in a responsive grid
- Click "Watch Trailer" or the play button to open fullscreen video player
This application is ready to be deployed on Vercel:
- Push your code to a Git repository
- Import the project in Vercel
- Deploy!
MIT