8000 GitHub - koniz-dev/stream-pulse: StreamPulse is a modern live streaming platform with real-time chat functionality, built with Next.js 15. The application delivers a seamless live video viewing experience with Video.js integration, interactive chat system powered by Firebase, and secure user authentication through Clerk.
[go: up one dir, main page]

Skip to content

StreamPulse is a modern live streaming platform with real-time chat functionality, built with Next.js 15. The application delivers a seamless live video viewing experience with Video.js integration, interactive chat system powered by Firebase, and secure user authentication through Clerk.

Notifications You must be signed in to change notification settings

koniz-dev/stream-pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StreamPulse πŸŽ₯

A modern live streaming platform with real-time chat functionality, built with Next.js 15, featuring HLS video streaming and interactive chat capabilities.

✨ Features

  • 🎬 Live Video Streaming - HLS video player with Video.js integration and professional controls
  • πŸ’¬ Real-time Chat - Interactive chat system with Firebase Realtime Database
  • πŸ” User Authentication - Secure authentication with Clerk (sign-in/sign-up)
  • 🎨 Modern UI - Beautiful interface built with Material-UI and Tailwind CSS
  • πŸ“± Responsive Design - Optimized for desktop and mobile devices
  • ⚑ Fast Performance - Built with Next.js 15 and Turbopack for optimal speed
  • πŸ”„ Real-time Updates - Live chat and streaming updates
  • πŸ› οΈ Admin Panel - Debug tools and chat management for administrators
  • πŸ“Š Analytics - Firebase Analytics integration for user insights

πŸ› οΈ Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript
  • UI Framework: Material-UI (MUI), Tailwind CSS
  • Authentication: Clerk
  • Database: Firebase Realtime Database
  • Video Player: Video.js
  • State Management: Zustand
  • Styling: Emotion, Tailwind CSS

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm, yarn, pnpm, or bun
  • Firebase project setup
  • Clerk account for authentication

Installation

  1. Clone the repository

    git clone https://github.com/koniz-dev/stream-pulse.git
    cd stream-pulse
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Environment Setup

    Create a .env.local file in the root directory:

    # Clerk Authentication
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
    CLERK_SECRET_KEY=your_clerk_secret_key
    
    # Firebase Client Configuration
    NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
    NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
    NEXT_PUBLIC_FIREBASE_DATABASE_URL=https://your-project-id-default-rtdb.firebaseio.com
    NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id
    NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
    NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
    NEXT_PUBLIC_FIREBASE_APP_ID=your_firebase_app_id
    NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id
    
    # Firebase Admin SDK (Service Account)
    FIREBASE_PROJECT_ID=your_firebase_project_id
    FIREBASE_PRIVATE_KEY_ID=your_firebase_private_key_id
    FIREBASE_PRIVATE_KEY=your_firebase_private_key
    FIREBASE_CLIENT_EMAIL=your_firebase_client_email
    FIREBASE_CLIENT_ID=your_firebase_client_id
    FIREBASE_AUTH_URI=https://accounts.google.com/o/oauth2/auth
    FIREBASE_TOKEN_URI=https://oauth2.googleapis.com/token
    FIREBASE_AUTH_PROVIDER_X509_CERT_URL=https://www.googleapis.com/oauth2/v1/certs
    FIREBASE_CLIENT_X509_CERT_URL=https://www.googleapis.com/robot/v1/metadata/x509/your-service-account%40your-project.iam.gserviceaccount.com
    FIREBASE_UNIVERSE_DOMAIN=googleapis.com
  4. Run the development server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
    # or
    bun dev
  5. Open your browser

    Navigate to http://localhost:3000 to see the application.

πŸ“ Project Structure

stream-pulse/
β”œβ”€β”€ app/                    # Next.js App Router
β”‚   β”œβ”€β”€ (auth)/            # Authentication routes
β”‚   β”‚   └── (routes)/      # Sign-in/Sign-up pages
β”‚   β”œβ”€β”€ about/             # About page
β”‚   β”œβ”€β”€ admin/             # Admin panel
β”‚   β”‚   β”œβ”€β”€ chat/          # Chat management
β”‚   β”‚   └── debug/         # Debug tools
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”‚   └── auth/          # Authentication API
β”‚   β”œβ”€β”€ layout.tsx         # Root layout
β”‚   └── page.tsx           # Home page
β”œβ”€β”€ components/            # React components
β”‚   β”œβ”€β”€ common/            # Shared components
β”‚   β”œβ”€β”€ features/          # Feature-specific components
β”‚   β”‚   β”œβ”€β”€ chat/          # Chat functionality
β”‚   β”‚   └── video/         # Video player
β”‚   β”œβ”€β”€ ui/                # UI components
β”‚   └── index.ts           # Component exports
β”œβ”€β”€ hooks/                 # Custom React hooks
β”‚   └── useFirebaseAuth.ts # Firebase authentication hook
β”œβ”€β”€ lib/                   # Utility libraries
β”‚   β”œβ”€β”€ firebase.ts        # Firebase configuration
β”‚   └── logger.ts          # Logging utility
β”œβ”€β”€ providers/             # Context providers
β”‚   β”œβ”€β”€ ThemeProvider.tsx  # Theme context
β”‚   └── index.ts           # Provider exports
β”œβ”€β”€ stores/                # Zustand stores
β”‚   β”œβ”€β”€ adminChatStore.ts  # Admin chat state
β”‚   β”œβ”€β”€ chatStore.ts       # Chat state
β”‚   β”œβ”€β”€ userStore.ts       # User state
β”‚   β”œβ”€β”€ videoStore.ts      # Video state
β”‚   └── index.ts           # Store exports
β”œβ”€β”€ types/                 # TypeScript type definitions
β”‚   β”œβ”€β”€ chat.ts            # Chat types
β”‚   β”œβ”€β”€ user.ts            # User types
β”‚   β”œβ”€β”€ video.ts           # Video types
β”‚   └── index.ts           # Type exports
β”œβ”€β”€ middleware.ts          # Clerk middleware
β”œβ”€β”€ next.config.ts         # Next.js configuration
β”œβ”€β”€ package.json           # Dependencies
└── public/                # Static assets

🎯 Available Scripts

  • npm run dev - Start development server with Turbopack
  • npm run build - Build the application for production
  • npm run start - Start the production server
  • npm run lint - Run ESLint for code quality

πŸ”§ Configuration

Firebase Setup

  1. Create a Firebase project at Firebase Console
  2. Enable Authentication and Realtime Database
  3. Add your web app and copy the configuration
  4. Generate a service account key for Admin SDK:
    • Go to Project Settings > Service Accounts
    • Click "Generate new private key"
    • Download the JSON file
    • Extract all values from the JSON file to your .env.local
  5. Update your .env.local file with the Firebase credentials

Note: The Firebase Admin SDK requires all service account fields from the downloaded JSON file, not just the basic ones.

Clerk Setup

  1. Create a Clerk account at Clerk Dashboard
  2. Create a new application
  3. Copy the publishable key and secret key
  4. Update your .env.local file with the Clerk credentials

πŸš€ Deployment

Deploy on Vercel (Recommended)

  1. Push your code to GitHub
  2. Connect your repository to Vercel
  3. Add your environment variables in Vercel dashboard
  4. Deploy automatically on every push

Deploy on Other Platforms

The application can be deployed on any platform that supports Next.js:

  • Netlify: Connect your GitHub repository
  • Railway: Deploy with one-click
  • DigitalOcean App Platform: Container-based deployment
  • AWS Amplify: Full-stack deployment

🀝 Contributing

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

πŸ“ License

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

πŸ‘₯ Authors

πŸ™ Acknowledgments

About

StreamPulse is a modern live streaming platform with real-time chat functionality, built with Next.js 15. The application delivers a seamless live video viewing experience with Video.js integration, interactive chat system powered by Firebase, and secure user authentication through Clerk.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0