Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MoodMate Study 🎯🎧

MoodMate Study is a Flutter-based mobile app that helps students study smarter by understanding how they feel. It detects the user's mood from text input, recommends music that matches that mood, and pairs it with a built-in focus timer and analytics dashboard — all in one place.

The idea is simple: your emotional state affects how well you focus. MoodMate Study bridges the gap between how you feel and how you study, by combining mood detection, mood-based music, and productivity tracking into a single, seamless experience.


✨ Features

🧠 Mood Detection

Users can type how they're feeling in natural language, and the app analyzes the text using a pre-trained emotion classification model (via the Hugging Face Inference API) to detect emotions like joy, sadness, anger, fear, and more.

🎵 Mood-Based Music Recommendation

Based on the detected mood, the app fetches and recommends music tracks using the Jamendo API — a royalty-free music platform. Users can also search for songs by name, artist, or album. Playback is handled in-app using the audioplayers package.

⏱️ Focus Timer

A built-in Pomodoro-style focus timer helps users stay on track during study sessions. Session data (duration, completion status) is saved locally for later review.

📊 Analytics Dashboard

Visualizes mood trends and study session history over time, giving users insight into how their mood correlates with their productivity.

💾 Offline-First Local Storage

All user data — mood logs, session history, and preferences — is stored locally on-device using SQFlite, so the app works reliably without needing constant internet access (except for API calls to fetch mood analysis and music).


🏗️ Architecture

The app is built following Clean Architecture principles, separating concerns into distinct layers for better scalability, testability, and maintainability.

lib/
├── data/
│   ├── controllers/       # Business logic controllers
│   ├── models/             # Data models (e.g., Song, Mood)
│   └── repositories/       # Data layer — talks to services & local DB
├── presentation/
│   ├── providers/           # State management (Provider)
│   └── screens/             # UI screens
├── services/                 # External API integrations (Jamendo, Hugging Face)
└── main.dart

State Management: Provider Local Database: SQFlite External APIs: Hugging Face Inference API (mood detection), Jamendo API (music)


🛠️ Tech Stack

Category Technology
Framework Flutter / Dart
State Management Provider
Local Database SQFlite
Mood Detection API Hugging Face Inference API
Music API Jamendo API
Audio Playback audioplayers
HTTP Client http
Environment Config flutter_dotenv

📱 Screens

  • Home Screen — Overview and quick navigation
  • Mood Detection Screen — Input text and get mood analysis
  • Music Recommendation Screen — Mood-based song suggestions with search
  • Focus Timer Screen — Start, pause, and track study sessions
  • Analytics Screen — Charts and trends for mood + study data
  • Profile Screen — User preferences and settings

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/Amanshrivastab/moodmate_study.git
    cd moodmate_study
  2. Install dependencies

    flutter pub get
  3. Set up environment variables

    Create a project.env file in the project root (refer to project.env.example for the required format):

    JAMENDO_CLIENT_ID=your_jamendo_client_id_here
    HUGGINGFACE_API_TOKEN=your_huggingface_api_token_here
    

    ⚠️ Never commit your real project.env file. It's already excluded via .gitignore.

  4. Run the app

    flutter run

🔐 Environment Variables

Variable Description
JAMENDO_CLIENT_ID Client ID for accessing the Jamendo music API
HUGGINGFACE_API_TOKEN Access token for calling the Hugging Face Inference API (mood detection model)

📌 Project Status

MoodMate Study was originally built as a B.Tech final year project and is actively being improved — including additional analytics features, UI polish, and refined mood-detection accuracy.


🤝 Contributing

This is currently a solo learning project, but suggestions and feedback are always welcome via Issues or Pull Requests.


📄 License

This project is open for learning and educational purposes.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages