Skip to content

civilgoody/elemental-recs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŠ Elemental Recs ๐Ÿ”ฅ

Your AI Bending Movie & TV Show Recommender

๐ŸŽฏ Overview

Elemental Recs is an AI-powered web application that provides personalized movie and TV show recommendations. Users input three movies or TV shows they enjoy, and the system leverages the Gemini 2.0 Flash model and The Movie Database (TMDB) API to generate tailored suggestions. The application features a beautiful Avatar: The Last Airbender themed interface built with Next.js, Shadcn UI, and Tailwind CSS.

โœจ Features

  • Personalized Recommendations: Input 3 favorite titles and get 5 tailored suggestions
  • AI-Powered Analysis: Uses Gemini 2.0 Flash to analyze preferences and provide intelligent recommendations
  • IMDb Integration: Direct links to IMDb pages for each recommendation
  • Avatar Theme: Beautiful Water Tribe-inspired design with elemental animations
  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Real-time Validation: Ensures accurate movie/show data through TMDB API verification

๐Ÿš€ Tech Stack

  • Frontend: Next.js 15 (App Router), React 19, TypeScript
  • UI Components: Shadcn UI, Tailwind CSS 4
  • AI Model: Google Gemini 2.0 Flash
  • Movie Data: The Movie Database (TMDB) API
  • Icons: Lucide React
  • Styling: Avatar: The Last Airbender Water Tribe theme

๐Ÿ“‹ Prerequisites

Before running this project, you'll need:

  1. Node.js (version 18 or higher)
  2. npm or yarn package manager
  3. Gemini API Key from Google AI Studio
  4. TMDB API Key from The Movie Database

๐Ÿ› ๏ธ Setup Instructions

1. Clone the Repository

git clone https://github.com/your-username/elemental-recs.git
cd elemental-recs

2. Install Dependencies

npm install

3. Environment Variables

Create a .env.local file in the root directory and add your API keys:

# Gemini AI API Key
GEMINI_API_KEY=your_gemini_api_key_here

# TMDB API Key
TMDB_API_KEY=your_tmdb_api_key_here

Getting API Keys:

Gemini API Key:

  1. Visit Google AI Studio
  2. Sign in with your Google account
  3. Create a new API key
  4. Copy the key to your .env.local file

TMDB API Key:

  1. Visit The Movie Database
  2. Create an account or sign in
  3. Go to Settings > API
  4. Request an API key (choose "Developer" option)
  5. Copy the API key to your .env.local file

4. Run the Development Server

npm run dev

Open http://localhost:3000 in your browser to see the application.

๐ŸŽจ Avatar Theme

The application features a Water Tribe-inspired theme from Avatar: The Last Airbender:

  • Primary Colors: Deep blues and light blues
  • Accent Colors: Ice whites and water-inspired tones
  • Animations: Custom water ripple and air floating effects
  • Icons: Elemental symbols (Water, Air, Fire, Earth)
  • Typography: Clean, readable fonts with thematic styling

๐Ÿ—๏ธ Project Structure

elemental-recs/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ api/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ recommendations/
โ”‚   โ”‚   โ”‚       โ””โ”€โ”€ route.ts          # API endpoint for recommendations
โ”‚   โ”‚   โ”œโ”€โ”€ globals.css               # Global styles and theme variables
โ”‚   โ”‚   โ”œโ”€โ”€ layout.tsx                # Root layout with metadata
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx                  # Main application page
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ””โ”€โ”€ ui/                       # Shadcn UI components
โ”‚   โ””โ”€โ”€ lib/
โ”‚       โ””โ”€โ”€ utils.ts                  # Utility functions
โ”œโ”€โ”€ public/                           # Static assets
โ”œโ”€โ”€ package.json                      # Project dependencies
โ””โ”€โ”€ README.md                         # Project documentation

๐Ÿ”ง API Endpoints

POST /api/recommendations

Generates movie/TV show recommendations based on user input.

Request Body:

{
  "title1": "Avatar: The Last Airbender",
  "title2": "Studio Ghibli films",
  "title3": "The Lord of the Rings"
}

Response:

{
  "recommendations": [
    {
      "title": "Princess Mononoke",
      "year": 1997,
      "type": "Movie",
      "brief_reasoning": "Like your favorites, this combines environmental themes with epic storytelling and rich world-building.",
      "imdb_id": "tt0119698",
      "imdb_url": "https://www.imdb.com/title/tt0119698/"
    }
  ]
}

๐ŸŽฎ Usage

  1. Input Your Favorites: Enter three movies or TV shows you love in the input fields
  2. Generate Recommendations: Click "Find My Next Binge" to get AI-powered suggestions
  3. Explore Results: Browse through 5 personalized recommendations with explanations
  4. Visit IMDb: Click "View on IMDb" to learn more about each recommendation

๐ŸŒŸ Key Features Explained

AI Recommendation Engine

The application uses a carefully crafted prompt for Gemini 2.0 Flash that:

  • Analyzes common themes, genres, and elements across your input titles
  • Considers narrative style, character archetypes, tone, and pacing
  • Provides diverse yet relevant suggestions
  • Includes brief explanations for each recommendation

TMDB Integration

  • Validates AI-generated titles against real movie/show data
  • Retrieves accurate release years and IMDb IDs
  • Ensures reliable linking to IMDb pages
  • Handles both movies and TV shows seamlessly

Avatar-Themed UI

  • Custom CSS animations inspired by elemental bending
  • Water Tribe color palette with blues and whites
  • Elemental icons that rotate through Water, Air, Fire, and Earth
  • Subtle background patterns and hover effects

๐Ÿš€ Deployment

Deploy to Vercel (Recommended)

  1. Push your code to GitHub
  2. Visit Vercel and import your repository
  3. Add your environment variables in the Vercel dashboard
  4. Deploy!

Deploy to Other Platforms

The application can be deployed to any platform that supports Next.js:

  • Netlify
  • Railway
  • Digital Ocean App Platform
  • AWS Amplify

๐Ÿ›ฃ๏ธ Roadmap

Potential Future Enhancements

  • User Accounts: Save recommendation history and preferences
  • Advanced Filtering: Filter by genre, release year, streaming availability
  • Social Features: Share recommendations with friends
  • Streaming Integration: Show where to watch each recommendation
  • Mobile App: React Native version for iOS and Android
  • Theme Variants: Other Avatar nations (Fire Nation, Earth Kingdom, Air Nomads)

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Avatar: The Last Airbender for the amazing world and aesthetic inspiration
  • Google Gemini for the powerful AI recommendation engine
  • The Movie Database for comprehensive movie and TV show data
  • Shadcn UI for beautiful, accessible components
  • Next.js Team for the excellent framework

๐Ÿ“ž Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with a detailed description
  3. Include error messages and steps to reproduce

May the elements guide your next watch! ๐ŸŒŠ๐Ÿ”ฅ๐ŸŒช๏ธ๐Ÿ—ป

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published