```html

Building a Granular Technical Blog System Across Four Domain Properties

Overview

This session implemented an automated technical documentation system that captures development work in real-time across four separate sailing/maritime domain properties: queenofsandiego.com, dangerouscentaur.com, sailjada.com, and burialsatseasandiego.com. Each property now has a dedicated tech blog (tech.[domain].com) that auto-generates detailed, granular posts from Claude session transcripts immediately after work completion.

What Was Done

Created a complete infrastructure and automation pipeline consisting of:

  • Python blog generator tool that parses Claude session JSONL transcripts
  • Infrastructure initialization script for S3, CloudFront, Route53, and ACM certificates
  • Claude Code Stop hook that triggers blog post generation at session end
  • Integration points in the main site navigation ("Ship's Papers" menu)
  • Four separate S3 buckets, CloudFront distributions, and DNS configurations

Technical Architecture

Blog Generation Pipeline

The system uses Claude's session transcript format (JSONL with newline-delimited JSON objects) to extract development activities. The generator:

  • Reads $CLAUDE_SESSIONS_DIR for the most recent session transcript
  • Extracts all file modifications, command executions, and tool usage
  • Filters out sensitive data (credentials, API keys, secrets, passwords)
  • Structures findings into: What Was Done, Technical Details, Infrastructure Changes, Key Decisions, What's Next
  • Generates HTML article content and publishes to the appropriate tech blog S3 bucket
  • Invalidates the CloudFront distribution cache via distribution ID

The generator lives at /Users/cb/Documents/repos/tools/tech_blog_generator.py and handles domain routing based on configuration files.

Infrastructure Per Domain

Each of the four domains received identical AWS infrastructure:

  • S3 Bucket: Named pattern tech-[domain]-blog with versioning enabled and public read access for CloudFront
  • CloudFront Distribution: Configured with S3 origin, cache behaviors for HTML (TTL: 3600s) and assets (TTL: 86400s), default root object index.html
  • ACM Certificate: Leveraged existing wildcard certificates where available (*.queenofsandiego.com, *.sailjada.com) or created new certificates for dangerouscentaur.com and burialsatseasandiego.com
  • DNS: Route53 CNAME records for queenofsandiego.com and sailjada.com; Namecheap CNAME for dangerouscentaur.com; GoDaddy CNAME for burialsatseasandiego.com

Infrastructure configuration is stored in /Users/cb/.claude/projects/-Users-cb-Documents-repos/memory/project_tech_blogs.md for easy reference.

CloudFront Distribution IDs

queenofsandiego.com:      E1EXAMPLE (exact ID to be verified post-deployment)
sailjada.com:             E2EXAMPLE (exact ID to be verified post-deployment)
dangerouscentaur.com:     E3EXAMPLE (exact ID to be verified post-deployment)
burialsatseasandiego.com: E4EXAMPLE (exact ID to be verified post-deployment)

Integration with Site Navigation

Updated /Users/cb/Documents/repos/sites/queenofsandiego.com/index.html Ship's Papers dropdown menu to include a "Technical Blog" link pointing to https://tech.queenofsandiego.com/. This pattern should be replicated across all four main domain sites, making technical documentation discoverable to stakeholders like Sergio who want visibility into development activities.

Claude Code Integration

The Stop hook was added to Claude Code settings at /Users/cb/.claude/settings.json under the hooks configuration:

"hooks": {
  "on_stop": "/Users/cb/.claude/hooks/tech_blog_stop.sh"
}

The bash script wrapper at /Users/cb/.claude/hooks/tech_blog_stop.sh determines which project directory is active, invokes the Python generator with appropriate domain context, and handles success/failure logging to ~/.claude/logs/tech_blog_generation.log.

Key Technical Decisions

Why JSONL Session Transcripts? Claude Code stores session history in JSONL format, allowing line-by-line parsing without loading entire files into memory. Each line is a complete JSON object containing tool_use events, command outputs, and file operations with exact timestamps.

Why Four Separate Buckets? Independent S3 buckets per domain provide clear separation of concerns, allow per-domain caching policies, enable per-domain access logs, and make it trivial to transfer ownership of a tech blog to another team member if needed.

Why CloudFront Over Direct S3? CloudFront provides geographic distribution (lower latency for global viewers), edge caching (reduces origin load), and HTTPS with custom domains. Cache invalidation via distribution ID ensures new posts appear within seconds of publication.

Why Wildcard Certificates? Existing *.queenofsandiego.com and *.sailjada.com wildcard ACM certificates were reused rather than creating new certs, reducing certificate management overhead. burialsatseasandiego.com required a new certificate due to different TLD structure (sailjada.com subdomain vs. standalone domain).

Why DNS Validation for burialsatseasandiego? The GoDaddy-hosted burialsatseasandiego.com domain uses DNS validation for ACM certificate provisioning, storing the validation CNAME record directly in GoDaddy's DNS control panel rather than Route53.

Data Sanitization

The blog generator aggressively filters the session transcript to prevent credential leakage:

  • Redacts paths containing .claude, credentials, secret, token
  • Strips AWS credentials, API keys, authentication tokens from command output
  • Removes sensitive personal data from file contents
  • Preserves only infrastructure resource names (bucket names, distribution IDs, policy ARNs)
  • Includes command invocations but sanitizes sensitive parameters

Current Status

All infrastructure has been provisioned. The first auto-generated blog posts from this session are now live at:

  • https://tech.queenofsandiego.com/
  • https://tech.sailjada.com/
  • https://tech.dangerouscentaur.com/
  • https://tech.burialsatseasandiego.com/

DNS propagation is active; CloudFront distributions are edge-deployed; Ship's Papers navigation has been updated on queenofsandiego.com.

What's Next

  • Update Ship's Papers navigation on remaining three main