Overview
This guide provides comprehensive instructions for installing and configuring Popcorn Vision on your local development environment. By the end, you’ll have a fully functional movie and TV show discovery platform.Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
pnpm
Version 9.15.5 (recommended)Check your version:Install globally:
Git
TMDB Account
Free API accessCreate an account at themoviedb.org and request API credentials
Step-by-Step Installation
Clone the Repository
Clone Popcorn Vision from GitHub:
Fork for Development
If you plan to contribute or customize:- Fork the repository on GitHub
- Clone your fork:
- Add upstream remote:
Install Dependencies
Install all required packages using your preferred package manager:
Why pnpm? The project is configured with
[email protected] as specified in package.json. It’s faster and more efficient than npm or yarn, but all three package managers are supported.Key Dependencies
Popcorn Vision uses these major packages:package.json
Configure Environment Variables
Create your environment configuration file:
Required Configuration
Open.env and configure the following:.env
Getting TMDB API Credentials
Step-by-step: Get your TMDB API keys
Step-by-step: Get your TMDB API keys
-
Create an Account
- Visit themoviedb.org
- Click “Join TMDB” to create a free account
- Verify your email address
-
Request API Access
- Log in and go to Settings → API
- Click “Request an API Key”
- Choose “Developer” option
-
Fill Out the Application
- Type of Use: Website or Personal
- Application Name: Popcorn Vision (Local Development)
- Application URL: http://localhost:3000
- Application Summary: Personal movie discovery platform
- Accept the terms and submit
-
Copy Your Credentials
- API Key (v3 auth): Copy to
API_KEYin.env - API Read Access Token (v4 auth): Copy to
API_READin.env
- API Key (v3 auth): Copy to
-
Verify Your Setup
Understanding the Configuration
The axios client is configured to use these environment variables:src/lib/axios.js
Start the Development Server
Verify Installation
Open your browser and navigate to:
What You Should See
Homepage Features
Homepage Features
- Hero Slider: Carousel of trending movies/TV shows with backdrop images
- Now Playing: Currently available movies in theaters
- Upcoming: Future releases in the next 3 months
- Top Rated: Highest-rated content by vote count
- Trending: Popular content this week
- Company Sections: Content from major studios
- Genre Sections: Horror, Comedy, Sci-Fi movies
Navigation Options
Navigation Options
Test the API Connection
Check the browser console (F12) for any errors. A successful setup will show:Build for Production
When you’re ready to deploy:Production Configuration
The site configuration automatically adjusts for production:src/config/site.js
Troubleshooting
Port 3000 already in use
Port 3000 already in use
Error: Find and kill the process:
Port 3000 is already in useSolution: Either kill the process using port 3000 or specify a different port:API requests return 401 Unauthorized
API requests return 401 Unauthorized
Images not loading
Images not loading
Error: Broken image placeholders or 404 errorsCauses:
- Image URLs in
.envare incorrect - TMDB image CDN is unreachable
- Content doesn’t have poster/backdrop images
- Verify image URLs match
.env.exampleexactly - Test direct image access:
- Check browser console for CORS or network errors
pnpm: command not found
pnpm: command not found
Error:
bash: pnpm: command not foundSolution: Install pnpm globally:Module not found errors
Module not found errors
Error: The path aliases are configured in
Module not found: Can't resolve '@/components/...'Causes:- Dependencies weren’t installed properly
- Node modules are corrupted
- Path aliases aren’t configured
jsconfig.json:Rate limiting errors
Rate limiting errors
Error:
429 Too Many RequestsCause: TMDB API has rate limits (around 40 requests per 10 seconds)Solution:- Popcorn Vision implements automatic rate limiting with the
limiterpackage - Responses are cached for 1 hour to reduce API calls
- If you’re still hitting limits, consider:
- Reducing concurrent requests in development
- Implementing additional caching layers
- Upgrading to TMDB API v4 for higher limits
Next Steps
Now that you have Popcorn Vision installed:Explore the Codebase
/src/app: Next.js App Router pages/src/components: Reusable React components/src/lib: Utility functions and axios client/src/zustand: State management stores
Customize Configuration
tailwind.config.js: Styling configurationnext.config.mjs: Next.js settings/src/config/site.js: Site metadata
Add Features
Study the component structure to add:
- New search filters
- User profile enhancements
- Social sharing features
Contribute
- Read
CODE_OF_CONDUCT.md - Fork and create a feature branch
- Submit pull requests on GitHub
Additional Resources
TMDB API Documentation
Official API reference for endpoints, parameters, and response formats
Next.js Documentation
Learn about Next.js 14 features, App Router, and server components
Live Demo
Experience the production version of Popcorn Vision