A modern, aesthetic live streaming platform with subscription-based monetization and enterprise-grade features.
- Live Streaming: Professional quality broadcasting with RTMP ingest and HLS delivery
- VOD Management: Secure video-on-demand with signed URLs and content protection
- Subscription Monetization: Tiered plans (Basic $9.99, Premium $19.99, Pro $29.99)
- Real-time Engagement: Advanced chat system with AI moderation and custom emotes
- AI Enhancement: Automated content processing, thumbnails, and recommendations
- Enterprise Features: White-label customization, comprehensive APIs, and multi-tenancy
- Framework: Next.js 15.0.1 with App Router
- Language: TypeScript with 100% type coverage
- Styling: Tailwind CSS v4 + shadcn/ui
- Authentication: Clerk with OAuth (Google, GitHub, Discord)
- Database: Firebase Firestore
- Storage: Google Cloud Storage with signed URLs
- Payments: Stripe with subscription management
- Streaming: HLS.js with adaptive bitrate
- AI: Content moderation and enhancement
- Testing: Jest + Playwright
streamvault/
βββ app/ # Next.js 15 App Router
β βββ (auth)/ # Authentication pages
β βββ (dashboard)/ # Protected dashboard routes
β βββ api/ # API routes
β βββ globals.css # Global styles
βββ components/ # Reusable React components
β βββ ui/ # shadcn/ui components
β βββ auth/ # Authentication components
β βββ player/ # Video player components
β βββ chat/ # Chat system components
βββ lib/ # Utility functions and services
β βββ auth/ # Authentication utilities
β βββ streaming/ # Streaming services
β βββ storage/ # GCS and file management
β βββ stripe/ # Payment processing
βββ types/ # TypeScript type definitions
βββ hooks/ # Custom React hooks
- Node.js 18+
- pnpm 8+
- Git
- Clone the repository:
git clone https://github.com/code-craka/streamvault.git
cd streamvault
- Install dependencies:
pnpm install
- Set up environment variables:
cp .env.example .env.local
# Fill in your actual values in .env.local
- Start the development server:
pnpm dev
- Open http://localhost:3000 in your browser.
pnpm dev # Start development server
pnpm build # Build for production
pnpm start # Start production server
pnpm lint # Lint code
pnpm format # Format code with Prettier
pnpm type-check # TypeScript type checking
pnpm test # Run unit tests
pnpm test:watch # Run tests in watch mode
pnpm test:coverage # Run tests with coverage
pnpm test:e2e # Run E2E tests with Playwright
Key environment variables (see .env.example
for complete list):
# Core
NEXT_PUBLIC_APP_URL=http://localhost:3000
GCP_PROJECT_ID=your-project-id
GCS_BUCKET_NAME=your-bucket-name
# Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Stripe
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
# Firebase
FIREBASE_PROJECT_ID=your-firebase-project
NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key
The project uses Husky for git hooks:
- pre-commit: Runs linting and type checking
- commit-msg: Validates commit message format (conventional commits)
- Authentication: Clerk-based auth with role management
- Streaming: RTMP ingest β HLS transcoding β CDN delivery
- Storage: Google Cloud Storage with 15-minute signed URLs
- Real-time: Firebase Firestore for chat and live updates
- Payments: Stripe subscriptions with webhook handling
- AI: Content moderation, thumbnails, and recommendations
- Page Load: LCP < 2.5s, FID < 100ms, CLS < 0.1
- API Response: < 100ms for authenticated requests
- Video Start: < 3 seconds for HLS initialization
- Chat Delivery: < 500ms end-to-end
- Uptime: 99.9% availability SLA
pnpm test
pnpm test:e2e
- Minimum 80% code coverage
- All critical paths must be tested
- Integration tests for API endpoints
pnpm build
pnpm start
- Configure production environment variables
- Set up Google Cloud Storage bucket
- Configure Stripe webhooks
- Set up Firebase project
- Configure Clerk production instance
- Performance: Core Web Vitals tracking
- Errors: Automated error reporting
- Analytics: User engagement metrics
- Uptime: 99.9% availability monitoring
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit changes:
git commit -m 'feat: add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
We use Conventional Commits:
feat:
New featuresfix:
Bug fixesdocs:
Documentation changesstyle:
Code style changesrefactor:
Code refactoringtest:
Test additions/changeschore:
Maintenance tasks
This project is licensed under the MIT License - see the LICENSE file for details.
- Repository: https://github.com/code-craka/streamvault.git
- Documentation: [Coming Soon]
- API Docs: [Coming Soon]
- Support: [Coming Soon]
Sayem Abdullah Rihan
Built with β€οΈ by the TechSci Team