MovieMood is a sophisticated rule-based expert system that provides personalized movie recommendations using advanced AI inference with 15+ intelligent rules. Built with React, TypeScript, Framer Motion, and Node.js.
- 15+ Intelligent Rules: Comprehensive rule-based inference engine
- Forward Chaining: Advanced AI reasoning with scoring system
- Multi-Factor Analysis: Mood, genres, duration, audience, occasion, and more
- Transparent Reasoning: See exactly why each movie was recommended
- Movie-Inspired Design: Netflix-style interface with glassmorphism effects
- Smooth Animations: Beautiful Framer Motion transitions and micro-interactions
- Responsive Design: Optimized for all devices (mobile to desktop)
- Interactive Elements: Hover effects, staggered animations, and loading states
- Personalized Scoring: Each movie gets a compatibility score (0-100%)
- Detailed Explanations: Understand why each movie was recommended
- Rule Transparency: See which of the 15+ rules fired for each recommendation
- Top 5 Results: Best matches ranked by AI analysis
- Node.js (v16+)
- npm or yarn
-
Clone the repository
git clone <repository-url> cd moviemood-expert-system
-
Install dependencies
npm install
-
Start the application
npm run dev
This will start both the frontend (Vite) and backend (Express) servers concurrently:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3001
src/
βββ components/
β βββ PreferenceForm.tsx # Interactive form with cinematic design
β βββ MovieCard.tsx # Expandable movie cards with animations
β βββ RecommendationResults.tsx # Results grid with statistics
β βββ LoadingAnimation.tsx # Film reel loading animation
βββ hooks/
β βββ useMovieRecommendations.ts # Custom hook for API calls
βββ types/
β βββ types.ts # TypeScript interfaces
βββ utils/
β βββ api.ts # API utility functions
βββ App.tsx # Main application component
server/
βββ engine/
β βββ Rules.js # Expert system inference engine
βββ data/
β βββ movies.json # Curated movie database (20+ movies)
βββ server.js # Express API server
The AI uses 15+ sophisticated rules to analyze your preferences:
- Mood-Genre Harmony - Matches your mood to appropriate genres
- Genre Preference Match - Weights selected genres heavily
- Duration Sweet Spot - Finds movies matching your time preference
- Audience Compatibility - Ensures appropriate rating for your audience
- Occasion Appropriateness - Matches movies to specific occasions
- Intent Alignment - Aligns with your viewing goal (entertainment, education, etc.)
- Rating Preference - Filters by quality standards (IMDB rating)
- Decade Nostalgia - Considers era preferences
- Energy Level Match - Matches your current energy level
- Time of Day Suitability - Considers optimal viewing time
- High Rewatchability Bonus - Boosts classics you can watch multiple times
- Director's Signature Style - Recognizes auteur directors
- Critical Acclaim Bonus - Rewards critically acclaimed films
- Mood-Energy Synergy - Combines mood and energy for perfect matches
- Genre Diversity Bonus - Rewards multi-genre storytelling
- Primary: Purple gradients (
from-purple-600 to-pink-600) - Background: Dark gradients (
from-gray-900 via-purple-900 to-gray-900) - Cards: Glassmorphism with
backdrop-blur-xleffects - Accents: Purple/pink gradient text and borders
- Headlines: Bold, gradient text with cinematic feel
- Body: Clean, readable typography with proper hierarchy
- Interactive: Hover states with scale and glow effects
- Loading: Spinning film reel with floating particles
- Cards: Staggered entrance animations and hover effects
- Form: Smooth transitions between form steps
- Results: Sequential reveal of recommendation cards
The system includes 22+ carefully curated movies spanning multiple decades and genres:
- Classics: Pulp Fiction, The Shining, Goodfellas
- Modern Hits: Inception, Parasite, Knives Out
- Animation: Spirited Away, Coco, Finding Nemo
- Action: Mad Max: Fury Road, John Wick
- Romance: Her, La La Land, Eternal Sunshine
- Family: The Princess Bride, The Incredibles
Each movie includes:
- Basic info (title, genres, duration, rating, decade)
- Quality metrics (IMDB rating, director, cast)
- AI tags (mood fit, occasions, energy level, time of day)
- Rich metadata for rule matching
Get personalized movie recommendations based on user preferences.
Request Body:
{
"mood": "excited",
"genres": ["Action", "Sci-Fi"],
"duration": "medium",
"audience": "adults",
"occasion": "movie night",
"intent": "entertainment",
"ratingPreference": "great",
"decade": "2010s",
"energyLevel": "high",
"timeOfDay": "evening"
}Response:
{
"success": true,
"count": 5,
"recommendations": [
{
"movie": { /* Movie object */ },
"score": 89,
"reasons": ["Perfect mood match...", "Genre match..."],
"firedRules": ["Mood-Genre Harmony", "Genre Preference Match"]
}
]
}Get all available options for the preference form.
Health check endpoint with system status.
The heart of MovieMood is a sophisticated inference engine that:
- Evaluates each movie against 15+ intelligent rules
- Assigns weighted scores based on rule matches
- Provides transparent explanations for each recommendation
- Uses forward chaining to build comprehensive movie profiles
Every interaction is designed to feel like using a premium streaming service:
- Smooth animations using Framer Motion
- Glassmorphism design with backdrop blur effects
- Interactive hover states and micro-interactions
- Responsive design that works beautifully on all devices
Movies receive compatibility scores (0-100%) based on:
- How many rules they match
- The weight/importance of each matched rule
- Quality factors (IMDB rating, critical acclaim)
- Personal preference alignment
npm run dev # Starts both frontend and backendnpm run build # Builds optimized frontend
npm run server # Starts production backendThe system works out of the box with no configuration required. The frontend automatically connects to the backend on port 3001.
- 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.
- Framer Motion for beautiful animations
- Tailwind CSS for rapid styling
- Lucide React for beautiful icons
- Express.js for robust backend API
- Pexels for movie poster placeholder images
Nduoma Chinomso Christian
AKA Buzz brain
Built with β€οΈ for movie lovers everywhere πΏ



