A modern web application to view and export your playlists to CSV and JSON formats.
- Google OAuth Authentication - Secure sign-in with your Google account
- View Playlists - See all your YouTube playlists with thumbnails and video counts
- Playlist Details - View all videos in a playlist with metadata
- Export to CSV - Download playlist data as a spreadsheet-compatible CSV file
- Export to JSON - Download complete playlist data in JSON format
- Dark/Light Mode - YouTube-themed dark mode by default, with light mode option
- PWA Support - Install as a standalone app on your device
- Offline Capable - Works offline after initial load (with cached data)
Browse your YouTube playlists
View playlist contents and export to CSV or JSON
Export complete - files ready for download
- React 18 - Modern React with hooks and TypeScript
- Vite - Fast build tooling
- Material UI v5 - Google Material Design 3 components
- Zustand - Lightweight state management
- React Router v6 - Client-side routing
- Axios - HTTP client with interceptors
- vite-plugin-pwa - PWA generation
Before running this app, you need to set up Google Cloud credentials.
- Go to Google Cloud Console
- Create a new project (or select an existing one)
- Go to APIs & Services → Library
- Search for "YouTube Data API v3"
- Click Enable
- Go to APIs & Services → OAuth consent screen
- Choose "External" user type
- Fill in app name, support email, developer email
- Add scope:
https://www.googleapis.com/auth/youtube.readonly - Add yourself as a test user (for development)
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Select Web application
- Configure the following:
| Field | Value |
|---|---|
| Authorized JavaScript origins | http://localhost:5173 |
| Authorized redirect URIs | http://localhost:5173 |
- Click Create and copy the Client ID
Note: The dev server is locked to port
5173viavite.config.tsto ensure OAuth redirects work consistently.
- Install dependencies:
npm install- Create environment file:
cp .env.example .env.local- Edit
.env.localand add your Google OAuth Client ID:
VITE_GOOGLE_CLIENT_ID=your_client_id_here.apps.googleusercontent.com
- Start the development server:
npm run dev- Open http://localhost:5173 in your browser
| Command | Description |
|---|---|
npm run dev |
Start dev server on port 5173 |
npm run build |
Build for production |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint |
npm run format |
Auto-fix formatting with Prettier |
npm run format:check |
Check formatting without changes |
npm run check |
Run format:check + lint + tests (CI-ready) |
npm test |
Run tests in watch mode |
npm run test:run |
Run tests once |
npm run test:coverage |
Run tests with coverage report |
The dev server is locked to port 5173 (strictPort: true in vite.config.ts). This ensures OAuth redirects always work. If port 5173 is in use, the server will fail rather than picking a random port.
npm run buildThe built files will be in the dist folder, ready for static hosting.
This app can be hosted on any static hosting service:
- Netlify - Drag and drop the
distfolder - Vercel - Connect your repository
- GitHub Pages - Deploy the
distfolder - Cloudflare Pages - Connect your repository
Important: Add your production domain to both:
- Authorized JavaScript origins
- Authorized redirect URIs
app/
├── public/ # Static assets and PWA icons
├── src/
│ ├── components/ # React components
│ │ ├── auth/ # Authentication components
│ │ ├── common/ # Shared components
│ │ ├── export/ # Export functionality
│ │ ├── layout/ # App layout components
│ │ └── playlists/# Playlist display components
│ ├── hooks/ # Custom React hooks
│ ├── pages/ # Page components
│ ├── services/ # API and export services
│ ├── store/ # Zustand state stores
│ ├── test/ # Test setup and utilities
│ ├── theme/ # MUI theme configuration
│ └── types/ # TypeScript type definitions
├── .env.example # Environment variables template
├── .env.local # Your local config (gitignored)
├── .prettierrc # Prettier configuration
├── vite.config.ts # Vite + PWA + Vitest configuration
└── package.json
The project uses Vitest with React Testing Library for testing.
npm test # Run tests in watch mode
npm run test:run # Run tests once
npm run test:coverage # Run tests with coverage reportTests are located alongside source files with .test.ts or .test.tsx extensions.
Formatting is handled by Prettier:
npm run format # Auto-fix formatting
npm run format:check # Check without changesLinting is handled by ESLint:
npm run lint # Run ESLintFull Check (recommended before committing):
npm run check # Runs format:check + lint + testsKill the existing process:
lsof -ti:5173 | xargs kill -9Ensure your Google Cloud credentials have exactly:
- Origin:
http://localhost:5173 - Redirect URI:
http://localhost:5173
This is normal during development. Click Advanced → Go to [app name] to proceed.
This project is licensed under the Business Source License 1.1. You may view the source code and run the app locally. Refer to the LICENSE file for other uses.


