```html

Implementing Automated Technical Blog Generation Across Four Domain Properties

What Was Done

Built an automated technical blog generation system that captures development work across four domain properties (queenofsandiego.com, dangerouscentaur.com, sailjada.com, and burialsatseasandiego.com) and publishes granular technical documentation to corresponding tech subdomains in real-time. This system integrates with Claude Code's session management to extract detailed technical information about infrastructure changes, deployments, and code modifications.

Architecture Overview

The system consists of three primary components:

  • tech_blog_generator.py — Parses Claude Code session transcripts (JSONL format) and transforms raw tool use logs into structured blog posts
  • tech_blog_init.py — Handles infrastructure provisioning: S3 buckets, CloudFront distributions, ACM certificate validation, and DNS configuration across multiple providers (Route53, Namecheap, GoDaddy)
  • tech_blog_stop.sh — Claude Code Stop hook that triggers blog generation automatically when a development session ends

Infrastructure Setup Details

S3 and CloudFront Distribution

Created four separate S3 buckets following naming convention:

  • tech-qos-blog for queenofsandiego.com
  • tech-dc-blog for dangerouscentaur.com
  • tech-jada-blog for sailjada.com
  • tech-bats-blog for burialsatseasandiego.com

Each bucket is configured as a static website origin for a CloudFront distribution. The distributions leverage existing wildcard ACM certificates:

  • *.queenofsandiego.com certificate (existing) for both queenofsandiego.com and sailjada.com wildcard
  • *.dangerouscentaur.com certificate (existing) via reuse of wildcard CloudFront distribution (ID: E2Q4UU71SRNTMB on dc-sites bucket)
  • New certificate for burialsatseasandiego.com domain

DNS Configuration Strategy

Domain DNS providers vary, requiring different approaches:

  • queenofsandiego.com & sailjada.com — Route53 hosted zones with ALIAS records pointing to respective CloudFront distributions
  • dangerouscentaur.com — Namecheap DNS with CNAME record pointing to CloudFront distribution alias
  • burialsatseasandiego.com — GoDaddy DNS with CNAME record; required API integration for ACM certificate DNS validation

The initialization script detects current nameservers and applies appropriate DNS records without requiring nameserver changes.

Blog Generation Pipeline

Session Transcript Parsing

Claude Code stores session transcripts in /Users/cb/.claude/sessions/ as JSONL files. Each line represents a timestamped event. The generator extracts "tool_use" blocks containing:

  • Tool name (e.g., "bash", "read_file", "write_file")
  • Input parameters (file paths, commands executed)
  • Execution results and output
  • Timestamps for chronological ordering

The parser filters sensitive data patterns (credentials, API keys, tokens) before content reaches the blog.

Content Structuring

Generated posts follow a consistent format:

  • Title — Specific to the work performed, not generic summaries
  • What Was Done — Executive summary of changes
  • Technical Details — Granular breakdown with exact file paths, function names, resource IDs
  • Infrastructure Changes — CloudFront invalidations, S3 uploads, DNS updates with specific ARNs/distribution IDs
  • Key Decisions — Architecture patterns and rationale
  • What's Next — Follow-up work or known issues

Site Navigation Integration

Updated queenofsandiego.com's Ship's Papers menu to include a "Tech Blog" link pointing to tech.queenofsandiego.com. This navigation pattern is replicated across all four domain properties, making technical documentation discoverable from primary navigation rather than buried in backend systems.

The index.html files on each tech blog subdomain are configured as CloudFront default root objects, serving immediately on domain access.

Key Technical Decisions

Wildcard Certificate Reuse

Rather than creating four separate ACM certificates, we leveraged existing wildcard certs. For dangerouscentaur.com, which already had a wildcard CloudFront distribution, we added the tech subdomain as an additional CNAME, eliminating redundant infrastructure.

DNS Provider Abstraction

The initialization script detects DNS provider by querying nameservers, then applies provider-specific record creation. This avoids maintaining duplicate logic and handles future domain transfers without script modification.

Credential Redaction Pipeline

The blog generator includes regex-based filtering for common credential patterns:

  • API keys and tokens (patterns like "sk_live_", "ghp_", etc.)
  • AWS credentials and temporary tokens
  • Database connection strings with embedded passwords
  • Personally identifiable information (phone numbers, email addresses)

Redacted content displays as [REDACTED] with a note in the post footer explaining why content was filtered.

Automation via Claude Code Hooks

The Stop hook (/Users/cb/.claude/hooks/tech_blog_stop.sh) executes when a Claude Code session ends. It:

  • Reads the completed session transcript
  • Invokes the blog generator with the session file path
  • Uploads generated HTML to the appropriate S3 bucket
  • Invalidates the CloudFront distribution cache
  • Logs completion status to /var/log/tech_blog_generation.log

The hook runs asynchronously to avoid blocking session shutdown, with error handling that sends alerts if generation fails.

Current Status and Deployment

All four tech blog subdomains are live and accessible:

  • tech.queenofsandiego.com (CloudFront ID: [generated])
  • tech.dangerouscentaur.com (CloudFront ID: E2Q4UU71SRNTMB, shared origin)
  • tech.sailjada.com (CloudFront ID: [generated])
  • tech.burialsatseasandiego.com (CloudFront ID: [generated])

DNS propagation complete. ACM certificates validated (DNS validation for burialsatseasandiego.com via GoDaddy API integration).

What's Next

  • Monitor first week of automated post generation to identify edge