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.
- 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.
- Backend: Python, FastAPI, TextBlob
- Frontend: HTML, CSS, JavaScript (vanilla, no frameworks)
- Containerization: Docker
- Orchestration: Kubernetes (Minikube-ready)
- CI/CD: GitHub Actions
├── 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
- Clone the repo
git clone https://github.com/yourusername/moodify.git cd moodify/mood-analyzer
- Install dependencies
pip install -r requirements.txt
- Run the app
uvicorn main:app --reload
- Open in browser
- Visit: http://localhost:8000
- Build the image
docker build -t sreejith777/mood-analyzer:latest .
- Run the container
docker run -p 8000:8000 sreejith777/mood-analyzer:latest
- Start Minikube
minikube start
- Apply deployment
kubectl apply -f ../k8s/mood-analyzer-deployment.yaml
- Access the app
minikube service -n moodify mood-analyzer-service
- 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.
- Run unit tests:
pytest
Sreejith P
MIT License. Feel free to use, modify, and share!
Made with ❤️ by Sreejith. Enjoy your mood and music journey!