The next-gen hub for streaming, video calling, and squad communication. Fast, reliable, and built for both gamers and professionals.
A full-stack live streaming platform with HLS support, multi-resolution transcoding, and real-time video calling capabilities.
- Ultra-low latency streaming - Stream your gameplay in real-time
- Squad communication - Crystal-clear voice chat with your team
- Game integration - Seamless integration with popular games
- Stream analytics - Track your performance and audience
- HD Video Conferencing - Professional-grade video meetings
- Screen Sharing & Recording - Share presentations and record sessions
- Team Collaboration - Advanced collaboration tools
- Enterprise Security - Bank-grade security for sensitive meetings
- P2P Calling - Direct peer-to-peer communication
- Group Calling - Multi-participant video calls
- Live Streaming - Broadcast to unlimited viewers
- Cross-platform - Works on web, mobile, and desktop
- Real-time Communication - Instant messaging and notifications
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Material-UI, Shadcn UI, Lucide React Icons
- State Management: Redux Toolkit, React Context
- Video Player: HLS.js for live streaming
- Video Calling: WebRTC with PeerJS/Socket.IO
- Animations: Framer Motion
- Runtime: Node.js
- Streaming: Node Media Server (NMS)
- Transcoding: FFmpeg (fluent-ffmpeg)
- Protocol: RTMP ingest → HLS output
- Web Server: Express.js
- Real-time: Socket.IO for chat and signaling
- ORM: Prisma
- Database: PostgreSQL
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn
- Git
- FFmpeg (for local streaming) - Download from ffmpeg.org and add to PATH
- PostgreSQL (for database)
- Media Server (Node Media Server - included in project)
-
Clone the repository
git clone https://github.com/yourusername/nexstream.git cd nexstream -
Install Client dependencies
cd client npm install # or yarn install
-
Install Media Server dependencies
cd ../media_server npm install -
Set up environment variables
Create
client/.env.local:# API and Media Server URLs NEXT_PUBLIC_API_URL=http://localhost:3001 NEXT_PUBLIC_MEDIA_URL=http://localhost:8000 NEXT_PUBLIC_SERVER_URL=http://localhost:3000 NEXT_PUBLIC_RTMP_URL=rtmp://localhost:1935/live # Database DATABASE_URL=postgresql://user:password@localhost:5432/nexstream # Firebase (for authentication) NEXT_PUBLIC_FIREBASE_API_KEY=your-firebase-api-key NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-sender-id NEXT_PUBLIC_FIREBASE_APP_ID=your-app-id
-
Set up database
cd ../client npx prisma generate npx prisma migrate dev -
Start the Media Server
cd ../media_server npm startThe media server will run on:
- RTMP:
rtmp://localhost:1935 - HTTP API:
http://localhost:3001 - HLS/DASH:
http://localhost:8000
- RTMP:
-
Start the Next.js client
cd ../client npm run dev -
Open your browser Navigate to http://localhost:3000
nexstream/
├── client/ # Next.js 15 Frontend
│ ├── src/
│ │ ├── app/ # App Router
│ │ │ ├── (auth)/ # Auth routes
│ │ │ │ ├── sign-in/
│ │ │ │ ├── sign-up/
│ │ │ │ └── forgot-password/
│ │ │ ├── (user)/ # Protected routes
│ │ │ │ ├── dashboard/
│ │ │ │ ├── stream/
│ │ │ │ │ ├── [streamKey]/
│ │ │ │ │ └── page.tsx
│ │ │ │ └── videoCalling/
│ │ │ │ ├── [roomName]/
│ │ │ │ └── page.tsx
│ │ │ ├── api/ # API routes
│ │ │ └── page.tsx # Landing page
│ │ ├── components/ # React components
│ │ ├── contexts/ # Auth & Signal contexts
│ │ ├── lib/ # Utils & Prisma
│ │ └── store/ # Redux store
│ ├── prisma/
│ │ └── schema.prisma
│ └── package.json
│
├── media_server/ # Node Media Server
│ ├── nms-server.js # RTMP → HLS conversion
│ ├── media/ # Generated media files
│ │ ├── hls/ # HLS chunks (.ts + .m3u8)
│ │ ├── thumbnails/ # Stream thumbnails
│ │ └── ...
│ └── package.json
│
└── readme.md
/* Primary Colors */
--cyan-500: #06b6d4
--purple-500: #8b5cf6
--pink-500: #ec4899
/* Background */
--gray-900: #111827
--gray-800: #1f2937
--black: #000000
/* Gradients */
background: linear-gradient(135deg, from-gray-900 via-gray-800 to-black)- Headings: Inter/System font, bold weights
- Body: Inter/System font, regular weights
- Gradients: Cyan to purple text gradients for emphasis
cd client
npm run dev # Start dev server (localhost:3000)
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLintcd media_server
npm start # Start media server
npm run dev # Start with nodemonVercel (Recommended)
- Push your code to GitHub
- Connect your repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on every push
The media server needs to be deployed separately as it requires persistent connection for RTMP streams.
Options:
- VPS: DigitalOcean, Linode, AWS EC2
- Docker: Use provided Docker configuration
- Cloud Run: Google Cloud Run for serverless (requires configuration)
Environment Setup on Server:
# Install FFmpeg
apt-get install ffmpeg
# Install Node.js dependencies
npm install
# Start media server
npm start| Route | Description |
|---|---|
/ |
Landing page with live streams |
/sign-in |
User authentication |
/sign-up |
User registration |
| Route | Description |
|---|---|
/dashboard |
User dashboard (authenticated) |
/stream |
Browse and manage streams |
/stream/[streamKey] |
Watch live stream |
/videoCalling |
Video calling interface |
/videoCalling/[roomName] |
Join video call room |
The app uses Firebase Authentication with React Context:
- Firebase Auth - Email/password and social login
- AuthContext - Global authentication state
- Middleware - Route protection
- Protected Routes - User-specific content
- Session Management - Persistent login state
-
Streamer (Local PC)
- Downloads streaming script from the website
- Script uses FFmpeg to capture screen/audio
- Sends RTMP stream to media server
-
Media Server (Node Media Server)
- Receives RTMP stream on port 1935
- Transcodes into multiple resolutions (360p, 720p, 1080p)
- Generates HLS chunks (.ts files) and playlists (.m3u8)
- Provides API for stream metadata
-
Viewers (Browser)
- Browse live streams via HLS.js player
- Adaptive bitrate streaming
- Real-time stream updates
Streamer (FFmpeg)
→ RTMP (rtmp://localhost:1935/live/{streamKey})
→ Media Server (transcodes to HLS)
→ Viewers (http://localhost:8000/hls/{streamKey}/master.m3u8)
npm start # Start media server
npm run dev # Start with nodemon (auto-reload)Powered by Framer Motion:
- Page transitions
- Component entrance animations
- Hover and interaction effects
- Scroll-triggered animations
- Loading states
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Use TypeScript for all new files
- Follow ESLint configuration
- Use Prettier for formatting
- Write meaningful commit messages
- Lighthouse Score: 95+ on all metrics
- Core Web Vitals: Optimized
- Bundle Size: Analyzed and optimized
- Image Optimization: Next.js Image component
- Code Splitting: Automatic route-based splitting
- HTTPS enforced in production
- CSP headers configured
- XSS protection
- CSRF tokens
- Input validation and sanitization
- Rate limiting on API routes
1. Installation Issues
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install2. Build Errors
# Check TypeScript errors
npm run type-check
# Check for ESLint issues
npm run lint3. Environment Variables
Make sure all required environment variables are set in client/.env.local:
# Required for Client
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_MEDIA_URL=http://localhost:8000
NEXT_PUBLIC_SERVER_URL=http://localhost:3000
NEXT_PUBLIC_RTMP_URL=rtmp://localhost:1935/live
DATABASE_URL=postgresql://...4. FFmpeg Not Found
# Windows
# Download from https://ffmpeg.org/download.html
# Add FFmpeg to system PATH
# Verify installation
ffmpeg -version- Documentation: docs.nexstream.com
- Discord: Join our community
- Email: support@nexstream.com
- GitHub Issues: Report bugs
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js - The React framework
- Node Media Server - Media streaming server
- FFmpeg - Multimedia framework
- HLS.js - HTTP Live Streaming
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- Firebase - Authentication and backend
- Prisma - Next-generation ORM
- Socket.IO - Real-time communication
- Redux Toolkit - State management