Skip to content

orasaff/S-buddify

Repository files navigation

S-Buddify - Meet Your Musical Match

Authors and Contributors

Team Members:


Table of Contents


Project Summary

S-Buddify is a Java-based social music friend finder platform that connects users based on their musical preferences. The application integrates with Spotify's API to analyze users' listening habits and matches them with others who have similar music tastes.

What This Project Does

S-Buddify provides a comprehensive social platform where users can:

  • Connect their Spotify accounts to analyze their music taste
  • Set up a unique and personalized profiles with information and a profile picture
  • Get matched with other users based on shared musical interests
  • Create and share posts about music
  • Comment on other users posts
  • Build a social network of music enthusiasts
  • Filter potential matches based on age, location, and other preferences

Why This Project Was Made

This project was developed to solve the challenge of finding like-minded music enthusiasts in a digital age. Many music lovers struggle to discover new people who share their musical tastes, and traditional social platforms don't focus on music compatibility. S-Buddify bridges this gap by using actual listening data to create meaningful connections.

Problem It Solves

  • Music Discovery: Helps users find people with similar music tastes
  • Social Connection: Creates a community of like-minded music enthusiasts
  • Experience Sharing: Enables users to share and discuss their musical experiences, concerts, and discoveries with friends
  • Data-Driven Matching: Uses real Spotify listening data instead of self-reported preferences
  • Filtered Experience: Allows users to set preferences for age, location, and other criteria

Features

Spotify Integration

  • Automatic Profile Creation: Connects to your Spotify account to automatically populate your music preferences
  • Top Tracks Analysis: Analyzes your most-listened tracks, genres, and artists to understand your music taste

Example (programmatic usage & output)

// Example: fetch Spotify data used for matching (pseudo-usage)
SpotifyInterface spotify = session.getSpotify(); // Get the SpotifyInterface instance from the current user session
spotify.initSpotify(); // Start Spotify authentication process (opens browser for user login)
spotify.pullUserData(); // Retrieve the logged-in Spotify user's ID and display name
spotify.pullTopArtistsAndGenres(); // Retrieve the user's top artists and genres from Spotify
spotify.pullTopTracks(); // Retrieve the user's top tracks from Spotify

System.out.println("User: " + spotify.getUserName() + " (" + spotify.getUserId() + ")");
System.out.println("Top Artists: " + spotify.getTopArtists());
System.out.println("Top Tracks: " + spotify.getTopTracks());
System.out.println("Top Genres: " + spotify.getTopGenres());

Output

User: Alice (user_12345)
Top Artists: [Taylor Swift, The Weeknd, Coldplay, Joji, Ed Sheeran]
Top Tracks: [Cardigan, Blinding Lights, Yellow, Glimpse of Us, Shivers]
Top Genres: [pop, indie pop, alt-pop, pop, pop rock, indie pop]

User Matching System

  • Artist & Genre Matching: Compares users’ favourite artists and genres
  • Compatibility Scoring: Computes a numeric score from overlap in artists and genres
  • Filtered Matching: Set preferred age range, gender, and location for potential matches

Example (programmatic usage & output)

// Assume we have a logged-in session
UserSession session = ...;

// Get current user and all registered users
User currentUser = session.getUser();
List<User> allUsers = session.getAllUsers();

// Set the current user's match filter
SetupMatchFilterInteractor setupFilter = new SetupMatchFilterInteractor(
        filter -> System.out.println("Filter saved: " + filter),
        session
);
setupFilter.setupFilter(20, 30, "female", "Toronto");

// Find candidates that pass both users' filters
MatchService matchService = new MatchServiceImpl(); // no-arg constructor
List<User> candidates = matchService.findMatches(currentUser, allUsers);

// Display compatibility scores (calculated separately)
MatchCalculatorImpl calculator = new MatchCalculatorImpl();
System.out.println("=== Match Candidates ===");
for (User u : candidates) {
    int score = calculator.calculateCompatibilityScore(currentUser, u);
    System.out.println(u.getName() + " — " + score + "%");
}

Output

Filter saved: MatchFilter{minAge=20, maxAge=30, gender='female', location='Toronto'}
=== Match Candidates ===
Diana — 92%
Eric — 87%
Alice — 85%

