A web app for tracking games that streamers have played while live
- Twitch OAuth Authentication - Secure login with your Twitch account
- Stream History Analysis - Fetch and analyze your past streaming data
- Game Metadata Integration - Beautiful game cover art and information
- Responsive Dashboard - Modern UI that works on all devices
- Real-time Data - Fresh insights from the Twitch API
- Node.js 18+
- A Twitch application (for OAuth credentials)
- Clone the repository:
git clone <your-repo-url>
cd stream-analytics- Install dependencies:
npm install- Set up environment variables:
cp .env.local.example .env.local-
Configure your Twitch OAuth application:
- Go to Twitch Developer Console
- Create a new application
- Set the OAuth Redirect URL to:
http://localhost:3000/api/auth/callback/twitch - Copy your Client ID and Client Secret to
.env.local
-
Generate a NextAuth secret:
openssl rand -base64 32Add this to your .env.local as NEXTAUTH_SECRET
- Run the development server:
npm run devOpen http://localhost:3000 to see the application.
Create a .env.local file with the following variables:
TWITCH_CLIENT_ID=your_twitch_client_id
TWITCH_CLIENT_SECRET=your_twitch_client_secret
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your_generated_secret- Visit the Twitch Developer Console
- Click "Register Your Application"
- Fill in the application details:
- Name: Your app name
- OAuth Redirect URLs:
http://localhost:3000/api/auth/callback/twitch - Category: Choose appropriate category
- Save your Client ID and Client Secret
stream-analytics/
├── app/ # Next.js app router
│ ├── api/ # API routes
│ ├── dashboard/ # Dashboard page
│ └── page.tsx # Landing page
├── components/ # React components
├── lib/ # Utility functions
├── public/ # Static assets
└── ...config files
- Framework: Next.js 13+ (App Router)
- Authentication: NextAuth.js
- Styling: Tailwind CSS + shadcn/ui
- Language: TypeScript
- API: Twitch Helix API
- Beautiful hero section with animated game covers
- Twitch OAuth login button
- Feature showcase
- Streaming statistics overview
- Game library with cover art
- Total streaming time and session counts
- Responsive grid layout
- Game-wise streaming duration
- Stream frequency analysis
- Visual data representation
- Push your code to GitHub
- Connect your repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy!
Make sure to update your NEXTAUTH_URL to your production domain.
The app can be deployed to any platform that supports Next.js:
- Netlify
- Railway
- AWS Amplify
- DigitalOcean App Platform
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Twitch for providing the excellent Helix API
- The Next.js team for the amazing framework
- shadcn/ui for the beautiful component library
- The streaming community for inspiration