Skip to content
M

Moodflix

Your mood, your movie

Created on 27th March 2026

•

M

Moodflix

Your mood, your movie

The problem Moodflix solves

🎯 The Problem

Finding the right movie or web series to watch is harder than it should be.

Traditional platforms like Netflix and Prime Video rely on rigid filters — genre, language, year — but none of them understand how you're actually feeling. You don't always know what genre you want. Sometimes you just know you're sad, or excited, or you want something "like Dangal but more intense."

MoodFlix solves this by replacing filters with conversation.

What people struggle with today:

  • Decision fatigue — scrolling endlessly without finding anything
  • No mood-based discovery — platforms don't understand emotions
  • Generic recommendations — same popular titles shown to everyone
  • No social watching — can't watch together with friends remotely
  • No learning system — recommendations don't improve based on your taste

How MoodFlix fixes it:

  • 🤖 Just type how you feel — AI understands natural language like "I want something inspiring like Dangal" or "sad but action-packed"
  • 🧠 Gets smarter over time — marks movies as watched, system learns your genre preferences automatically
  • 🎉 Watch together — real-time Watch Party with synchronized playback and live chat
  • 📊 Transparent AI — shows you exactly what prompt was used and why recommendations were made
  • 🔄 Never repeats — remembers what it already suggested and avoids repetition

Whether you're a student unwinding after exams, a family choosing a movie night film, or friends watching together from different cities — MoodFlix makes the experience effortless, personal, and social.

Challenges we ran into

🧱 Challenges & How We Overcame Them

1. AI Giving Unstructured Responses

Problem: The AI would sometimes return plain text instead of the structured JSON we needed to display movie cards, ratings, and mood tags properly.

Solution: We engineered a strict system prompt that forces JSON output with a specific schema. We also added a try-catch JSON parser with a graceful fallback so even if parsing fails, the user still sees a response instead of a broken screen.


2. Tailwind CSS v4 Breaking Everything

Problem: create-next-app installed Tailwind v4 which completely changed the configuration format. The entire CSS pipeline broke on the first npm run dev, causing the PC to lag and crash.

Solution: Downgraded to Tailwind v3, regenerated the PostCSS config, and replaced the @import "tailwindcss" v4 syntax with the standard @tailwind base/components/utilities directives.


3. TMDB API Failing During Build

Problem: Next.js tried to pre-render the homepage at build time, calling the TMDB API server-side. The network blocked this, causing ECONNRESET and ETIMEDOUT errors on every build.

Solution: Converted all data-fetching pages from server components to client components using useEffect, so API calls happen in the browser after page load instead of at build time.


4. Watch Party Not Syncing

Problem: Socket.io requires a persistent server connection, but Next.js API routes are stateless and serverless — they terminate after each request. This meant rooms couldn't maintain state and users couldn't see each other.

Solution: Built a completely separate custom Node.js server (server.js) that runs alongside Next.js, handles all Socket.io connections, and maintains room state in memory. Changed npm run dev and npm start to use node server.js instead of the default Next.js CLI.


5. AI API Rate Limits & Costs

Problem: The Anthropic Claude API had zero credits, and Google Gemini's free tier had a quota of 0 requests — both failed in production.

Solution: Switched to Groq API (completely free, extremely fast with LLaMA 3.3 70B) and implemented a fallback mechanism — if the AI API fails for any reason, the system automatically shows 5 hardcoded all-time classic recommendations instead of showing an error.


6. Self-Learning Recommendation Engine

Problem: Building a system that actually gets smarter based on user behavior — not just storing preferences but actively using them to change AI output — was architecturally complex.

Solution: Built a genre_weights table in Supabase that increments a counter every time a user marks a movie as watched. These weights are injected directly into the AI system prompt so the model is explicitly told "this user has watched Thriller 5 times, prioritize Thriller heavily." The more you watch, the more personalized the AI becomes.

Tracks Applied (1)

OPEN INNOVATION

🚀 How MoodFlix Fits the Open Innovation Track The Open Innovation track challenges builders to create solutions that p...Read More

Discussion

Builders also viewed

See more projects on Devfolio