Skip to content

Repository files navigation

🎵 StreamSync

StreamSync Hero

Collaborative Music Streaming at the Speed of Sound.

StreamSync is a high-performance, real-time music streaming platform where creators and fans sync up. Fans vote, creators play, and every transition is seamless and secure.


📸 Visual Showcase

Premium Login Interactive Dashboard
Login Dashboard

🚀 Features

⚡ Performance Optimized

  • Sub-10ms Queue Fetching: Integrated Upstash Redis for lightning-fast queue retrieval and real-time updates.
  • Dynamic Polling: Configured 2s polling intervals for a responsive, "live" dashboard feel.
  • Scalable Infrastructure: Built on Neon PostgreSQL and Vercel serverless edge functions.

🛡️ Security & Stability

  • Secure Authentication: Powerded by NextAuth with Google and GitHub providers.
  • Protected Routes: Middleware-level protection for the dashboard and creator views.
  • Robust API Handler: Switched to YouTube OEmbed API for failsafe song submissions that ignore YouTube frontend changes.
  • Type-Safe Core: Full TypeScript implementation with centralized Prisma client and standardized Next.js route handlers.

🎨 Premium Experience

  • Glassmorphism UI: High-end, tailored CSS for a modern "premium" aesthetic.
  • Auto-Play Queue: Smart advancement logic that detects when a song ends and immediately cues the next top-voted track.
  • Real-time Feedback: Interactive toast notifications and smooth CSS micro-animations.

🛠️ Tech Stack

  • Frontend: Next.js 15+ (App Router), Tailwind CSS, Lucide React.
  • Backend: Next.js API Routes, NextAuth.js.
  • Database: PostgreSQL (via Neon DB) with Prisma ORM.
  • Caching: Upstash Redis.
  • Hosting: Vercel.

📦 Getting Started

1. Clone & Install

git clone <your-repo-url>
cd stream-sync
pnpm install

2. Environment Variables

Create a .env file in the root directory:

DATABASE_URL="postgresql://..."
NEXTAUTH_SECRET="your-secret"
NEXTAUTH_URL="http://localhost:3000"

GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."

UPSTASH_REDIS_REST_URL="..."
UPSTASH_REDIS_REST_TOKEN="..."

3. Database Setup

npx prisma generate
npx prisma db push

4. Run Development

pnpm dev

🚢 Deployment

  1. Vercel: Push your code to GitHub and import it into Vercel.
  2. Settings: Add all Environment Variables to Vercel Settings.
  3. Google Console: Update your "Authorized Redirect URIs" to https://your-domain.vercel.app/api/auth/callback/google.

📄 License

MIT License - Created with ❤️ by Divyanshu Rajput

StreamSync CTA

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages