Skip to content

LTPPPP/Brainify-app

Repository files navigation

🎵 Brainify - Premium Music Streaming Platform

Brainify Logo

A modern, feature-rich Android music streaming application built with Java, offering a comprehensive music discovery and playback experience with social features, admin management, and real-time chat support.

📋 Table of Contents

✨ Features

🎵 Core Music Features

  • Music Streaming: Stream millions of songs with high-quality audio playback
  • Smart Playback: Queue management, shuffle, repeat modes
  • Now Playing: Full-featured player with lyrics support
  • Browse & Discover: Explore songs by genre, artist, and album
  • Search: Advanced search functionality across all content
  • Library Management: Personal library with liked songs and custom playlists
  • Playlist Creation: Create, edit, and share playlists
  • Album & Artist Pages: Detailed views with discography

👤 User Features

  • Authentication: Email/password registration and login
  • Google Sign-In: One-tap authentication with Google accounts
  • User Profile: Customizable profiles with preferences
  • Notifications: Real-time notifications for new releases and updates
  • Settings: Comprehensive app settings and preferences
  • Help Center: In-app support with chat functionality

💬 Social & Communication

  • Real-time Chat: Direct messaging between users and admins
  • Admin Chat Support: Dedicated support channel for user assistance
  • User Chat: Peer-to-peer communication
  • Notification System: Push notifications for new songs, albums, and shared content

🔧 Admin Features

  • Song Management: Add, edit, and manage song catalog
  • Album Management: Create and manage album collections
  • User Support: Admin chat interface for customer support
  • Dashboard: Administrative dashboard for content management

🗺️ Additional Features

  • Location Services: OpenStreetMap integration for location-based features
  • Offline Mode: Download songs for offline listening (Premium)
  • Equalizer: Built-in audio equalizer for sound customization
  • Onboarding: Interactive user onboarding experience

🛠️ Technology Stack

Core Technologies

  • Platform: Android (API 26+)
  • Language: Java 11
  • Build System: Gradle
  • Min SDK: 26 (Android 8.0)
  • Target SDK: 36 (Android 14)
  • Compile SDK: 36

Libraries & Frameworks

  • UI: Material Design Components, ConstraintLayout
  • Architecture: MVVM (Model-View-ViewModel)
  • Database:
    • Room Database (local caching)
    • SQL Server (remote database via JDBC)
  • Networking:
    • Retrofit 2 (REST API)
    • OkHttp (HTTP client with logging)
    • Gson (JSON serialization)
  • Authentication: Google Sign-In (Play Services Auth)
  • Maps: OSMDroid (OpenStreetMap integration)
  • Image Loading: Glide
  • Email: JavaMail API (SMTP)
  • UI Components:
    • Vertical SeekBar
    • CircleImageView
    • Navigation Component
    • SwipeRefreshLayout

🏗️ Architecture

The application follows the MVVM (Model-View-ViewModel) architecture pattern:

  • Model: Data models and repositories for data access
  • View: Activities, Fragments, and XML layouts
  • ViewModel: Business logic and state management
  • Repository Pattern: Abstraction layer for data sources

Key Components

  • Activities: UI controllers for different screens
  • Fragments: Reusable UI components
  • Adapters: RecyclerView adapters for lists
  • Services: Background services for music playback and notifications
  • Managers: Utility classes for authentication, playback queue, etc.
  • Repositories: Data access layer abstraction
  • Utils: Helper classes for database, network, and other utilities

📦 Project Structure

app/
├── src/main/
│   ├── java/com/example/brainify/
│   │   ├── activities/          # Activity classes
│   │   ├── adapters/            # RecyclerView adapters
│   │   ├── config/              # Configuration classes
│   │   ├── fragments/           # Fragment classes
│   │   ├── managers/            # Manager classes
│   │   ├── models/              # Data models
│   │   ├── notifications/       # Notification components
│   │   ├── repositories/        # Repository implementations
│   │   ├── services/            # Background services
│   │   ├── utils/               # Utility classes
│   │   └── MainActivity.java    # Main activity
│   ├── res/
│   │   ├── layout/              # XML layouts
│   │   ├── drawable/            # Icons and images
│   │   ├── values/              # Strings, colors, styles
│   │   ├── xml/                 # XML configurations
│   │   └── mipmap/              # App icons
│   └── AndroidManifest.xml
├── build.gradle                 # App dependencies
├── proguard-rules.pro          # ProGuard rules
└── libs/                        # Local JAR libraries
    └── jtds-1.3.1.jar          # jTDS SQL Server driver

database/
├── docker-compose.yml          # Docker setup for SQL Server
├── main.sql                    # Main database schema
└── prod.sql                    # Production database schema

build.gradle                    # Root build configuration
gradle.properties               # Gradle properties
settings.gradle                 # Project settings

📋 Prerequisites

Before you begin, ensure you have the following installed:

  • Android Studio: Arctic Fox or later (recommended: latest stable version)
  • JDK: Version 11 or higher
  • Android SDK:
    • API Level 26 (Android 8.0) minimum
    • API Level 36 (Android 14) target
  • Git: For version control
  • Docker (optional): For local database setup

🚀 Installation

1. Clone the Repository

git clone <repository-url>
cd final

