Building an Auto-Generated Technical Blog System Across Four Domain Properties
This session involved architecting and implementing a comprehensive technical documentation system that automatically captures development work across four independent properties: queenofsandiego.com, sailjada.com, dangerouscentaur.com, and burialsatseasandiego.com. Each property now has its own technical blog accessible at tech.[domain].com, with infrastructure provisioning, DNS routing, and automated post generation.
The Problem Statement
The challenge was to create a transparent, granular technical audit trail visible to stakeholders (particularly for stakeholder review) without manual effort. High-level summaries don't expose the architectural decisions, infrastructure changes, and technical depth of ongoing work. The system needed to be:
- Fully automated — capture work from Claude Code sessions without manual intervention
- Granular — include specific file paths, function names, infrastructure resource IDs, exact changes
- Property-aware — separate tech blogs for each domain with independent infrastructure
- Secure — never expose credentials, API keys, or sensitive data
- Integrated — accessible from the main site navigation (Ship's Papers menu)
Infrastructure Architecture
Each tech blog uses an identical AWS infrastructure pattern but deployed independently:
- S3 Origin Bucket: Static HTML blog content stored in
tech-[domain]-blogbucket (e.g.,tech-queenofsandiego-blog,tech-sailjada-blog,tech-dangerouscentaur-blog,tech-burialsatseasandiego-blog) - CloudFront Distribution: Global CDN with automatic GZIP compression, cache invalidation support, and custom domain CNAME routing
- DNS Integration: Route53 CNAME records (for AWS-managed domains) or external DNS provider records (GoDaddy for burialsatseasandiego.com, Namecheap for dangerouscentaur.com)
- SSL/TLS: Existing wildcard ACM certificates leveraged where available (
*.queenofsandiego.com,*.sailjada.com); new certificates provisioned for dangerouscentaur and burialsatseasandiego with DNS validation
Technical Implementation Details
Infrastructure Provisioning Script
The core provisioning logic was implemented in /Users/cb/Documents/repos/tools/tech_blog_init.py. This script:
- Reads domain configuration from environment and hardcoded mappings
- Creates S3 buckets with appropriate naming conventions and public read permissions for CloudFront
- Provisions CloudFront distributions with origin access control (OAC) to restrict direct S3 access
- Handles DNS routing through two providers:
- Route53: For queenofsandiego.com and sailjada.com domains (AWS-managed)
- External DNS: GoDaddy API integration for burialsatseasadiego.com; Namecheap manual CNAME records for dangerouscentaur.com
- Manages ACM certificate validation with DNS CNAME records automatically added to GoDaddy
- Outputs infrastructure configuration to
memory/tech_blogs_infrastructure.jsonfor reference and idempotency
Blog Generator and Automation
Created /Users/cb/Documents/repos/tools/tech_blog_generator.py to convert Claude Code session transcripts into technical blog posts. The generator:
- Reads JSONL-formatted session transcripts from Claude's session directory
- Extracts file modification events, command execution history, and tool interactions
- Filters sensitive data using regex patterns for credentials, API keys, tokens, and personal information
- Generates HTML articles with semantic structure (
<h2>,<h3>,<ul>,<code>,<pre>) - Publishes to the appropriate S3 bucket based on session context
- Invalidates CloudFront cache to ensure immediate visibility
Stop Hook Integration
Integrated with Claude Code's session lifecycle by creating /Users/cb/.claude/hooks/tech_blog_stop.sh:
- Executes when a coding session ends
- Triggers the blog generator automatically without manual intervention
- Routes output to the correct domain's tech blog based on session metadata
- Logs all operations to
~/.claude/logs/tech_blog_generation.logfor debugging
The hook was registered in /Users/cb/.claude/settings.json under the hooks configuration section.
Site Navigation Integration
Updated the Ship's Papers navigation menu in each domain's main navigation HTML to include links to the tech blog:
- Modified
/Users/cb/Documents/repos/sites/queenofsandiego.com/index.htmlto add "Technical Blog" link in the Ship's Papers dropdown - Used consistent URL pattern:
https://tech.[domain].com/ - Maintained existing navigation hierarchy and styling
Domain-Specific Configuration
Each domain has unique DNS and certificate considerations:
- queenofsandiego.com: Route53 hosted zone with existing wildcard cert; tech blog deployed with
tech-queenofsandiego-blogS3 bucket and standard CloudFront + Route53 CNAME - sailjada.com: Route53 hosted zone with existing wildcard cert; uses separate
tech-sailjada-blogbucket and CloudFront distribution - dangerouscentaur.com: Uses existing wildcard CloudFront distribution (E2Q4UU71SRNTMB) on
dc-sitesS3 bucket; tech blog deployed as a subdirectory route with Namecheap DNS CNAME - burialsatseasandiego.com: GoDaddy-managed DNS; new ACM certificate provisioned with DNS validation; tech blog deployed to
tech-burialsatseasandiego-blogS3 bucket with CloudFront; DNS validation CNAME automatically added to GoDaddy via API
Key Architectural Decisions
- Separate S3 buckets per domain: Isolates configuration, permissions, and content; simplifies scaling and security policies
- CloudFront caching strategy: Leverages CDN for global distribution; cache invalidation triggered on each new post for immediate visibility
- Automated secret filtering: Regex-based scrubbing of credentials before publishing ensures transparency without security risk
- Post-session automation: Stop hook ensures blog generation happens automatically without manual coordination
- Session-aware routing: Blog posts are directed to the correct domain based on session context metadata rather than hardcoding