Skip to content

imdeepakyadav/HeyPlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

๐ŸŽต HeyPlay

Sync. Stream. Enjoy Together.

MIT License Node.js Version React Native Next.js TypeScript

A comprehensive cross-platform application for synchronized music and video streaming with real-time social features.

Features โ€ข Quick Start โ€ข Documentation โ€ข Contributing โ€ข Support


๐ŸŒŸ Overview

HeyPlay is a modern, full-stack application that revolutionizes how people experience media together. Create rooms, invite friends, and enjoy perfectly synchronized music and video playback across all devices. Built with cutting-edge technology and designed for seamless cross-platform experience.

๐ŸŽฏ Key Highlights

  • ๐Ÿ”„ Real-time Synchronization: Perfect sync across all connected devices
  • ๐Ÿ“ฑ Cross-Platform: Web (Next.js), Mobile (React Native), with shared backend
  • ๐ŸŽต Multi-Source: Support for YouTube, Spotify, and custom media
  • ๐Ÿ’ฌ Social Features: Live chat, reactions, and collaborative playlists
  • ๐Ÿ” Secure Authentication: JWT-based with email verification and OTP
  • ๐ŸŽจ Modern UI: Beautiful, responsive design with dark/light themes
  • ๐Ÿš€ Production Ready: Full deployment setup and monitoringay

Sync. Stream. Enjoy Together.

Overview

HeyPlay is a comprehensive cross-platform application that allows users to create rooms, invite friends, and enjoy synchronized music and video playback together. Built with React Native for mobile (iOS & Android) and Next.js for web, featuring real-time synchronization, chat, reactions, and background music playback.

โœจ Features

๐ŸŽต Core Media Features

  • Room-Based Experience: Create public/private rooms with password protection
  • Real-time Synchronization: Perfectly synchronized playbook across all connected devices
  • Background Playback: Continue listening when minimized (mobile)
  • Multi-Platform Streaming: YouTube, Spotify, and custom media support
  • Collaborative Playlists: Build and manage playlists together
  • Advanced Controls: Play, pause, seek, skip with role-based permissions

๐Ÿ‘ฅ Social & Communication

  • Live Chat: Real-time messaging within rooms
  • Emoji Reactions: Express yourself with emoji reactions
  • User Roles: Admin, moderator, and participant permissions
  • Profile Management: Customizable user profiles and preferences
  • Participant Tracking: See who's listening in real-time

๏ฟฝ Authentication & Security

  • Email Verification: OTP-based email verification system
  • JWT Authentication: Secure token-based authentication
  • Session Management: Automatic token refresh and session cleanup
  • Account Security: Login attempt tracking and account locking
  • Password Reset: Secure password reset via email OTP

๏ฟฝ๏ธ Technical Features

  • WebSocket Communication: Real-time updates via Socket.io
  • Responsive Design: Seamless experience across all screen sizes
  • Offline Support: Cache management for better performance
  • Error Handling: Comprehensive error management and user feedback
  • API Integration: RESTful API with comprehensive endpoint coverage

๐Ÿ—๏ธ Technology Stack

๐Ÿ–ฅ๏ธ Backend

Node.js + Express    โ”‚ Server framework
MongoDB + Mongoose   โ”‚ Database and ODM
Socket.io           โ”‚ Real-time communication
JWT + bcryptjs      โ”‚ Authentication & security
Nodemailer          โ”‚ Email services
Node-cron           โ”‚ Background tasks

๐ŸŒ Web Frontend

Next.js 15          โ”‚ React framework with App Router
React 19            โ”‚ Latest React with concurrent features
TypeScript          โ”‚ Type safety and development experience
Tailwind CSS        โ”‚ Utility-first styling
Framer Motion       โ”‚ Smooth animations
Heroicons           โ”‚ Beautiful icon library
React Hot Toast     โ”‚ User notifications

๐Ÿ“ฑ Mobile Frontend

React Native 0.76   โ”‚ Native mobile development
Expo 52             โ”‚ Development platform and tools
TypeScript          โ”‚ Type safety across platforms
React Navigation 7  โ”‚ Navigation and routing
Track Player        โ”‚ Background audio playback
AsyncStorage        โ”‚ Local data persistence
Vector Icons        โ”‚ Comprehensive icon set

๐Ÿ› ๏ธ Development & DevOps

ESLint + Prettier   โ”‚ Code quality and formatting
Nodemon             โ”‚ Development server
Expo CLI            โ”‚ Mobile development tools
MongoDB Atlas       โ”‚ Cloud database
GitHub Actions      โ”‚ CI/CD pipeline (coming soon)

๐Ÿš€ Quick Start

๐Ÿ“‹ Prerequisites

Ensure you have the following installed:

  • Node.js (v18.0.0 or higher) - Download
  • MongoDB (local installation or MongoDB Atlas account) - Setup Guide
  • Git - Download
  • Expo CLI (for mobile development) - npm install -g @expo/cli

