Skip to content

sreejith-p1/moodify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moodify - Mood Analyzer & Music Recommender 🎵😊

Welcome to Moodify! This application analyzes your mood from text and suggests music to match your feelings, with direct links to YouTube and Spotify. Built with FastAPI, modern frontend, and ready for cloud-native deployment.


🌟 Preview


🚀 Features

  • Mood Analysis: Enter how you feel, and get your mood detected using NLP (TextBlob).
  • Music Suggestions: Get curated song recommendations for your mood.
  • Direct Play: Click to listen instantly on YouTube or Spotify.
  • Modern UI: Beautiful, responsive, and interactive web interface.
  • API-First: FastAPI backend with OpenAPI docs.
  • Containerized: Docker-ready, Kubernetes manifests included.
  • CI/CD: Automated build and Docker Hub push via GitHub Actions.

🛠️ Tech Stack

  • Backend: Python, FastAPI, TextBlob
  • Frontend: HTML, CSS, JavaScript (vanilla, no frameworks)
  • Containerization: Docker
  • Orchestration: Kubernetes (Minikube-ready)
  • CI/CD: GitHub Actions

📦 Project Structure

├── mood-analyzer/
│   ├── main.py              # FastAPI backend
│   ├── requirements.txt     # Python dependencies
│   ├── Dockerfile           # Docker build
│   ├── templates/
│   │   └── index.html       # Modern frontend
│   └── tests/               # Unit tests
├── k8s/
│   └── mood-analyzer-deployment.yaml  # Kubernetes manifests
└── .github/workflows/
    └── mood-analyzer.yml    # CI/CD pipeline

📝 How to Run Locally

  1. Clone the repo
    git clone https://github.com/yourusername/moodify.git
    cd moodify/mood-analyzer
  2. Install dependencies
    pip install -r requirements.txt
  3. Run the app
    uvicorn main:app --reload
  4. Open in browser

🐳 Docker

  1. Build the image
    docker build -t sreejith777/mood-analyzer:latest .
  2. Run the container
    docker run -p 8000:8000 sreejith777/mood-analyzer:latest

☸️ Kubernetes (Minikube)

  1. Start Minikube
    minikube start
  2. Apply deployment
    kubectl apply -f ../k8s/mood-analyzer-deployment.yaml
  3. Access the app
    minikube service -n moodify mood-analyzer-service

🤖 CI/CD

  • On every push to main, GitHub Actions builds and pushes the Docker image to Docker Hub.
  • Secrets (DOCKERHUB_USERNAME, DOCKERHUB_TOKEN) are used for authentication.

🧪 Testing

  • Run unit tests:
    pytest

👨‍💻 Developed By

Sreejith P


📄 License

MIT License. Feel free to use, modify, and share!


Made with ❤️ by Sreejith. Enjoy your mood and music journey!