- Configured Flask-Login with user_loader
- Added register, login, logout routes with proper validation
- Created login.html and register.html templates with auth forms
- Updated base.html navigation to show username and conditional menu
- Added auth page styling to style.css
- Protected all routes with @login_required decorator
- Updated all routes to filter by current_user.id
- Added user ownership validation for:
- Channels (can only view/refresh own channels)
- Videos (can only watch/download own videos)
- Streams (can only stream videos from own channels)
- Updated save_to_db() calls to pass current_user.id
- Improved user_loader to properly handle session management
Features:
- User registration with password confirmation
- Secure password hashing with bcrypt
- Login with "remember me" functionality
- Flash messages for all auth actions
- Redirect to requested page after login
- User-specific data isolation (multi-tenant)
Security:
- All sensitive routes require authentication
- Users can only access their own data
- Passwords hashed with bcrypt salt
- Session-based authentication via Flask-Login
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
BREAKING CHANGE: This commit introduces significant schema changes that require
a fresh database. See migration instructions below.
Changes:
- Added Flask-Login and bcrypt dependencies to pyproject.toml
- Created User model with password hashing methods
- Updated Channel model:
- Added user_id foreign key relationship
- Added rss_url field
- Renamed last_fetched to last_fetched_at
- Added composite unique index on (user_id, channel_id)
- Updated VideoEntry model:
- Added video_id, video_url, thumbnail_url, description, published_at fields
- Renamed link to video_url
- Added indexes for performance
- Updated feed_parser.py:
- Enhanced FeedEntry to extract thumbnail, description, published date
- Added _extract_video_id() method for parsing YouTube URLs
- Updated save_to_db() to require user_id parameter
- Parse and store all metadata from RSS feeds
- Generated Alembic migration: a3c56d47f42a
Migration Instructions:
1. Stop all services: docker-compose down -v
2. Apply migrations: docker-compose up -d && docker-compose exec app alembic upgrade head
3. Or for local dev: rm yottob.db && alembic upgrade head
Next Steps (TODO):
- Configure Flask-Login in main.py
- Create login/register/logout routes
- Add @login_required decorators to protected routes
- Update all routes to filter by current_user
- Create auth templates (login.html, register.html)
- Update base.html with auth navigation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added yt-dlp, celery, and redis dependencies to pyproject.toml
- Extended VideoEntry model with download tracking fields:
- download_status (enum: pending, downloading, completed, failed)
- download_path, download_started_at, download_completed_at
- download_error, file_size
- Created celery_app.py with Redis broker configuration
- Created download_service.py with async download tasks:
- download_video() task downloads as MP4 format
- Configured yt-dlp for best MP4 quality with fallback
- Automatic retries on failure (max 3 attempts)
- Progress tracking and database updates
- Added Flask API endpoints in main.py:
- POST /api/download/<video_id> to trigger download
- GET /api/download/status/<video_id> to check status
- POST /api/download/batch for bulk downloads
- Generated and applied Alembic migration for new fields
- Created downloads/ directory for video storage
- Updated .gitignore to exclude downloads/ directory
- Updated CLAUDE.md with comprehensive documentation:
- Redis and Celery setup instructions
- Download workflow and architecture
- yt-dlp configuration details
- New API endpoint examples
Videos are downloaded as MP4 files using Celery workers.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Added SQLAlchemy 2.0 and Alembic 1.13 dependencies
- Created models.py with Channel and VideoEntry ORM models
- Created database.py for database configuration and session management
- Initialized Alembic migration system with initial migration
- Updated feed_parser.py with save_to_db() method for persistence
- Updated main.py with database initialization and new API routes:
- /api/feed now saves to database by default
- /api/channels lists all tracked channels
- /api/history/<channel_id> returns video history
- Updated .gitignore to exclude database files
- Updated CLAUDE.md with comprehensive ORM and migration documentation
Database uses SQLite (yottob.db) with upsert logic to avoid duplicates.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>