Matching Interaction

  • Profile Browsing – View profiles of potential matches, including name, age, location, biography, and compatibility score in the matchingroom
  • Connect or Skip – Choose to connect with or skip a potential match. Clicking Connect sends a friend request to the other user's mailbox. Clicking Skip removes the other user from your matching queue
  • Handle Incoming Requests – Receive friend requests from other users in your mailbox. Click Accept to add them to your friend list, or Decline to remove them from your matching queue

Example (programmatic usage & output)

// Assume we have a logged-in session and a candidate user
UserSession session = ...;
User matchedUser = ...;  // a user from your match candidates

// Connect flow (non‑mutual): sends a friend request to matchedUser
matcher.connect(session, matchedUser);

// Skip flow: removes the user from incoming/outgoing match queues
matcher.skip(session, matchedUser);

// Simulate that 'matchedUser' has already sent a request to 'currentUser'
User currentUser = session.getUser();
matchDataAccessObject.getOutgoingFriendRequest(matchedUser).add(currentUser);

// Now connect — should immediately become friends
matcher.connect(session, matchedUser);

Output

[Presenter] Friend request sent to Diana
[Presenter] You are now friends with Diana

Note: visualization will be shown in the usage session.

Social Features

  • Post Creation: Share your thoughts about music, concerts, or new music discoveries
  • Comment System: Engage with other users' posts
  • Friend Requests: Send and manage friend requests
  • Blocking System: Block users you don't want to interact with Note: detailed example related to social features will be displayed in the Usage Guide session.

User Profiles

  • Comprehensive Profiles: Age, location, bio, and music preferences
  • Profile Pictures: Upload and manage profile images
  • Music Statistics: View your top artists, tracks, and genres
  • Privacy Controls: Manage who can see your profile Example
image

Advanced Features

  • Responsive UI: Clean, intuitive Java Swing interface

Installation Instructions

Prerequisites

Before installing S-Buddify, make sure you have the following software installed:

Installation Steps

  1. Clone the Repository

    git clone https://github.com/your-username/csc207-project.git
    cd csc207-project
  2. Verify Java Installation

    java -version
    # Should show Java version 17 or higher
  3. Verify Maven Installation

    mvn -version
    # Should show Maven version 3.6 or higher
  4. Build application

    mvn package
    
  5. Run application

    java -jar target/csc207-project-1.0-SNAPSHOT.jar 
    

Common Installation Issues & Fixes

Issue Cause Solution
java: command not found Java not installed or not in PATH Install JDK 17+ and ensure JAVA_HOME and PATH are set correctly
mvn: command not found Maven not installed or not in PATH Install Maven and add it to your PATH
UnsupportedClassVersionError Java version too low Upgrade to JDK 17 or higher
Spotify login window doesn’t open Default browser misconfigured Set a default browser in your OS settings and try again
java.net.UnknownHostException No internet connection Check your network and retry

Example: Full Installation on macOS

  1. Install Java 17 via Homebrew:

    brew install openjdk@17
    brew link --force --overwrite openjdk@17
  2. Install Maven:

    brew install maven
  3. Clone and Build:

    git clone https://github.com/your-username/csc207-project.git
    cd csc207-project
    mvn package
  4. Run:

    java -jar target/csc207-project-1.0-SNAPSHOT.jar

Usage Guide

Getting Started

  1. Launch the Application

    • Run the application by running Main
    • The window will appear with Login View
  2. Connect Spotify

    • Click "Continue With Spotify"
    • A browser window will open for Spotify authorization
    • Login to Spotify and grant permissions to access your listening data Login Demo
  3. Setup Your Profile

    • Sign up and login
    • Fill in your basic information (name, age, location)
    • Upload a profile picture to your account (Optional) Set Up Profile Demo
  4. Set Up Match Filters

    • Configure your matching preferences (age range, location, etc.)
    • These filters will help find compatible matches Set Up Match Filter

Using the Matching System

  1. Access Matching Room

    • Navigate to the "Matching" section
    • View potential matches based on your preferences
    • Connect or Skip potential matches
  2. Browse Profiles

    • See compatibility scores with each potential match
    • View the matched user's basic info Matching Flow Demo
  3. Send Friend Requests

    • Click the Connect button to send connection requests
    • Manage incoming and outgoing requests Handle Connect Request Demo