โšก Quick Setup (Recommended)

  1. Clone the repository

    git clone https://github.com/imdeepakyadav/HeyPlay.git
    cd HeyPlay
  2. Install dependencies for all platforms

    # Install backend dependencies
    cd backend && npm install
    
    # Install web dependencies
    cd ../web && npm install
    
    # Install mobile dependencies
    cd ../mobile && npm install
  3. Set up environment variables

    # Backend environment
    cd ../backend
    cp .env.example .env
    # Edit .env with your configuration (see Environment Setup below)
  4. Start all services

    # Terminal 1 - Backend (from /backend)
    npm run dev
    
    # Terminal 2 - Web App (from /web)
    npm run dev
    
    # Terminal 3 - Mobile App (from /mobile)
    npm start
  5. Access the applications

๐Ÿ”ง Environment Setup

Create these environment files with your configuration:

Backend .env

# Database
MONGODB_URI=mongodb://localhost:27017/heyplay

# JWT Secrets (generate strong secrets for production)
JWT_SECRET=your_super_secret_jwt_key_here
JWT_REFRESH_SECRET=your_refresh_secret_key_here

# Server Configuration
PORT=5000
CORS_ORIGINS=http://localhost:3000,exp://localhost:19000

# Email Configuration (Gmail example)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password
EMAIL_FROM_NAME=HeyPlay
EMAIL_FROM_ADDRESS=noreply@heyplay.com

# Client URL
CLIENT_URL=http://localhost:3000

# API Keys (optional)
YOUTUBE_API_KEY=your_youtube_api_key
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret

Web .env.local

NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_SOCKET_URL=http://localhost:5000

Mobile Configuration

Update mobile/src/config/constants.ts:

export const API_BASE_URL = __DEV__
  ? "http://localhost:5000"
  : "https://your-production-api.com";

๐Ÿ–ฅ๏ธ Development

๐Ÿƒโ€โ™‚๏ธ Running the Application

  1. Start MongoDB (if using local installation)

  2. Start Backend Server:

    cd backend
    npm run dev
    # Server runs on http://localhost:5000
  3. Start Web Application:

    cd web
    npm run dev
    # Web app runs on http://localhost:3000
  4. Start Mobile Application:

    cd mobile
    npm start
    # Scan QR code with Expo Go app

๐Ÿ”— Available URLs

๐Ÿงช Testing

# Backend tests
cd backend && npm test

# Web tests
cd web && npm run test

# Mobile tests
cd mobile && npm test

# End-to-end tests
cd web && npm run test:e2e

๐Ÿ“š Documentation

Comprehensive documentation is available in the /docs directory:

๐ŸŽฏ Key Features Overview

Feature Web Mobile Backend
Authentication โœ… JWT + Email OTP โœ… JWT + Email OTP โœ… Full auth system
Real-time Sync โœ… Socket.io โœ… Socket.io โœ… WebSocket server
Room Management โœ… Create/Join rooms โœ… Create/Join rooms โœ… Room API
Media Playback โœ… Web Audio API โœ… Track Player โœ… Media metadata
Chat System โœ… Real-time chat โœ… Real-time chat โœ… Message handling
User Profiles โœ… Profile management โœ… Profile management โœ… User API

๐ŸŒŸ Screenshots

Click to view screenshots

Web Application

Auth Page Dashboard Room Interface

Mobile Application

Mobile Auth Mobile Home Mobile Room

๐ŸŽช Live Demo

  • ๐ŸŒ Web Demo: https://heyplay-demo.vercel.app
  • ๐Ÿ“ฑ Mobile Demo: Download Expo Go and scan the QR code
  • ๐Ÿ”‘ Test Account:
    • Email: demo@heyplay.com
    • Password: demo123

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Web Client    โ”‚    โ”‚  Mobile Client  โ”‚    โ”‚   Backend API   โ”‚
โ”‚   (Next.js)     โ”‚    โ”‚ (React Native)  โ”‚    โ”‚   (Node.js)     โ”‚
โ”‚                 โ”‚    โ”‚                 โ”‚    โ”‚                 โ”‚
โ”œโ”€ Auth Pages     โ”‚    โ”œโ”€ Auth Screens   โ”‚    โ”œโ”€ Auth Routes    โ”‚
โ”œโ”€ Dashboard      โ”‚โ—„โ”€โ”€โ–บโ”‚ Home Screen     โ”‚โ—„โ”€โ”€โ–บโ”‚ Room Routes     โ”‚
โ”œโ”€ Room Interfaceโ”‚    โ”‚ Room Screen     โ”‚    โ”‚ User Routes     โ”‚
โ”œโ”€ Profile       โ”‚    โ”‚ Profile Screen  โ”‚    โ”‚ Media Routes    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                       โ”‚                       โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                 โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   Database      โ”‚
                    โ”‚   (MongoDB)     โ”‚
                    โ”‚                 โ”‚
                    โ”œโ”€ Users          โ”‚
                    โ”œโ”€ Rooms          โ”‚
                    โ”œโ”€ Messages       โ”‚
                    โ”œโ”€ Sessions       โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Deployment

