- Add explicit anchor text mode support in AnchorTextConfig
- Support tier-specific anchor text terms at job-level (tier1, tier2, tier3, tier4_plus)
- Support tier-level explicit anchor text with 'terms' array
- Update content injection to prioritize explicit terms when mode is 'explicit'
- Add validation for explicit mode requiring term lists
- Update JOB_FIELD_REFERENCE.md with explicit mode documentation and examples
- Add comprehensive unit and integration tests for explicit anchor text
Includes multi-cloud storage migration script and related database changes.
- Add S3StorageClient class implementing StorageClient Protocol
- Support AWS S3 and S3-compatible services with custom endpoints
- Automatic bucket configuration for public read access only
- Content-type detection for uploaded files
- URL generation (default S3 URLs and custom domain support)
- Error handling for common S3 errors (403, 404, NoSuchBucket, etc.)
- Retry logic with exponential backoff (consistent with BunnyStorageClient)
- Update storage_factory to return S3StorageClient for 's3' and 's3_compatible'
- Add comprehensive unit tests with mocked boto3 calls (18 tests, all passing)
Implements Story 6.2 from Epic 6: Multi-Cloud Storage Support
- Move site assignment to occur immediately after article creation
- Generate images after site assignment so they can be uploaded
- Add assign_site_to_single_article() helper function
- Fixes issue where images were generated with site_deployment_id=None
- Add Pillow dependency for image processing
- Remove text instructions from fal.ai prompts (generate clean images)
- Add semi-transparent dark background box behind text for readability
- Overlay full title text with white text and black outline
- Add proper line spacing between text lines
- Fix FAL_KEY environment variable setup
- Add image URL logging to console output during batch processing
- Remove unused h2-prompts file
- Implement ImageGenerator class with hero and content image generation
- Add image theme prompt generation and caching
- Integrate with fal.ai flux-1/schnell API
- Add image upload to storage (Bunny CDN)
- Add image injection into HTML content
- Add test script for image generation
- Update database models and repositories for image fields
- Fix API usage: use arguments parameter and image_size object format
- Fix SessionLocal import error by using db_manager.get_session()
- Create thread-local ContentGenerator instances for each worker
- Ensure each thread uses its own database session
- Prevents database session conflicts in concurrent article generation
- Add CLI commands for user management (add-user, delete-user, list-users)
- Implement admin authentication for all user management commands
- Add password confirmation and deletion safety checks
- Prevent admins from deleting their own accounts
- Create 17 unit tests with mocked dependencies
- Create 18 integration tests with real database
- Add shared db_session fixture in conftest.py
- Update CLI commands to use db_manager for session handling
- Complete story documentation with usage examples
All 35 tests passing. Story 1.5 complete.
- Implemented FastAPI application with authentication
- Created health check endpoint (GET /health)
- Added authenticated endpoint (GET /api/v1/me)
- Added admin-only endpoint (GET /api/v1/admin/status)
- Implemented HTTP Basic Authentication with bcrypt
- Added role-based access control (Admin vs User)
- Created Pydantic schemas for request/response validation
- Added dependency injection for auth services
- Wrote 16 unit tests (all passing)
- Wrote 15 integration tests with real database (all passing)
- Added httpx to requirements for FastAPI TestClient
- Versioned API endpoints (/api/v1/) for extensibility
- Automatic OpenAPI documentation at /docs
- Complete story documentation
All acceptance criteria met:
✓ Basic REST API created
✓ Health check endpoint available
✓ API endpoints require authentication
✓ Designed to be extensible for future use
Story 1.1: Project Initialization & Configuration
- Set up monorepo structure with Python application
- Configured .env.example with all required environment variables
- Implemented JSON configuration file parsing (master.config.json)
- Initialized project dependencies in requirements.txt
Story 1.2: Database Setup & User Model
- Implemented SQLite database connection with SQLAlchemy
- Created User model with username, hashed_password, and role fields
- Implemented Repository Pattern for data access layer
- Created database initialization script (scripts/init_db.py)
- Added database session management
- User model supports Admin and User roles with is_admin() helper
Story 1.3: User Authentication System
- Implemented AuthService with secure password hashing (bcrypt)
- Added hash_password() and verify_password() methods
- Implemented authenticate_user() for credential validation
- System correctly identifies user roles (Admin/User)
- Authentication fails gracefully for invalid credentials
- Added comprehensive unit tests (10 tests)
- Added integration tests with database (5 tests)
- All 15 tests passing
Technical improvements:
- Database-agnostic design using Repository Pattern
- Secure password hashing with bcrypt
- Proper separation of concerns across layers
- Type hints throughout codebase
- Comprehensive test coverage
- Create monorepo directory structure as defined in architecture
- Initialize Python project with core dependencies (FastAPI, SQLAlchemy, Click, Pydantic)
- Add requirements.txt with all necessary libraries
- Create env.example with placeholders for all cloud provider secrets
- Implement master.config.json with comprehensive configuration
- Add Pydantic-based configuration loading and validation
- Create basic CLI framework with health check and config commands
- Set up main.py as CLI entry point
- Organize all modules according to source tree specification
This completes the foundational infrastructure for Epic 1: Foundation & Core Services.