🛡️ Admin & Server Settings
← User SettingsAPI Keys & Configuration Required
To use the full functionality of YouTube Learning Library, you'll need to configure the following in your .env.local file.
0. YouTube OAuth 2.0 (Required for login)
Required for signing in and accessing your YouTube library. Use Google's OAuth Playground for quick testing.
Quick Setup with Google OAuth Playground:
- Go to Google OAuth Playground
- Click ⚙️ (gear icon, top right) and check "Use your own OAuth credentials"
- Search for "YouTube" and select:
YouTube Data API v3 - Check the scope:
https://www.googleapis.com/auth/youtube.readonly - Click "Authorize APIs" → Sign in with your Google account → Grant permission
- Click "Exchange authorization code for tokens"
- Copy the Access Token and Refresh Token to
.env.local:
GOOGLE_ACCESS_TOKEN=your_access_token_here
GOOGLE_REFRESH_TOKEN=your_refresh_token_here
NEXTAUTH_SECRET=generate_with_openssl💡 Generate NEXTAUTH_SECRET with: openssl rand -base64 32
Alternatively, if you want to use the standard OAuth flow, you can create a Google Cloud project and use GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET instead.
Loading settings...
🤖 AI Model
Pick the provider and model used for AI features (e.g. auto topic classification). The key is encrypted at rest; leave it blank to use the matching environment variable.
Sync Database to Production (Staging)
Admin tool. Ingest playlists, tags, and custom videos locally on your development machine, then click the button below to push and sync the local SQLite database directly to the live server on c3p0.local and reload the staging service.
🎬 Bulk Playlist & Channel Importer
Admin tool. Crawl a YouTube channel's public playlists or submit a custom list of video/playlist URLs to seed the catalog.
2. Anthropic Claude API (Optional - Phase 2)
For AI-powered transcript summarization and analysis.
Get your API key:
- Go to Anthropic Console
- Create an account or sign in
- Create an API key
- Copy the API key and add it to your
.env.local:
ANTHROPIC_API_KEY=your_api_key_here3. Local Setup (Optional)
For completely offline processing without external APIs.
Whisper (Local Speech-to-Text):
Install via Homebrew:
brew install whisper-cpp yt-dlpOllama (Local LLM):
Download from:
https://ollama.aiThen pull a model:
ollama pull mistralConfiguration File
Edit .env.local in the project root to add your API keys. This file is gitignored and won't be committed to version control:
# YouTube Data API v3
YOUTUBE_API_KEY=your_youtube_api_key_here
# Anthropic Claude API
ANTHROPIC_API_KEY=your_anthropic_api_key_here
# Database
DATABASE_URL=file:./prisma/dev.db
# Local Services (if running)
WHISPER_ENABLED=false
OLLAMA_ENABLED=false
OLLAMA_BASE_URL=http://localhost:11434Development Server
To run the development server with hot reload:
npm run devThe server runs on:
http://localhost:3003API Endpoints
- POST /api/ingest - Ingest a YouTube video or playlist
{ "url": "https://youtube.com/watch?v=...", "playlistAsCategory": false } - POST /api/transcript - Extract or provide a transcript
{ "youtubeId": "dQw4w9WgXcQ", "manualTranscript": "..." } - GET /api/transcript - Retrieve a transcript
/api/transcript?youtubeId=dQw4w9WgXcQ