๐ŸŒ Production Deployment

Backend Options:

Web Frontend:

  • Vercel (Recommended for Next.js) - Automatic deployments
  • Netlify - JAMstack hosting platform
  • AWS Amplify - Full-stack platform

Mobile Apps:

Database:

  • MongoDB Atlas (Recommended) - Cloud database
  • Self-hosted MongoDB on VPS
  • Other document databases (DocumentDB, CosmosDB)

See the Deployment Guide for detailed instructions.

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help:

๐Ÿ› Report Bugs

  • Use GitHub Issues with the bug report template
  • Include steps to reproduce and environment details
  • Add screenshots or videos if helpful

๐Ÿ’ก Suggest Features

  • Check existing issues and discussions first
  • Use the feature request template
  • Explain the use case and potential implementation

๐Ÿ”ง Submit Code

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following our coding standards
  4. Add tests for new functionality
  5. Update documentation as needed
  6. Submit a pull request

๐Ÿ“ Development Guidelines

  • TypeScript: Use TypeScript for all new code
  • Code Style: Follow ESLint and Prettier configurations
  • Commits: Use Conventional Commits
  • Testing: Write tests for new features and bug fixes
  • Documentation: Update relevant documentation

See CONTRIBUTING.md for detailed guidelines.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

What this means:

  • โœ… Commercial use - Use it in commercial projects
  • โœ… Modification - Modify the code as needed
  • โœ… Distribution - Distribute your modified versions
  • โœ… Private use - Use it in private projects
  • โ— Liability - No warranty or liability provided
  • โ— Attribution - Include the original license

๐Ÿ†˜ Support & Community

๐Ÿ“ž Get Help

  • ๐Ÿ“– Documentation: Check the /docs directory first
  • ๐Ÿ› Issues: Report bugs on GitHub Issues
  • ๐Ÿ’ฌ Discussions: Join GitHub Discussions
  • ๐Ÿ“ง Email: Contact us at support@heyplay.com

๐ŸŒ Community

๐Ÿ”” Stay Updated

  • โญ Star this repository to show support
  • ๐Ÿ‘€ Watch for release notifications
  • ๐Ÿด Fork to contribute or customize
  • ๐Ÿ“ง Subscribe to our newsletter for major updates

๐Ÿ—บ๏ธ Roadmap

๐Ÿ“… Current Version (v1.0)

  • โœ… User authentication with email verification
  • โœ… Real-time room-based music synchronization
  • โœ… Cross-platform support (Web + Mobile)
  • โœ… Live chat and emoji reactions
  • โœ… Beautiful, responsive UI design
  • โœ… Production-ready deployment setup

๐ŸŽฏ Version 1.1 (Q2 2025)

  • ๐ŸŽฅ Video streaming support (YouTube, Vimeo)
  • ๐ŸŽจ Custom room themes and personalization
  • ๐Ÿ”Š Audio effects and equalizer
  • ๐Ÿ“Š Room analytics and listening statistics
  • ๐Ÿ”” Push notifications for room activities
  • ๐Ÿ‘ฅ Friend system and social features

๐Ÿš€ Version 1.2 (Q3 2025)

  • ๐ŸŽค Voice chat integration
  • ๐Ÿค– AI-powered music recommendations
  • ๐Ÿ“ฑ Progressive Web App capabilities
  • ๐ŸŒ Multi-language support
  • ๐ŸŽฎ Interactive room games and activities
  • ๐Ÿ“ˆ Advanced moderation tools

๐ŸŒŸ Version 2.0 (Q4 2025)

  • ๐ŸŽต Spotify Premium integration
  • โ˜๏ธ Cloud playlist synchronization
  • ๐ŸŽญ Virtual avatars and room environments
  • ๐Ÿ“ป Radio station mode
  • ๐Ÿ” Advanced privacy controls
  • ๐Ÿ’ฐ Premium features and monetization

Vote on features: Help prioritize our roadmap by participating in GitHub Discussions

๐Ÿ‘จโ€๐Ÿ’ป Contributors

Thanks to all the amazing people who have contributed to HeyPlay:

๐Ÿ† Core Team

  • @imdeepakyadav - Project Lead & Full-Stack Developer
  • [Your Name Here] - Join us and be part of the core team!

๐Ÿ’ Special Thanks

  • All beta testers and early adopters
  • Contributors who reported bugs and suggested features
  • The open-source community for amazing tools and libraries

๐Ÿ“Š Project Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub last commit


Built with โค๏ธ by the HeyPlay Team

Bringing people together through music, one room at a time.

๐ŸŽต Sync. Stream. Enjoy Together. ๐ŸŽต

โญ Star on GitHub โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature

About

A mobile app and website where users can create rooms, invite others, and enjoy synchronized music and video playback. The app will support background playback for music and real-time interactions.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors