Commit Graph

48 Commits (56d7e4f6426b4df5cf8a55a811430c9a5e3c79f4)

Author SHA1 Message Date
PeninsulaInd 56d7e4f642 Fix explicit anchor text to randomize term selection
Randomize anchor text list before trying terms so all explicit terms
are used across articles instead of always using the first term.
2025-12-20 10:01:38 -06:00
PeninsulaInd de21a22b72 Implement Story 8.1: Job-Level Anchor Text Control for T1 and T2+
- 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.
2025-12-19 12:43:01 -06:00
PeninsulaInd a815cbcf3e Story 6.2: Implement AWS S3 Storage Client
- 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
2025-12-10 14:57:44 -06:00
PeninsulaInd 7e21482419 Add Epic 6: Multi-Cloud Storage Support planning and merge images branch changes 2025-12-10 11:37:56 -06:00
PeninsulaInd 62074cd995 Fix: Assign sites before generating images
- 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
2025-11-20 21:47:28 -06:00
PeninsulaInd be03594fc7 Implement PIL text overlay for hero images
- 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
2025-11-19 17:28:26 -06:00
PeninsulaInd 8379313f51 Add image generation using fal.ai API
- 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
2025-11-19 17:09:20 -06:00
PeninsulaInd d5c501f004 Remove job files from git tracking and update commands/prompts 2025-11-17 11:07:25 -06:00
PeninsulaInd 4710677614 Update outline generation prompt and remove test file 2025-11-12 10:22:17 -06:00
PeninsulaInd 04f10d6d26 Adds ability to quickly import without CORA- version 1.2 2025-11-03 10:07:35 -06:00
PeninsulaInd b0901b7dc7 Fixed- Adds the cannoical for real now - version 1.1.4 2025-11-03 08:20:59 -06:00
PeninsulaInd 14df158a7a Fixed checking for incomplete error from openrouter - version 1.1.3 2025-10-31 11:49:45 -05:00
PeninsulaInd de6b97dbc1 Pre-fix for checking for incomplete from openrouter - version 1.1.2 2025-10-31 11:11:28 -05:00
PeninsulaInd 5eef4fe507 Fixed concurrency and model changes at job level - version 1.1.0 2025-10-27 14:37:47 -05:00
PeninsulaInd d919ea25e1 Fix concurrent generation threading issues
- 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
2025-10-27 13:58:18 -05:00
PeninsulaInd 3ebef04ef0 modify word count to get in range for prompt - version 1.0.1 2025-10-27 13:12:30 -05:00
PeninsulaInd 25a83a5252 WORKING version 1.0.0 2025-10-24 12:50:24 -05:00
PeninsulaInd b29a3f3249 Fixed & Tested - Creates titles in batched of 25 for more diversity of ideas. 2025-10-24 11:24:27 -05:00
PeninsulaInd 083a8cacdd Fixed NOT TESTED: now actually listens to # of links. Also makes See Also smaller. 2025-10-23 15:37:31 -05:00
PeninsulaInd b168d33e2d Fixed: auto asks for money_site_url on script run if not provided 2025-10-23 13:27:12 -05:00
PeninsulaInd 26b6e75448 Fixed: throws error early on no money_site_rul set. 2025-10-23 12:53:06 -05:00
PeninsulaInd a8393cdd96 Fixed: Now listens to model selection in job.json file 2025-10-22 15:34:36 -05:00
PeninsulaInd 90b56cf7bf Story 4.5 coded and tested 2025-10-22 14:19:59 -05:00
PeninsulaInd 77356c4191 Story 4.4 - simple check works 2025-10-22 13:46:14 -05:00
PeninsulaInd b3e35b0b4d Story 4.1-3 coded and real-world tested. Working 2025-10-22 13:04:03 -05:00
PeninsulaInd 8a382a1db4 Story 4.1 coded - pre real testing 2025-10-22 12:19:25 -05:00
PeninsulaInd a17ec02deb Story 3.4 writen and qa 2025-10-21 19:15:02 -05:00
PeninsulaInd f466cf5f3f Story 3.4 generated with corrected logic and data storage 2025-10-21 18:59:26 -05:00
PeninsulaInd ee66d9e894 Story 3.3: QA fixed cli integration 2025-10-21 14:28:18 -05:00
PeninsulaInd b7405d377e Story 3.3: QA says all of epic 3 isnt in batch_processor.py, pre fix 2025-10-21 13:51:38 -05:00
PeninsulaInd 87bf317207 Story 3.2: Link tier strategy implemented 2025-10-21 10:56:35 -05:00
PeninsulaInd ee573fb948 Story 3.2 written 2025-10-21 10:34:11 -05:00
PeninsulaInd 6a3e65ef7c Story 2.5 kludgy mapping of buckets to real domains 2025-10-20 23:35:55 -05:00
PeninsulaInd 7a9346635b Story 2.4 html formatting simple solution 2025-10-20 16:43:31 -05:00
PeninsulaInd 19e1c93358 Resolve merge conflicts - choose newer implementations 2025-10-20 11:43:33 -05:00
PeninsulaInd ef62ecf852 Passed initial test, generates an entire article 2025-10-20 11:35:02 -05:00
PeninsulaInd 3063fc4b84 Story 2.3 - content generation script nightmare alomst done - fixed (maybe) outline too big issue 2025-10-19 20:46:06 -05:00
PeninsulaInd b6b0acfcb0 Story 2.3 - content generation script nightmare alomst done - pre-fix outline too big issue 2025-10-19 20:29:13 -05:00
PeninsulaInd f73b0700ef Story 2.3 - content generation script finished - fix ci 2025-10-18 22:42:21 -05:00
PeninsulaInd e2afabb56f Story 2.3 - content generation script finished 2025-10-18 22:38:34 -05:00
PeninsulaInd 0069e6efc3 Story 2.2 - rule engine finished 2025-10-18 20:52:53 -05:00
PeninsulaInd 02dd5a3fa7 Story 2.1 finished 2025-10-18 14:47:19 -05:00
PeninsulaInd da797c21a1 Story 1.6 finished - added sync 2025-10-18 12:24:58 -05:00
PeninsulaInd 4cada9df42 Story 1.6 finished 2025-10-18 11:35:47 -05:00
PeninsulaInd b6e495e9fe feat: Story 1.5 - CLI User Management
- 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.
2025-10-18 11:13:45 -05:00
PeninsulaInd 0a223e2fc5 Complete Story 1.4: Internal API Foundation
- 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
2025-10-18 10:46:44 -05:00
PeninsulaInd 8641bcae45 Complete Epic 1 Stories 1.1-1.3: Foundation, Database, and Authentication
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
2025-10-18 00:20:07 -05:00
PeninsulaInd 70b9de20b4 feat: Complete Story 1.1 - Project Initialization & Configuration
- 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.
2025-10-17 23:42:16 -05:00