Your personal movie collection, powered by TMDB. Discover, explore, and save your favorite films with a sleek cyberpunk-inspired interface.
π Live Demo: moviebase.thegridbase.com
- Infinite Scroll Grid - Browse thousands of movies seamlessly
- TMDB Integration - Access to comprehensive movie database
- Genre Filtering - Filter by Action, Comedy, Drama, Horror, Romance, Adventure, Kids
- Search Functionality - Find movies by title
- Trailer Playback - Watch trailers directly in the app
- Favorites System - Save movies to your personal collection
- User Authentication - Secure login with Supabase Auth
- Cloud Sync - Your favorites saved to Supabase database
- Favorites Modal - Quick access to your saved movies
- Dark Theme - Eye-friendly dark interface
- Smooth Animations - Framer Motion powered transitions
- Responsive Layout - Works on all screen sizes
- Modern UI - Clean, futuristic design aesthetic
- Hero Section - Featured movie showcase
- Movie Cards - Beautiful card design with backdrop images
- Platform Indicators - See where movies are available (Netflix, Prime, etc.)
- Loading States - Smooth loading animations
- Node.js 18+ and npm
- TMDB API Key - Get one at TMDB
- Supabase Account - For authentication and favorites storage
-
Clone the repository
git clone https://github.com/cankilic-gh/MovieBase.git cd MovieBase -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:# TMDB API VITE_TMDB_API_KEY=your_tmdb_api_key # Supabase VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Set up Supabase database
Run the SQL script in
supabase-setup.sqlto create the favorites table:-- Create favorites table CREATE TABLE favorites ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE, movie_id INTEGER NOT NULL, created_at TIMESTAMP DEFAULT NOW() ); -- Enable RLS ALTER TABLE favorites ENABLE ROW LEVEL SECURITY; -- RLS Policies CREATE POLICY "Users can view own favorites" ON favorites FOR SELECT USING (auth.uid() = user_id); CREATE POLICY "Users can insert own favorites" ON favorites FOR INSERT WITH CHECK (auth.uid() = user_id); CREATE POLICY "Users can delete own favorites" ON favorites FOR DELETE USING (auth.uid() = user_id);
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:5173
MovieBase/
βββ components/ # React components
β βββ FavoritesModal.tsx # Favorites collection view
β βββ HeroSection.tsx # Featured movie hero
β βββ InfiniteScrollGrid.tsx # Movie grid with infinite scroll
β βββ LoginModal.tsx # Authentication modal
β βββ MovieCard.tsx # Individual movie card
β βββ Navbar.tsx # Navigation bar
βββ hooks/ # Custom React hooks
β βββ useFavorites.ts # Favorites management hook
βββ services/ # API services
β βββ supabaseClient.ts # Supabase client setup
β βββ tmdbService.ts # TMDB API client
βββ utils/ # Utility functions
β βββ userHelpers.ts # User authentication helpers
βββ types.ts # TypeScript type definitions
βββ App.tsx # Main application component
- Vite 5.0 - Build tool and dev server
- React 18.2 - UI library
- TypeScript 5.2 - Type safety
- React Router DOM - Client-side routing
- Tailwind CSS 3.3 - Utility-first CSS
- Framer Motion - Animation library
- Lucide React - Icon library
- Supabase - PostgreSQL database and authentication
- TMDB API - Movie database and metadata
- Vite - Fast HMR and optimized builds
- Vercel - Deployment platform (configured)
- Scroll down to load more movies (infinite scroll)
- Click genre buttons to filter by category
- Use search to find specific movies
- Click movie cards to view details and trailer
- Sign up/Login using the login modal
- Click the heart icon on any movie card
- View favorites by clicking the favorites button in navbar
- Remove favorites by clicking the heart again
- Click a movie card to open details
- Click the play button to watch trailer
- Close modal to return to browsing
# Development
npm run dev # Start development server with HMR
# Production
npm run build # Build for production
npm run preview # Preview production build locallyEdit App.tsx to add genre mappings:
const GENRE_MAP: Record<string, number> = {
'Action': 28,
'Comedy': 35,
'Your Genre': genre_id, // Add TMDB genre ID
};The app uses TMDB API v3 for:
- Movie discovery
- Movie details
- Backdrop images
- Trailer videos
- Genre information
Rate Limits: TMDB API has rate limits. The app implements proper error handling.
- Push your code to GitHub
- Import project in Vercel
- Add environment variables:
VITE_TMDB_API_KEYVITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
- Deploy!
The project includes vercel.json for optimal configuration.
Make sure to set all required environment variables in your deployment platform.
Cyberpunk Aesthetic:
- Dark backgrounds with neon accents
- High contrast for readability
- Smooth, futuristic animations
- Grid-based layouts
User Experience:
- Infinite scroll for seamless browsing
- Quick access to favorites
- Minimal clicks to watch trailers
- Responsive on all devices
This project is private and proprietary.
Can Kilic
- Portfolio: cankilic.com
- GitHub: @cankilic-gh
- Movie data powered by TMDB
- Database and auth by Supabase
- Built with Vite
- Animations by Framer Motion
- TV Shows support
- Watchlist functionality
- Ratings and reviews
- Social features (share, recommend)
- Advanced filtering (year, rating, etc.)
- Movie recommendations based on favorites
- Export favorites list