Creating and Sharing Posts

  1. Create a Post

    • Navigate to the "Share" section
    • Write about music, concerts, or discoveries
    • Add images if desired post
  2. Engage with Posts

    • Browse posts from other users
    • Add comments and interact with the community post

Managing Your Profile

  1. Update Profile

    • Access your profile through "My Profile"
    • Update personal information and preferences editprofile
  2. Privacy Settings

    • Control who can see your profile
    • Manage friend and block lists block

Architecture Overview

S-Buddify follows the Clean Architecture pattern with clear separation of concerns:

src/
├── main/
│   └── java/
│       └── app/
│           ├── entities/                  # Core business logic, independent of external dependencies
│           │   ├── Comment/              
│           │   ├── Match/
│           │   ├── MatchFilter/
│           │   ├── Post/
│           │   ├── User/
│           │   └── UserSession/           
│           ├── usecase/                   # Application-specific business rules
│           │   ├── add_comment/           # Individual use cases organized by features
│           │   ├── add_friend_list/
│           │   ├── create_account/
│           │   ├── create_post/
│           │   └── ...

│           ├── interface_adapter/         # Transform data between use cases and UI
│           │   ├── controller/
│           │   ├── presenter/
│           │   └── viewmodel/
│           ├── frameworks_and_drivers/    # External systems (UI, data access, APIs)
│           │   ├── view/                  # Java Swing GUI components
│           │   ├── data_access/          # In-memory and persistent data access
│           │   └── external/
│           │       └── spotify/          # Spotify API integration
│           └── Main.java                 # Application entry point
│
├── test/
│   └── java/
│       └── app/
│           ├── entity_tests/              # Unit tests for entity classes
│           ├── usecase_tests/             # Unit tests for use case interactors 
│           └── Spotify/                   # Tests for external spotify

Key Technologies

  • Java 17: Programming language
  • Java Swing: User interface framework
  • Maven: Build and dependency management
  • JUnit 5: Testing framework
  • Spotify Web API: Music data integration
  • JSON: Data handling

Feedback

We welcome constructive feedback to help improve S-Buddify.

  1. How to Give Feedback

  2. What Counts as Valid Feedback

    • Reports of bugs, crashes, or unexpected behaviour
    • Suggestions for new features or improvements
    • Usability feedback (e.g., UI, navigation)
    • Performance issues or API integration problems
  3. Guidelines for Feedback

    • Be as specific as possible (steps to reproduce bugs, screenshots, error logs)
    • Include your operating system, Java version, and internet connection type if relevant
    • Be respectful and constructive — personal attacks or inappropriate language will be ignored
  4. What to Expect After Submitting Feedback

    • You will receive an acknowledgement within 3 business days
    • Valid bug reports will be logged in our GitHub Issues tracker
    • Feature suggestions will be reviewed in our weekly team meeting and may be added to the roadmap
    • You may be contacted for follow-up questions if clarification is needed

Contributing

We welcome contributions from the community! Whether it's fixing bugs, improving documentation, or adding new features, your help makes S-Buddify better.

How to Contribute

  1. Fork the Repository Click the Fork button at the top right of the project repository

  2. Clone Your Fork

    git clone https://github.com/your-username/csc207-project.git
    cd csc207-project
  3. Create a New Branch

    git checkout -b feature/your-feature-name
  4. Make Changes Follow our code style guidelines (style-check.sh & format-check.sh must pass) Write unit tests for new functionality

  5. Commit and Push

    git add .
    git commit -m "Add: Description of changes"
    git push origin feature/your-feature-name
  6. Open a Pull Request (PR) Go to your fork on GitHub and click New pull request Provide a clear description of your changes and why they are needed

  7. Review & Merge Process One team member will review your PR within 5 business days Reviewer may request changes — please address them promptly Once approved, a maintainer will squash & merge your PR into main Larger features may be merged into a staging branch before release

License

This project is licensed under the MIT License.
You are free to use, copy, modify, and distribute this code for academic and personal use, under the terms of the license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors