Multi-Stakeholder Executive Reporting Infrastructure: Automated SES Delivery with Role-Specific Analysis
Over a compressed development cycle, we built and deployed an automated executive reporting system designed to deliver nuanced, stakeholder-specific analyses across a portfolio of four primary business entities (JADA, Queen of San Diego, QuickDumpNow, DangerousCentaur) plus three ancillary revenue streams. This post covers the technical architecture, deployment strategy, and lessons learned building a scalable, credential-safe reporting pipeline.
What Was Done
We created two complementary Python scripts to generate and distribute eight specialized executive reports:
- send_exec_reports.py — Primary production script generating five role-specific reports (CEO, CTO, Accounting, CMO, CFO)
- send_exec_reports_2.py — Secondary script for three domain-specific audits (Real Estate, Logistics, Client Portfolio)
Reports were authored with deep context from project handoff documents, live codebase inspection, and financial/operational telemetry. Each report was delivered via AWS SES to the same recipient (C-suite inbox) with administrative visibility via BCC to admin@queenofsandiego.com.
Concurrently, we completed a major backend refactor of the Ship Captain Crew (SCC) Lambda function and frontend to support event scheduling, role management, waiver processing, and magic-link authentication—work that informed the technical audit perspective in the CTO report.
Technical Details: Report Generation Pipeline
Architecture Overview
The reporting system follows a three-stage pipeline:
- Context Aggregation — Read project metadata from
/Users/cb/Documents/repos/agent_handoffs/projects/, inspect live codebase in/Users/cb/Documents/repos/sites/, and synthesize operational/financial state - Report Generation — Render stakeholder-specific findings in plain text with structured sections (KPIs, shortfalls, recommendations, timelines)
- SES Delivery — Use boto3 to send via verified sender, with To/BCC/Subject headers properly configured
SES Configuration
All reports were sent from admin@queenofsandiego.com, a verified SES sender in the us-west-2 region. This sender is configured in repos.env as a plaintext variable, retrieved at runtime:
import boto3
import os
ses_client = boto3.client('ses', region_name='us-west-2')
sender_email = os.getenv('SES_FROM_ADDRESS', 'admin@queenofsandiego.com')
recipient_email = 'c.b.ladd@gmail.com'
bcc_address = 'admin@queenofsandiego.com'
response = ses_client.send_email(
Source=sender_email,
Destination={
'ToAddresses': [recipient_email],
'BccAddresses': [bcc_address]
},
Message={
'Subject': {'Data': subject_line},
'Body': {'Text': {'Data': report_body}}
}
)
Why this approach? SES is cost-effective (pennies per 1000 emails) and integrates natively with AWS; no external SMTP relay needed. Hardcoding the sender avoids credentials in code—the sender address is a public routing address, not a secret. The recipient and BCC are stable across runs, making the script idempotent.
Report Content Strategy
Each report was structured to mirror the stakeholder's decision-making criteria:
- CEO Report — Assets (4 operating entities, 3 revenue streams), 8 critical shortfalls (empty charter pipeline, zero OTA presence, billing model gaps, equity risk from key personnel), 9 missing KPIs, 30-day action plan
- CTO Report — Stack audit by domain (JADA: Node.js/SQLite, QOS: Python Lambda/DynamoDB, QDN: lightweight PHP, DC: serverless), 6 security gaps (hardcoded Stripe keys in repos, plaintext .env files, unauthenticated GAS endpoints, no WAF), AWS cost analysis (~$50–84/mo), 10 prioritized engineering actions
- Accounting Report — Revenue recognition issues, full chart of accounts blueprint, expense audit, evidence of missing accounting systems, 4-milestone profitability roadmap
- CMO Report — Channel matrix (email, SMS, social, OTA), case for 3,676-person blast (~$10K–50K upside), OTA sequencing (Sailo → GetMyBoat → Viator/GYG), QDN local SEO roadmap, 30/60/90-day milestones
- CFO Report — Burn rate model (~$7–9K/mo), capital deployment framework (zero-cost initiatives first), break-even at 6 charters/month, monthly revenue targets through Q4 2026, 3 non-negotiable financial rules
Three secondary reports covered:
- Real Estate Audit (3028 51st St Rental) — Occupancy tracking, rent collection, maintenance cost baseline
- Logistics Audit (Expert Yacht Delivery) — Service delivery model, revenue recognition, customer acquisition cost
- Client Portfolio Audit (DangerousCentaur) — Billing gaps, contract enforcement, revenue leakage
Concurrent Infrastructure Work: SCC Lambda & Frontend Deployment
During this cycle, we also refactored the Ship Captain Crew booking system to production-grade maturity:
Lambda Function Hardening
Modified /Users/cb/Documents/repos/sites/queenofsandiego.com/tools/shipcaptaincrew/lambda_function.py across 15+ commits to add:
- JWT Authentication — Magic-link token generation and verification for crew/admin roles
- Event CRUD — Create, read, update event metadata in DynamoDB table
scc_events - Role Management — Claim/designate/release roles (Captain, Crew, Guest) with conflict detection
- Checklist Tracking — Load/save pre-departure and post-return checklists with timestamp hooks
- Waiver Processing — Guest waiver submission, hold logic, email delivery via SES
All endpoints secured with JWT validation; secrets (JWT_SECRET) stored in AWS Secrets Manager and injected at Lambda initialization.
Frontend Deployment
Updated frontend/index.html (4 major edits) to render:
- Event selection and role claim modal (with magic-link token injection)
- Dynamic role state (Captain, Crew, Guest, Unassigned) with color-coded badges
- Checklist UI with timing panel (departure/return times auto-filled from event metadata)
- Waiver form with hold status display
- Admin dashboard with user management and event roster