A secure YouTube client designed specifically for children that only shows videos from a pre-approved whitelist of channels and automatically filters out YouTube Shorts and inappropriate content.
- Channel Whitelist: Only shows videos from administrator-approved channels stored in Supabase
- Shorts Filtering: Automatically excludes YouTube Shorts (videos < 60 seconds) and content marked with #shorts
- Safe Search: Uses YouTube's strict safe search filtering
- Kid-Friendly UI: Colorful, engaging interface designed for children
- Admin Panel: Password-protected interface for managing channel whitelist
- Smart Caching: Reduces API quota usage with intelligent caching
- Search Functionality: Search within whitelisted channels only
- Responsive Design: Works great on all devices
- Privacy Focused: No external tracking or analytics
- Frontend: React 18 + Vite + TypeScript + Tailwind CSS
- Backend: Netlify Functions (serverless)
- Database: Supabase (PostgreSQL)
- Video API: YouTube Data API v3
- Deployment: Netlify
- Styling: Tailwind CSS with custom kid-friendly design
- Create a new project at supabase.com
- Go to Settings > API to get your project URL and keys
- Run the migration to create the channels table:
- Go to SQL Editor in your Supabase dashboard
- Copy and paste the contents of
supabase/migrations/create_channels_table.sql - Run the query
- Visit the Google Cloud Console
- Create a new project or select an existing one
- Enable the YouTube Data API v3
- Create credentials (API key)
- Restrict the API key to YouTube Data API v3 for security
Create a .env.local file in the root directory:
# Supabase Configuration
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# YouTube Data API v3 Key
YOUTUBE_API_KEY=your_youtube_api_key_here
# Admin password for managing channels (change this!)
ADMIN_PASSWORD=your_secure_admin_passwordnpm installnpm run devThe application will be available at http://localhost:3000
For local development with Netlify Functions:
npm run netlify:dev- Visit
http://localhost:3000/admin - Enter your admin password
- Add YouTube channel URLs or IDs to the whitelist
Supported channel formats:
https://www.youtube.com/@channelnamehttps://www.youtube.com/c/channelnamehttps://www.youtube.com/user/usernamehttps://www.youtube.com/channel/UC...(direct channel ID)- Direct channel ID:
UC...
-
Connect Repository: Connect your Git repository to Netlify
-
Build Settings:
Build command: npm run build Publish directory: dist Functions directory: netlify/functions -
Environment Variables (in Netlify dashboard):
VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key YOUTUBE_API_KEY=your_api_key ADMIN_PASSWORD=your_secure_password -
Deploy: Push to your connected Git repository
- Access Admin Panel: Visit
/adminand enter your password - Add Safe Channels: Add YouTube channels you trust for your children
- Monitor Content: The system automatically filters videos to ensure only content from approved channels appears
- Remove Channels: Remove channels from the whitelist at any time
- Browse Videos: See a grid of safe, approved videos from trusted channels
- Search: Search for specific topics within the approved channels only
- Watch Videos: Click any video to watch in a safe, embedded player
- Easy Navigation: Simple, colorful interface designed for young users
- Channel Whitelist: Only videos from pre-approved channels are shown
- Shorts Filter: Automatically excludes YouTube Shorts and short-form content
- Safe Search: Uses YouTube's strictest content filtering
- No Comments: Children cannot access YouTube comments
- Controlled Environment: All content is pre-filtered by parents/administrators
- No Tracking: No external analytics or tracking systems
GET /.netlify/functions/get-videos- Fetch latest videos from whitelisted channelsGET /.netlify/functions/search-videos?q=query- Search within whitelisted channelsPOST /.netlify/functions/admin-login- Admin authenticationGET /.netlify/functions/verify-admin- Verify admin sessionPOST /.netlify/functions/admin-logout- Admin logoutGET /.netlify/functions/get-channels- Get channel whitelist (admin only)POST /.netlify/functions/add-channel- Add channel to whitelist (admin only)POST /.netlify/functions/remove-channel- Remove channel from whitelist (admin only)
CREATE TABLE channels (
id text PRIMARY KEY, -- YouTube channel ID
title text NOT NULL, -- Channel name
thumbnail text NOT NULL, -- Channel thumbnail URL
subscriber_count text, -- Formatted subscriber count
created_at timestamptz DEFAULT now()
);├── src/
│ ├── components/ # React components
│ ├── pages/ # Page components
│ ├── lib/ # Utilities and Supabase client
│ ├── App.tsx # Main app component
│ └── main.tsx # App entry point
├── netlify/
│ └── functions/ # Serverless functions
├── supabase/
│ └── migrations/ # Database migrations
├── public/ # Static assets
└── dist/ # Build output
const MAX_RESULTS_PER_CHANNEL = 10; // Videos per channel in functionsChange the default admin password in your environment variables:
ADMIN_PASSWORD=your_very_secure_password-
"Failed to fetch videos" error:
- Check if your YouTube API key is valid
- Ensure you have quota remaining on your API key
- Verify the API key has YouTube Data API v3 enabled
-
No videos appearing:
- Make sure you've added channels to the whitelist via admin panel
- Check that the channels have recent videos
- Verify the channels exist and are public
-
Admin login not working:
- Check your
ADMIN_PASSWORDenvironment variable - Clear browser cookies and try again
- Check your
-
Supabase connection issues:
- Verify your Supabase URL and keys are correct
- Check that the channels table exists in your database
- Ensure RLS policies are properly configured
YouTube Data API v3 has daily quota limits:
- Default quota: 10,000 units/day
- Each video search: ~100 units
- Each channel info request: ~1 unit
- Always use environment variables for sensitive data
- Change the default admin password
- Regularly review the channel whitelist
- Monitor API usage to prevent quota exhaustion
- Supabase RLS policies protect data access
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is designed for family use and educational purposes. Please ensure compliance with YouTube's Terms of Service when deploying.
Important: This application is designed to create a safer YouTube experience for children, but parental supervision is still recommended. Always review channels before adding them to the whitelist.