2. Open in Android Studio

  1. Launch Android Studio
  2. Select File → Open
  3. Navigate to the project directory
  4. Click OK to import the project

3. Sync Dependencies

Android Studio will automatically sync Gradle dependencies. If not, manually trigger:

./gradlew build

Or use Android Studio's File → Sync Project with Gradle Files

4. Configure Environment Variables

Create a local.properties file in the root directory (if not present):

sdk.dir=/path/to/your/android/sdk

For Google Sign-In, configure one of the following:

Option 1: Environment Variable

export GOOGLE_WEB_CLIENT_ID="your-google-client-id"

Option 2: .env File (create in root directory)

GOOGLE_WEB_CLIENT_ID=your-google-client-id

Option 3: local.properties

GOOGLE_WEB_CLIENT_ID=your-google-client-id

⚙️ Configuration

Database Configuration

The application connects to a SQL Server database. Configure connection settings in:

  • app/src/main/java/com/example/brainify/config/DatabaseConfig.java
  • app/src/main/java/com/example/brainify/utils/DatabaseConnectionUtil.java

Network Configuration

Network settings can be configured in:

  • app/src/main/java/com/example/brainify/config/NetworkConfig.java
  • app/src/main/res/xml/network_security_config.xml

Build Configuration

Key build settings in app/build.gradle:

android {
    namespace 'com.example.brainify'
    compileSdk 36

    defaultConfig {
        applicationId "com.example.brainify"
        minSdk 26
        targetSdk 36
        versionCode 1
        versionName "1.0"
    }
}

🗄️ Database Setup

Option 1: Docker (Recommended for Development)

  1. Navigate to the database directory:
cd database
  1. Create a .env file with your database credentials:
SA_PASSWORD=YourStrongPassword123!
MSSQL_PID=Developer
DATABASE_NAME=BrainifyDB
SQL_SERVER_PORT=1433
  1. Start the SQL Server container:
docker-compose up -d
  1. Wait for the database to initialize (check logs):
docker-compose logs -f

Option 2: Remote SQL Server

  1. Ensure your SQL Server is accessible from your development machine
  2. Update connection strings in the configuration files
  3. Run the SQL scripts in the database directory:
    • main.sql for development
    • prod.sql for production

🏃 Build & Run

Build the Project

# Debug build
./gradlew assembleDebug

# Release build
./gradlew assembleRelease

Install on Device/Emulator

# Install debug APK
./gradlew installDebug

# Or use Android Studio:
# Click Run button or press Shift+F10

Generate APK

# Debug APK location
app/build/outputs/apk/debug/app-debug.apk

# Release APK location (after signing)
app/build/outputs/apk/release/app-release.apk

🔌 API Integration

The application uses RESTful APIs for backend communication. API endpoints are configured in:

  • app/src/main/java/com/example/brainify/config/NetworkConfig.java
  • Retrofit service interfaces in the services package

Key API Services

  • Authentication API: User registration, login, password reset
  • Music API: Song, album, artist data
  • Playlist API: Playlist management
  • Chat API: Real-time messaging
  • Notification API: Push notifications

🧪 Testing

Run tests using:

# Unit tests
./gradlew test

# Instrumented tests
./gradlew connectedAndroidTest

📱 Key Activities

  • SplashActivity: App launch screen
  • OnboardingActivity: First-time user experience
  • SignInActivity / SignUpActivity: Authentication
  • MainActivity: Home screen with music library
  • NowPlayingActivity: Music player interface
  • BrowseActivity: Music discovery
  • SearchActivity: Search functionality
  • ProfileActivity: User profile management
  • SettingsActivity: App settings
  • ChatActivity: Messaging interface
  • AdminSongManagementActivity: Admin content management

🐛 Known Issues

  • Room database integration may require additional configuration for full functionality
  • Some features may require backend API endpoints to be fully configured
  • Location services require proper permissions and device location enabled

🔮 Future Enhancements

Planned Features

  • Enhanced offline mode with better caching
  • Social features: follow artists, share playlists
  • Advanced recommendation engine
  • Podcast support
  • Music video playback
  • Cross-platform synchronization
  • Voice commands integration

Technical Improvements

  • Migration to Kotlin
  • Jetpack Compose UI
  • Enhanced error handling
  • Performance optimizations
  • Comprehensive test coverage

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/AmazingFeature
  3. Commit your changes:
    git commit -m 'Add some AmazingFeature'
  4. Push to the branch:
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Code Style Guidelines

  • Follow Java coding conventions
  • Use meaningful variable and method names
  • Add comments for complex logic
  • Maintain consistent formatting
  • Write unit tests for new features

📄 License

This project is distributed under the MIT License. See the LICENSE file for more information.

📞 Contact & Support

  • Project: Brainify Music Streaming Platform
  • Issues: Please use GitHub Issues for bug reports and feature requests
  • Documentation: Check the doc/ directory for additional documentation

🙏 Acknowledgments

  • Material Design Components
  • OpenStreetMap for free mapping services
  • All open-source libraries and frameworks used in this project

If you find this project useful, please consider giving it a star!

About

A modern, feature-rich Android music streaming application built with Java, offering a comprehensive music discovery and playback experience with social features, admin management, and real-time chat support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors