πΏ PopcornHub - Modern Movie & TV Show Discovery PlatformA beautiful, responsive React application for discovering movies and TV shows, built from scratch with modern design principles and best practices.## β¨ Features### π¬ Content Discovery- Popular Movies & TV Shows: Browse trending and popular content- Advanced Search: Search across movies, TV shows, and people- Detailed Information: Comprehensive details including cast, crew, trailers, and reviews- Responsive Design: Perfect experience on desktop, tablet, and mobile devices### π¨ Modern UI/UX
- Dark Theme: Beautiful dark mode design with gradient accents
- Smooth Animations: Fluid transitions and hover effects
- Mobile-First: Responsive design that works on all devices
- Accessibility: WCAG compliant with keyboard navigation and screen reader support
- Fast Loading: Optimized images and lazy loading
- Smooth Navigation: Client-side routing with React Router
- Error Handling: Graceful error states with fallbacks
- SEO Optimized: Proper meta tags and semantic HTML
- React 18 - Latest React with hooks and context
- React Router 6 - Client-side routing
- CSS3 - Modern CSS with custom properties and flexbox/grid
- Vite - Lightning-fast build tool
- TMDB API - The Movie Database API for content data
- Axios - HTTP client for API requests
- ESLint - Code linting and formatting
- Modern JavaScript - ES6+ features
- Component Architecture - Reusable and maintainable components
- Node.js (v14 or higher)
- npm or yarn
- TMDB API key (optional - demo key included)
-
Clone the repository
git clone https://github.com/your-username/popcorn-hub.git cd popcorn-hub -
Install dependencies
npm install
-
Configure Environment Variables
-
Copy the environment template:
cp .env.example .env
-
Get your free API key from TMDB
-
Open
.envand replaceyour_tmdb_api_key_herewith your actual API key
VITE_TMDB_API_KEY=your_actual_api_key_here
-
-
Start the development server
npm run dev
-
Open your browser
- Navigate to
http://localhost:5173 - Enjoy exploring movies and TV shows! π
- Navigate to
For security and deployment flexibility, API keys are stored in environment variables:
VITE_TMDB_API_KEY- Your TMDB API keyVITE_TMDB_BASE_URL- TMDB API base URL (default provided)VITE_TMDB_IMAGE_BASE_URL- TMDB images base URL (default provided)
See ENV_SETUP.md for detailed setup instructions and deployment guide.
The application is fully responsive and optimized for:
- Mobile Devices (320px - 768px)
- Tablets (768px - 1024px)
- Desktop (1024px+)
- Fixed Header: Always accessible navigation
- Mobile Menu: Hamburger menu for smaller screens
- Search Integration: Global search functionality
- Active States: Visual feedback for current page
- Hover Effects: Smooth animations on interaction
- Rating Display: Visual rating system
- Lazy Loading: Optimized image loading
- Skeleton States: Loading placeholders
- Detailed View: Rich content details in overlay
- Responsive Layout: Adapts to screen size
- Keyboard Navigation: ESC key and focus management
- Video Integration: Embedded trailers
src/
βββ components/ # Reusable UI components
β βββ Navbar/ # Navigation component
β βββ ContentCard/ # Movie/TV card component
β βββ ContentGrid/ # Grid layout component
β βββ Modal/ # Detail modal component
βββ pages/ # Page components
β βββ HomePage/ # Landing page
β βββ SearchPage/ # Search results page
βββ context/ # React context for state
βββ services/ # API services
βββ hooks/ # Custom React hooks
βββ styles/ # Global styles and variables
- ContentCard: Flexible card for movies/TV shows
- ContentGrid: Responsive grid with loading states
- Modal: Accessible modal with rich content
- Navbar: Responsive navigation with search
- useContentDetails: Fetch and format content details
- useAppContext: Global state management
- Centralized state with React Context
- Actions for API calls and state updates
- Error handling and loading states
- Multiple Sizes: Responsive image sources
- Lazy Loading: Images load as needed
- Placeholder Images: Fallbacks for missing images
- WebP Support: Modern image formats
- Route-based Splitting: Lazy load pages
- Component Optimization: Memoization where needed
- Bundle Analysis: Optimized build output
- API Response Caching: Reduced API calls
- Browser Caching: Optimized cache headers
- Static Asset Caching: Long-term caching
- Modern Browsers: Chrome, Firefox, Safari, Edge
- Mobile Browsers: iOS Safari, Chrome Mobile
- Accessibility: NVDA, JAWS, VoiceOver compatible
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint
- CSS custom properties for easy theming
- Consistent color palette throughout
- Easy to modify spacing and typography
- API endpoints easily configurable
- Environment-based settings
- Flexible component props
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- TMDB for providing the excellent movie database API
- React Team for the amazing framework
- Vite for the lightning-fast build tool
- The Open Source Community for inspiration and tools
- Email: your.email@example.com
- LinkedIn: Your LinkedIn Profile
- Portfolio: Your Portfolio Website
Made with β€οΈ and lots of β
β Star this repo if you found it helpful!