Skip to content

Release v1.0.1

Latest

Choose a tag to compare

@sahaib sahaib released this 29 Nov 11:32
· 32 commits to main since this release

πŸš€ Release v1.0.1 - November 2024

✨ New Features

Search & Movie Management

  • πŸ” Improved search functionality with better accuracy and performance
  • πŸ“ Added Movie Entry Form for administrators
  • 🎬 Enhanced TMDB integration for movie data fetching
  • πŸ–ΌοΈ Automated movie poster updates through TMDB API

User Experience

  • ❀️ Redesigned favorites system with improved state management
  • πŸ›’ Enhanced cart functionality with real-time updates
  • πŸ” Improved authentication flow with NextAuth.js
  • πŸŒ“ Added dark mode support
  • 🎨 New responsive movie card design

Backend Improvements

  • πŸ—ƒοΈ Optimized database queries for favorites and cart operations
  • πŸ”’ Enhanced API route security
  • 🚦 Added proper error handling across all API endpoints

Admin Features

  • 🎯 New admin dashboard for movie management
  • πŸ“Š Protected admin routes with email verification
  • πŸ”„ Automated movie data synchronization

πŸ” Key Implementation Details

TMDB Integration

async function getMovieDetails(title: string, year: number) {
if (!process.env.TMDB_API_KEY) {
throw new Error('TMDB_API_KEY not found in environment variables');
}
console.log(πŸ” Fetching details for: ${title} (${year}));
const response = await fetch(
https://api.themoviedb.org/3/search/movie?api_key=${process.env.TMDB_API_KEY}&query=${encodeURIComponent(title)}&year=${year}
);
if (!response.ok) {
throw new Error(TMDB API error: ${response.status});
}
const data = await response.json();
return data.results?.[0] || null;
}

Enhanced Favorites System

export async function POST(request: Request) {
try {
const session = await getServerSession(authOptions)
if (!session?.user?.email) {
return NextResponse.json(
{ error: 'You must be signed in to manage favorites' },
{ status: 401 }
)
}
const { title } = await request.json()
const user = await prisma.user.findUnique({
where: { email: session.user.email },
include: { favorites: true }
})
// ... rest of the implementation
} catch (error) {
console.error('Error updating favorites:', error)
return NextResponse.json(
{ error: 'Internal server error' },
{ status: 500 }
)
}
}

πŸ› Bug Fixes

  • Fixed movie poster loading issues
  • Resolved favorites synchronization problems
  • Fixed cart state persistence issues
  • Corrected movie category assignment
  • Improved error handling in movie data updates

πŸ”§ Technical Improvements

  • Updated all major dependencies
  • Implemented proper TypeScript types across the application
  • Optimized build process
  • Enhanced error logging
  • Improved code organization and modularity

πŸ“š Documentation

  • Added comprehensive API documentation
  • Updated deployment instructions
  • Added contributor guidelines
  • Improved code comments and type definitions

πŸ”œ Coming Soon

  • Enhanced search filters
  • User reviews and ratings
  • Improved recommendation system
  • Payment integration
  • Email notifications

πŸ› οΈ Installation

npm install
npx prisma generate
npm run build

πŸ’‘ Notes

  • Please update your .env file with the new required variables
  • Run database migrations before deploying
  • Clear browser cache after updating to this version

πŸ”‘ Required Environment Variables

DATABASE_URL=
DIRECT_URL=
PULSE_API_KEY=
NEXTAUTH_SECRET=
NEXTAUTH_URL=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
SENDGRID_API_KEY=
RECAPTCHA_SECRET_KEY=
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=
NEXT_PUBLIC_TMDB_API_KEY=
NEXT_PUBLIC_TMDB_IMAGE_BASE_URL=
PRISMA_ENGINE_TYPE=
PRISMA_CLIENT_ENGINE_TYPE=
TMDB_API_KEY=

πŸ™ Acknowledgments

  • TMDB API for movie data
  • NextAuth.js team
  • Prisma team
  • All contributors

πŸ“ License

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


Made with ❀️ by @sahaib