The Trinity Beast – Command Center Guide

Complete User's Guide to the Trinity Beast Command Center (TBCC)

Console: https://cpmp-site.org/admin/trinity-beast-command-center.html Updated: April 2026 Version: 1.0

1. Overview

The Trinity Beast Command Center (TBCC) is a unified operations dashboard that brings together all administrative functions for The Trinity Beast Infrastructure into a single browser-based interface. Rather than switching between multiple AWS Console tabs, admin pages, and terminal windows, the TBCC provides everything you need in one place.

The console is designed as a widget-based dashboard modeled after the AWS Console experience, with a dark theme and card-based layout that organizes operational tools by function. Key capabilities include:

2. Getting Started

2.1 Prerequisites

Before using the TBCC, ensure the following are in place on your Neo machine:

2.2 Starting the Terminal Relay

The terminal relay is a lightweight Python WebSocket server that bridges the TBCC browser interface to your local shell. To start it, run tbccstart from any terminal window.

#!/bin/bash
# The Trinity Beast Command Center — Start Terminal Relay
# Run from anywhere: tbccstart

SCRIPT_DIR="$(cd "$(dirname "$(readlink -f "$0" 2>/dev/null || echo "$0")")" && pwd)"
RELAY="$SCRIPT_DIR/terminal-relay.py"

if ! [ -f "$RELAY" ]; then
  echo "❌ terminal-relay.py not found at $RELAY"
  exit 1
fi

# Check if already running
if pgrep -f "terminal-relay.py" > /dev/null 2>&1; then
  echo "⚡ Terminal Relay is already running (PID $(pgrep -f terminal-relay.py))"
  exit 0
fi

nohup python3 "$RELAY" > /tmp/tbcc-relay.log 2>&1 &
PID=$!
echo $PID > /tmp/tbcc-relay.pid
sleep 1

if kill -0 $PID 2>/dev/null; then
  echo "✅ Terminal Relay started (PID $PID)"
  echo "   Listening on ws://127.0.0.1:9999"
  echo "   Log: /tmp/tbcc-relay.log"
  echo "   Stop: tbccstop"
else
  echo "❌ Failed to start. Check /tmp/tbcc-relay.log"
  exit 1
fi

2.3 Stopping the Terminal Relay

To stop the terminal relay, run tbccstop from any terminal window. This kills the background relay process and cleans up the PID file.

#!/bin/bash
# The Trinity Beast Command Center — Stop Terminal Relay
# Run from anywhere: tbccstop

PIDS=$(pgrep -f "terminal-relay.py")

if [ -z "$PIDS" ]; then
  echo "⚡ Terminal Relay is not running."
  rm -f /tmp/tbcc-relay.pid
  exit 0
fi

kill $PIDS 2>/dev/null
rm -f /tmp/tbcc-relay.pid
echo "✅ Terminal Relay stopped (PID $PIDS)"

2.4 Accessing the Console

Once the terminal relay is running, open the TBCC in any browser:

https://cpmp-site.org/admin/trinity-beast-command-center.html

3. Console Layout

The TBCC is organized into distinct visual regions designed for efficient operations workflow:

The six widgets are:

  1. Newsletter Administration — Orange envelope icon
  2. Support Administration — Blue chat bubble icon
  3. Email Administration — Purple open envelope icon
  4. CloudWatch Monitoring — Cyan bar chart icon
  5. Stripe Administration — Indigo Stripe "S" icon
  6. Testing & cURL Commands — Green lab flask icon
  7. AWS Operations — Rose server stack icon

TBCC Dashboard — Full Widget Grid

Below is a representative view of the TBCC dashboard showing all six widgets, the top navigation bar with relay status and Demo Key toggle, and the terminal panel at the bottom:

The Trinity Beast Command Center — Dashboard
The Trinity Beast Command Center v1.0
Terminal Relay: Connected · Uptime 12m 45s
Demo 3 QPS Perf 1000 QPS
Website AWS Console
Newsletter Administration
Newsletter Console
Create, edit, send
Templates
Manage templates
Subscribers
View subscriber list
Support Administration
Support Console
Dashboard & tickets
Public Support
Customer form
Ticket Stats
Live JSON stats
Email Administration
Email Console
Templates, compose, send
Drafts
Resume saved emails
Senders
From & reply-to
CloudWatch Monitoring Live
App Dashboard
LPO, LRS, Lambda
Log Groups
ECS & Lambda logs
Alarms
SNS alerts
Testing & cURL API
LPO Health Check Run ▶
LRS Health Check Run ▶
Fetch BTC Price Run ▶
Support Stats Run ▶
+ 8 more commands
AWS Operations CLI
Kiro CLI
Launch Kiro CLI Run ▶
Database Tools
🐘 Aurora pgAdmin Run ▶
ECS Exec Tunnels
🔌 Main Service Run ▶
+ 15 more commands
trinity-beast — bash ● Online
Connected to Terminal Relay (ws://127.0.0.1:9999)
$ curl -s https://api.cpmp-site.org/health
LPO Health Check - OK
[exit 0]
TBCC $ Type a command or click one above...

4. Newsletter Administration Widget

Icon: ✉ Orange envelope  |  Purpose: Manage newsletter creation, templates, subscribers, and sending.

The Newsletter Administration widget provides quick-access tiles to the Newsletter Admin Console and its key sections. Each tile links directly to the relevant tab so you can jump straight into the task at hand.

Service Tiles

TileDescriptionLinks To
Newsletter ConsoleCreate, edit, and send newslettersnewsletteradmin.html
TemplatesManage reusable newsletter templatesnewsletteradmin.html#templates
SubscribersView and manage subscriber listsnewsletteradmin.html#subscribers

Newsletter Admin Console — Archive Tab

The archive tab displays all sent and active newsletters with type badges, dates, and status indicators. Below is a representative view of the archive:

Newsletter Admin Console — Archive
Title Date Type Status
Spring Mission Update — Brick Kiln Families Apr 12, 2026 CPMP Active
LPO v3.2 Release — New Assets & Performance Apr 8, 2026 Listener Active
Easter Celebration in Lahore Mar 28, 2026 CPMP Active
Subscribers
Email Type
bugs.bunny@acme.com CPMP
daffy.duck@acme.com Listener
scooby.doo@mysteryinc.com CPMP
fred.flintstone@bedrock.net CPMP
george.jetson@spacely.com Listener

5. Support Administration Widget

Icon: 💬 Blue chat bubble  |  Purpose: Manage customer support tickets, respond to inquiries, and track resolution.

The Support Administration widget provides access to the full support ticket lifecycle — from customer submission through resolution and closure. It links to both the admin-facing console and the public-facing support page.

Service Tiles

TileDescriptionLinks To
Support ConsoleDashboard, ticket management, repliessupportadmin.html
Public Support PageCustomer-facing ticket submission formsupport.html
Ticket StatsLive JSON endpoint for ticket statisticsAPI endpoint

Workflow Statuses

Support tickets progress through the following statuses as they move through the resolution workflow:

StatusColorDescription
NewOrangeJust submitted, not yet reviewed by an administrator
OpenBlueAcknowledged by an admin, currently being reviewed
In ProgressPurpleActively being worked on — investigation or fix underway
Awaiting CustomerYellowAdmin has replied, waiting for customer response
ResolvedGreenIssue has been addressed and solution provided
ClosedGrayFinalized — no further action needed

Categories

Tickets are classified into the following categories to help route and prioritize them:

Support Admin Dashboard

The dashboard provides an at-a-glance view of ticket volume and status distribution, along with a table of recent tickets.

Support Admin Console — Dashboard
Total
12
New
3
Open
4
In Progress
2
Awaiting
1
Resolved
1
Closed
1
Ticket # Subject Name Email Category Status IP Address
CPMP-20260417-a3f1 API key not working Bugs Bunny bugs.bunny@acme.com API/Technical New 73.162.45.12
CPMP-20260416-b7c2 Donation receipt missing Daffy Duck daffy.duck@acme.com Billing Open 98.45.123.67
CPMP-20260415-d4e8 Feature: Add MATIC support Scooby Doo scooby.doo@mysteryinc.com Feature Request In Progress 104.28.91.33
CPMP-20260414-f1a9 Medical camp photos not loading Velma Dinkley velma@mysteryinc.com Bug Report Awaiting Customer 72.14.205.99
CPMP-20260413-c5b3 How to subscribe to LPO Fred Flintstone fred@bedrock.net General Resolved 209.85.147.27
CPMP-20260412-e2d6 WebSocket feed disconnecting George Jetson george@spacely.com API/Technical Closed 142.250.80.14

Public Support Page

The public support page at cpmp-site.org/support.html allows customers to submit new tickets without needing an admin account. Below is a representative view of the submission form:

Public Support Page — Submit a Ticket
Submit a Support Ticket
Full Name
Yogi Bear
Email Address
yogi@jellystone.gov
Category
General Inquiry
Subject
Picnic basket delivery schedule
Message
Hi there, I'd like to know the delivery schedule for picnic baskets in the Jellystone Park area. Can you send me the latest catalog? Thanks!
Submit Ticket

6. Email Administration Widget

Icon: 📨 Purple open envelope  |  Purpose: Compose and send emails via Amazon SES with templates, drafts, and configurable senders.

The Email Administration widget provides access to the Email Admin Console where you can compose emails using pre-built templates, manage drafts, and configure sender addresses. All emails are sent through Amazon SES with proper DKIM and SPF authentication.

Service Tiles

TileDescriptionLinks To
Email ConsoleTemplates, compose, drafts, sendemailadmin.html
DraftsResume saved email draftsemailadmin.html#drafts
SendersManage from-addresses and reply-toemailadmin.html#senders

Configured Senders

The following sender identities are configured in Amazon SES for use with the Email Admin Console:

Display NameEmailPurpose
CPMP SupportSupport@CPMP-Site.orgCustomer support correspondence
CPMP MissionContact@CPMP-Site.orgGeneral public contact, donation inquiries
CPMP MissionNo-Reply@CPMP-Site.orgAutomated emails (receipts, welcome, newsletters)
CPMP AdminAdmin@CPMP-Site.orgSystem admin, AWS alerts, TBCC notifications
The Trinity BeastPartners@CPMP-Site.orgPartner applications and onboarding
Cory Dean KalaniCoryDeanKalani@CPMP-Site.orgPrimary account — all aliases route here

Email Admin Console — Compose Tab

The compose tab provides a rich email editor with template selection, sender configuration, recipient management, and a Quill.js rich text editor for the email body.

Email Admin Console — Compose
Template
Welcome Email (support)
From
CPMP Support <Support@CPMP-Site.org>
Subject
Welcome to Cross Power Ministries
Recipients (To)
wile.e.coyote@acme.com, road.runner@acme.com
CC
tweety@wb.com
Body
B I U   H1 H2   🔗 📷   • ≡
Dear Wile E. and Road Runner,

Welcome to Cross Power Ministries of Pakistan! We're thrilled to have you join our community. Your support helps fund freedom from brick kiln debt bondage across Pakistan.

Best regards,
CPMP Support Team
Save Draft Send Email

Email Translations Management

Newsletter welcome emails are language-aware. The email_translations table in Aurora stores all translatable text fields for each SES template. When a subscriber signs up, the server looks up their preferred language and passes the translated fields to SES. To update any translation, modify the row in the table — no code changes or redeployment required.

TemplateLanguagesFieldsPurpose
CPMPNewsletterWelcome9 (en, ur, pa, es, fr, de, hi, ja, ar)subject, heading, body, freedom, medical, water, education, word, mapBtn, giveBtn, unsubscribeCPMP mission newsletter welcome email
LPONewsletterWelcome9 (en, ur, pa, es, fr, de, hi, ja, ar)subject, heading, body, docsBtn, apiBtn, unsubscribeLPO/Trinity Beast newsletter welcome email

Viewing Translations

To view all translations for a template and language:

POST /admin/sql
{"query": "SELECT field_name, field_value FROM email_translations WHERE template_name = 'CPMPNewsletterWelcome' AND lang = 'de' ORDER BY field_name", "mode": "read"}

Updating a Translation

To update a single field (e.g., change the German subject line):

POST /admin/sql-batch
{"query": "UPDATE email_translations SET field_value = 'Willkommen beim CPMP-Newsletter' WHERE template_name = 'CPMPNewsletterWelcome' AND lang = 'de' AND field_name = 'heading'"}

Adding a New Language

To add a new language (e.g., Italian), insert all fields for each template:

POST /admin/sql-batch
{"query": "INSERT INTO email_translations (template_name, lang, field_name, field_value) VALUES ('CPMPNewsletterWelcome', 'it', 'subject', 'Benvenuto alla Newsletter CPMP'), ('CPMPNewsletterWelcome', 'it', 'heading', 'Benvenuto alla Newsletter CPMP'), ... ON CONFLICT (template_name, lang, field_name) DO UPDATE SET field_value = EXCLUDED.field_value;"}

No redeployment needed: All email translations are read from the database at send time. Update a row in email_translations and the next welcome email sent in that language will use the new text immediately. The SES templates use {{variable}} placeholders — the server fills them from the table.

7. CloudWatch Monitoring Widget

Icon: Cyan bar chart  |  Purpose: Direct links to AWS CloudWatch dashboards and monitoring resources.

The CloudWatch Monitoring widget provides one-click access to the key monitoring dashboards, log groups, and alarm configurations in AWS CloudWatch. These links open directly in the AWS Console for the us-east-2 region.

Service Tiles

TileDescriptionLinks To
Application DashboardLPO, LRS, Lambda, and Container metrics — CPU, memory, request rates, latency, cache hit ratiosAWS CloudWatch Dashboard
Security DashboardWAF blocks, GuardDuty findings, rate limiting, ALB error codes, security alarms, ElastiCache healthAWS CloudWatch Dashboard
Log GroupsAll ECS task and Lambda function log streams for real-time log tailing and searchAWS CloudWatch Log Groups
AlarmsSNS alert thresholds and notification configurations — CPU spikes, error rates, unhealthy targets, WAF blocks, GuardDuty findingsAWS CloudWatch Alarms
ℹ️ CloudWatch links open in the AWS Console. Make sure you are logged into the correct AWS account (211998422884) and region (us-east-2) for the dashboards to load properly.

8. Stripe Administration Widget

Icon: 💳 Indigo Stripe "S" logo  |  Purpose: Centralized access to all Stripe Dashboard functions for managing subscriptions, customers, payments, products, webhooks, and reporting.

The Stripe widget brings together everything you need to manage your payment infrastructure without navigating the Stripe site for each task. It is organized into four logical sections: Subscriptions & Customers, Products & Revenue, Configuration & Webhooks, and Reporting & Logs.

Widget Sections

Subscriptions & Customers

TileDestinationPurpose
SubscriptionsStripe → SubscriptionsView and manage all active, past due, and canceled subscriptions. Filter by status, search by customer.
CustomersStripe → CustomersCustomer profiles, payment methods on file, subscription history, and email addresses.
InvoicesStripe → InvoicesAll invoices — paid, open, void, uncollectible. Download PDFs, resend receipts, void invoices.

Products & Revenue

TileDestinationPurpose
Products & PricesStripe → ProductsManage LPO tier products (Free, Pro, Enterprise, Unlimited, Lifetime) and the LRS add-on ($20/mo). Edit prices, metadata, and descriptions.
PaymentsStripe → PaymentsAll charges, refunds, and disputes. Search by amount, customer, or payment method. Issue refunds.
Balance & PayoutsStripe → BalanceCurrent balance, pending payouts, payout schedule, and transfer history to your bank account.

Configuration & Webhooks

TileDestinationPurpose
WebhooksStripe → WebhooksWebhook endpoints, event delivery logs, failed deliveries, and retry status. Monitor the /webhook endpoint health.
Customer PortalStripe → Portal SettingsConfigure self-service portal: cancellation policy, payment method updates, invoice visibility, return URL.
Payment LinksStripe → Payment LinksCreate and manage checkout URLs for subscription tiers and the LRS add-on. Generate QR codes.

Reporting & Logs

TileDestinationPurpose
Event LogsStripe → EventsFull API event log — every webhook delivery, API call, and state change. Filter by event type.
ReportsStripe → ReportsRevenue reports, MRR (Monthly Recurring Revenue), churn rate, subscription growth, and financial summaries.
DevelopersStripe → DevelopersAPI keys (publishable + secret), API request logs, test mode toggle, and SDK documentation links.

9. Testing & cURL Commands Widget

Icon: Green lab flask  |  Purpose: Pre-built API test commands with one-click copy or execute functionality.

The Testing widget contains a library of ready-to-run cURL commands that cover the most common API testing and diagnostic scenarios. Each command has a Run ▶ button (executes in the terminal widget) and a Copy 📋 button (copies to clipboard for use in an external terminal).

Available Commands

CommandDescription
LPO Health Checkcurl -s https://api.cpmp-site.org/health
LRS Health Checkcurl -s https://lrs.cpmp-site.org/health
LRS Usage ReportFetch one usage record from the LRS reporting endpoint
Fetch BTC PriceTest BTC price query with demo API key
Fetch ETH PriceTest ETH price query with demo API key
Admin ConfigView application parameters from the admin config endpoint
Support StatsFetch live ticket statistics from the support API
Newsletter TemplatesList all available newsletter templates
Email SendersList configured email sender identities
Email TemplatesList all available email templates
Newsletter SubscribersList all newsletter subscribers
Map PinsFetch map pin data for the CPMP mission map

Testing Widget with Terminal Output

When you click Run ▶ on a command, it executes through the WebSocket relay and the output streams into the terminal widget at the bottom of the page. Below is a representative view:

Testing & cURL Commands Widget + Terminal
LPO Health Check
curl -s https://api.cpmp-site.org/health
Run ▶ Copy 📋
LRS Health Check
curl -s https://lrs.cpmp-site.org/health
Run ▶ Copy 📋
Fetch BTC Price
curl -s "https://api.cpmp-site.org/price?asset=BTC&api_key=demo-..."
Run ▶ Copy 📋
Support Stats
curl -s https://api.cpmp-site.org/admin/support/stats
Run ▶ Copy 📋
● Connected Terminal
$ curl -s https://api.cpmp-site.org/health
LPO Health Check - OK
[exit 0]

10. AWS Operations Widget

Icon: 🖥 Rose server stack  |  Purpose: Operational AWS CLI commands organized by service category for infrastructure management.

The AWS Operations widget is the most command-dense widget on the dashboard. It organizes pre-built AWS CLI commands into logical service categories, each with Run and Copy buttons. Commands cover the full operational surface of The Trinity Beast Infrastructure.

ECS Exec Tunnels

ECS Exec tunnels provide interactive shell access to running containers. These are the most frequently used operational commands.

CommandDescription
ECS Exec — Main ServiceInteractive shell into the main The Trinity Beast container (LPO primary)
ECS Exec — Mirror ServiceInteractive shell into the mirror container (LPO failover/read replica)
ECS Exec — LRS ServiceInteractive shell into the LRS container (Listener Report Service)
⚠️ Important: ECS Exec tunnels require the Session Manager plugin installed on your Neo machine. Interactive sessions (shell access) should be run in your local Terminal app, not through the TBCC terminal relay. The relay is designed for non-interactive commands that produce output and exit. Use the Copy 📋 button to copy ECS Exec commands, then paste them into your local terminal.

ECS Management

CommandDescription
List ServicesList all ECS services in the Trinity Beast cluster
Service StatusShow detailed status of all three services (desired count, running count, deployments)
Force Deploy All 3Force a new deployment of all three ECS services (Main, Mirror, LRS) — pulls latest images
Running TasksList all currently running ECS tasks with their task IDs and status

Database

CommandDescription
Aurora Cluster StatusShow Aurora PostgreSQL cluster status, endpoints, and instance health
ElastiCache StatusShow ElastiCache for Redis cluster status, node count, and endpoint

Lambda

CommandDescription
Lambda StatusList all Lambda functions with runtime, memory, and last modified date
Recent InvocationsShow recent Lambda invocation metrics from CloudWatch

ECR

CommandDescription
Recent ImagesList the most recent container images pushed to ECR with tags and sizes

S3 & CloudFront

CommandDescription
Website FilesList files in the S3 website bucket (cpmp-site.org static assets)
CloudFront InvalidationCreate a CloudFront cache invalidation for /* to push updated content

Logs

CommandDescription
Recent CloudWatch LogsTail the most recent log events from ECS task log groups

EventBridge

CommandDescription
Scheduled RulesList all EventBridge scheduled rules (cron jobs, rate-based triggers)

Sync Job

The nightly sync job runs at 1:00 AM EST via EventBridge → ECS Fargate. It syncs Aurora → ElastiCache (price logs, usage logs, API keys, application parameters) and prunes old data. Check this first thing each day after the health check.

CommandDescription
Last Sync StatusPull the most recent sync job log stream from CloudWatch and display run time, status, duration, cache totals, and per-category sync counts
✅ Daily Routine: Run bash scripts/kcc.sh health first, then bash scripts/kcc.sh sync-check to confirm the nightly sync completed. Both should be green before starting the day's work.

Secrets

CommandDescription
List SecretsList all secrets stored in AWS Secrets Manager (names only, not values)

Kiro CLI

Kiro CLI (v2.0.0) provides an AI-powered terminal chat session directly from the TBCC. Use it for natural language AWS operations, code generation, and troubleshooting.

CommandDescription
Launch Kiro CLI ChatStart an interactive AI chat session with Kiro CLI — natural language AWS operations, code generation, and troubleshooting
ℹ️ Kiro CLI is installed at /Applications/Kiro CLI.app and added to PATH via .bash_profile. The kiro-cli chat command is interactive — use the Copy 📋 button and paste into your local Terminal for the best experience.

Database Tools

Database administration tools for connecting to Aurora PostgreSQL via port forwarding. Use with pgAdmin, DBeaver, or psql on your Neo machine.

CommandDescription
🐘 Aurora Port Forward (pgAdmin)Forward Aurora PostgreSQL port 5432 to localhost:5432 via SSM Session Manager. Once running, connect pgAdmin or psql to localhost:5432 with your Aurora credentials.
⚠️ The port forward command is interactive (it holds the tunnel open). Use the Copy 📋 button and run it in your local Terminal. The tunnel stays open until you press Ctrl+C. While the tunnel is active, connect pgAdmin to localhost:5432 with database CPMP_Backend_Aurora.

AWS Operations Widget — Dashboard View

Below is a representative view of the AWS Operations widget as it appears on the TBCC dashboard, showing the command sections with Run and Copy buttons:

TBCC — AWS Operations Widget
☁️
AWS Operations CLI
Kiro CLI
Launch Kiro CLI Chat
Start an AI-powered terminal chat session
Run ▶ Copy
Database Tools
🐘 Aurora Port Forward (pgAdmin)
Forward Aurora port 5432 to localhost for pgAdmin
Run ▶ Copy
ECS Exec Tunnels
🔌 ECS Exec — Main Service
Interactive shell into the main ECS container
Run ▶ Copy
🔌 ECS Exec — Mirror Service
Interactive shell into the mirror ECS container
Run ▶ Copy
... + 15 more commands (ECS Management, Database, Lambda, ECR, S3, Logs, EventBridge, Secrets)

11. Terminal Widget

Icon: 💻 Cyan terminal prompt  |  Purpose: Built-in terminal emulator connected to your local MacBook via WebSocket relay.

The terminal widget is a full-width panel at the bottom of the TBCC dashboard that provides a browser-based terminal experience. It connects to Cory Dean Kalani's MacBook Neo through the WebSocket relay server (terminal-relay.py) and can execute any command the local shell can run.

Features

Architecture

The terminal relay uses a simple architecture with no external dependencies beyond the websockets Python package:

Browser (TBCC) ←→ WebSocket ←→ terminal-relay.py (localhost:9999) ←→ bash shell

The relay listens only on 127.0.0.1 (localhost), so it is not accessible from other machines on the network. Each command sent from the browser spawns a subprocess on the Neo machine, and stdout/stderr are streamed back to the browser over the WebSocket connection.

Terminal in Action

Below is a representative view of the terminal widget showing output from a health check and a price query:

Terminal — ws://127.0.0.1:9999
Connected to Terminal Relay (ws://127.0.0.1:9999)
$ curl -s https://api.cpmp-site.org/health
LPO Health Check - OK
[exit 0]
$ curl -s "https://api.cpmp-site.org/price?asset=BTC&api_key=demo-public-2026-03-01-abc123" | python3 -m json.tool
{
"asset": "BTC",
"price": "67432.891234567",
"source": "coinbase_ws",
"latency_ms": 3,
"region": "us-east-2",
"node": "trinity-beast-main"
}
[exit 0]
$ Type a command... Clear Kill Reconnect

12. Partner Management Widget

Icon: 👥 Teal people silhouettes  |  Purpose: Onboard, manage, and monitor AWS partners connected via PrivateLink (TCP) or VPC Peering (UDP).

The Partner Management widget organises its functionality across four tabs: Partners (view all connected partners), Pending Approvals (accept or reject incoming connection requests), Security Groups (manage UDP access CIDRs), and Onboard Partner (a step-by-step wizard that generates the exact CLI commands for both sides of the connection).

The Trinity Beast Command Center — Partner Management
👥 Partner Management Network
Partners
Pending Approvals
Security Groups
Onboard Partner
Step 1 — Choose Connection Type
PrivateLink (TCP)
Endpoint service → interface endpoint. Best for API/TCP workloads.
VPC Peering (UDP)
Bi-directional peering. Required for UDP multicast workloads.
Step 2 — Partner Details
Partner Name
Acme Trading Co.
AWS Account ID
987654321098
Partner VPC CIDR
10.1.0.0/16
Region
us-east-1 (Virginia)
3 Step 3 — Generated PrivateLink Commands
Step A — The Trinity Beast Side (You Run)
# Create VPC Endpoint Service for partner
aws ec2 create-vpc-endpoint-service-configuration \
  --network-load-balancer-arns arn:aws:elasticloadbalancing:us-east-2:211998422884:... \
  --acceptance-required --region us-east-2
Step B — Partner Side (Acme Trading Co. Runs)
# Create VPC Interface Endpoint to The Trinity Beast
aws ec2 create-vpc-endpoint \
  --vpc-endpoint-type Interface \
  --service-name com.amazonaws.vpce.us-east-2.vpce-svc-... \
  --vpc-id vpc-... --region us-east-1

Tab Descriptions

13. Exchange Manager Widget

Icon: 🔄 Emerald exchange arrows  |  Purpose: Manage all 6 real-time WebSocket exchange feeds and their 150 asset mappings from a single dashboard widget.

The Exchange Manager widget is the operational control panel for The Trinity Beast's table-driven exchange architecture. It provides full visibility into every WebSocket feed, every asset-to-symbol mapping, and every runtime metric — organized across three tabs.

Tab 1 — Exchange Feeds

A live table showing all 6 configured exchanges with their connection status, WebSocket endpoint, source tag, and asset count. Each row includes an Enable/Disable toggle that calls POST /admin/exchange-feeds/toggle — no deploy required.

ColumnDescription
ExchangeDisplay name (Coinbase, Gemini, Kraken, Gate.io, Bybit, OKX)
EndpointWebSocket URL (e.g., wss://advanced-trade-ws.coinbase.com)
Source TagTag written to usage logs and API responses (e.g., coinbase-ws)
AssetsNumber of enabled asset mappings for this exchange (24 each)
EnabledToggle switch — disables the feed without removing the configuration

Adding Exchange #7: Click "Add Exchange" to open the feed configuration form. Fill in the WebSocket endpoint, subscribe template with {SYMBOLS} placeholder, JSON paths for price/symbol/timestamp extraction, and ping settings. Save, add asset mappings in Tab 2, restart the container. The new exchange is live.

Tab 2 — Asset Mappings

A filterable table of all 150 asset-to-symbol mappings across all exchanges. Filter by exchange name to see just one exchange's assets. Each row shows the normalized asset name (BTC), the exchange-specific symbol (BTC-USD, btcusd, BTC/USD, etc.), and an enabled flag.

ColumnDescription
ExchangeWhich exchange this mapping belongs to
AssetNormalized asset name (BTC, ETH, SOL, etc.)
Exchange SymbolExchange-specific symbol format (e.g., BTC_USDT for Gate.io)
EnabledWhether this asset is actively subscribed on the exchange

Asset mappings are managed via POST /admin/exchange-assets/save (batch upsert) and DELETE /admin/exchange-assets (single or bulk delete). The public GET /exchanges endpoint reads from these same tables to power the demo dropdown on the subscription page.

Tab 3 — Runtime Metrics

18 color-coded metric cards pulled from GET /admin/stress-stats, showing the real-time state of the container that handled the request. Metrics are grouped into categories:

Cards turn green for healthy values, amber for warning thresholds, and red for critical values (e.g., UDP drop % > 1%, 5xx errors > 0, batch flush errors > 0).

API Endpoints Used

EndpointPurpose
GET /admin/exchange-feedsLoad the Exchange Feeds tab
POST /admin/exchange-feeds/saveCreate or update an exchange configuration
POST /admin/exchange-feeds/toggleEnable or disable an exchange
GET /admin/exchange-assetsLoad the Asset Mappings tab (filterable by exchange)
POST /admin/exchange-assets/saveBatch create/update asset mappings
GET /admin/stress-statsLoad the Runtime Metrics tab

14. Cluster Health Widget

Icon: 🏥 Red heart pulse  |  Purpose: Real-time health monitoring of all 3 ECS containers via ElastiCache-based cluster-wide aggregation.

The Cluster Health widget is the first widget on the TBCC dashboard — a full-width panel that shows the operational state of all 3 containers (BeastMain, BeastMirror, BeastLRS) at a glance. Unlike a simple port health check, this widget shows actual runtime metrics from inside each container.

Architecture — ElastiCache-Based, Not ALB Polling

Each container runs a background goroutine (StartMetricsPublisher()) that publishes its 24-counter metrics snapshot to ElastiCache every 3 seconds. The widget calls GET /admin/cluster-stats, which reads all 3 snapshots in a single ElastiCache pipeline call — one round-trip, sub-millisecond, guaranteed all 3 containers.

Why not ALB polling? The previous approach required up to 30 HTTP requests through the ALB, hoping the load balancer would route to different containers. It was slow, unreliable, and wasteful. The ElastiCache approach guarantees all 3 containers in 1 call because each container publishes independently.

ElastiCache Keys

KeyTTLContent
cluster:stats:BeastMain30 secondsFull metrics snapshot + cluster_node + region + published_at
cluster:stats:BeastMirror30 secondsSame structure
cluster:stats:BeastLRS30 secondsSame structure

If a container hasn't published in 30 seconds, its key expires and the widget shows it as missing — an immediate signal that something is wrong.

Widget Layout — 3 Side-by-Side Cards

The widget displays 3 cards in a horizontal row, one per container. Each card shows:

MetricDescriptionThresholds
Health StatusGreen checkmark if reporting, red X if missingPresent = green, Missing = red
UptimeTime since the container started (from published_at)Informational
Total RequestsTCP + UDP + LRS combinedInformational
Cache Hit %sync.Map + ElastiCache hits / total lookups>95% = green, <90% = red
DB ConnectionsIn-use / open connectionsInformational
UDP Drop %Packets dropped / packets received0% = green, >1% = red
BG Drop %Background work dropped / submitted0% = green, >1% = red
5xx ErrorsServer error count since last reset0 = green, >0 = red

Header Badge & Refresh

The widget header shows a badge indicating how many nodes are reporting — 3/3 Nodes in green when all containers are healthy, or 2/3 Nodes in red if any container is missing.

The widget auto-loads on page open and includes a "Check All Nodes" refresh button. The dashboard currently refreshes on a 30-second timer.

Future Enhancement: The 30-second refresh interval and the 3-second publish interval are candidates for future application parameters, allowing the refresh cadence to be tuned without a code deploy.

CloudWatch Integration

Six key runtime metrics from the cluster stats are also published to CloudWatch for dashboard and alarm visibility:

15. Child Pages

The TBCC links to four child pages that provide full-featured admin consoles and the public-facing support interface. Each child page is a standalone HTML application that communicates with the Trinity Beast API backend.

15.1 Newsletter Admin Console

URL: cpmp-site.org/admin/newsletteradmin.html

The Newsletter Admin Console is a full-featured newsletter management application with four main sections accessible via a sidebar navigation:

Compose Tab with Template Cards

The compose tab displays available templates as selectable cards. Clicking a template pre-fills the editor with the template's layout and default content.

Newsletter Admin Console — Compose
Archive
Compose
Templates
Subscribers
Select a Template
CPMP Mission Update
Standard template for mission field updates, prayer requests, and donation impact reports.
CPMP
LPO Product Update
Release notes, new asset support, performance improvements, and API changes.
Listener
Newsletter Type
CPMP Listener
B I U   H1 H2   🔗 📷   • ≡
Start writing your newsletter content here...
Save Draft Send Newsletter

15.2 Support Admin Console

URL: cpmp-site.org/admin/supportadmin.html

The Support Admin Console provides a complete ticket management system with three main sections:

Ticket Detail Panel

Expanding a ticket reveals the full conversation thread, including the original customer message, admin replies, and internal notes (visible only to admins).

Support Admin Console — Ticket Detail
CPMP-20260417-a3f1
API key not working
API/Technical New
Name: Bugs Bunny
Email: bugs.bunny@acme.com
IP: 73.162.45.12
Submitted: Apr 17, 2026 at 2:34 PM
Conversation Thread
Bugs Bunny (customer)
Apr 17, 2026 2:34 PM
My API key stopped working after I upgraded my subscription. I get a 403 error on every request.
Cory Kalani (admin)
Apr 17, 2026 3:12 PM
Hi Bugs, I've refreshed your API key cache. Please try again and let me know if the issue persists.
Cory Kalani (internal note)
Apr 17, 2026 3:10 PM
Checked api_keys table — key was valid but rate limit cache was stale. Invalidated via /admin/invalidate-key.

15.3 Email Admin Console

URL: cpmp-site.org/admin/emailadmin.html

The Email Admin Console provides a complete email management system with four main sections accessible via sidebar navigation:

15.4 Public Support Page

URL: cpmp-site.org/support.html

The public support page is the customer-facing interface for the support system. It provides three main functions:

The page supports permanent links for direct access:

16. API Endpoint Reference & Authentication

All admin API endpoints are protected by the X-Admin-Key header. Public endpoints (health checks, price queries, customer-facing support) require no authentication. The admin key is stored in the application_parameters table and can be changed at any time without redeploying.

Authentication

X-Admin-Key Header Required for Admin Routes

Every request to a protected endpoint must include the X-Admin-Key header with the correct admin API key.

curl -H "X-Admin-Key: YOUR_ADMIN_KEY" https://api.cpmp-site.org/admin/config
ResponseMeaning
200 OKKey is valid — request processed
401 UnauthorizedNo X-Admin-Key header provided
403 ForbiddenKey provided but does not match

The admin HTML pages (TBCC, Newsletter Admin, Email Admin, Support Admin) prompt for the key on first visit and store it in localStorage. You won't be asked again unless the key is rejected or you clear browser data.

Public Endpoints (No Authentication Required)

These endpoints are accessible without any API key or admin key. They serve customer-facing functionality and health monitoring.

MethodEndpointDescription
GET/healthLPO server health check — returns "LPO Health Check - OK"
GET/price?asset=BTCFetch real-time crypto price (requires Bearer API key in Authorization header)
GET/map/pinsFetch map pin data for the CPMP mission map
POST/support/submitSubmit a new support ticket (customer-facing)
GET/support/tickets?email=xxxList all tickets for an email address (customer-facing)
GET/support/ticket/{ticket_number}View ticket detail by ticket number (customer-facing, includes non-internal replies)
POST/newsletter/subscribeSubscribe to newsletter (from website form)
GET/newsletter/unsubscribe?email=x&source=xUnsubscribe from newsletter (from email link)
GET/newsletter/resubscribe?email=x&source=xRe-subscribe to newsletter (from opt-out landing page)
GET/admin/bootstrap-key?key=xxxOne-time bootstrap: sets the admin API key (only works when no key is configured)

Admin Endpoints — Core Administration

All endpoints below require the X-Admin-Key header.

MethodEndpointDescription
GET/admin/configView current application parameters (prewarm interval, cache TTL, demo key, etc.)
GET/admin/setup-demoInitialize demo API key in the database (one-time setup)
GET/admin/invalidate-key?api_key=xxxInvalidate an API key from memory + ElastiCache cache (forces Aurora re-read)
GET/admin/demo-mode?mode=demo|performanceToggle demo key between Demo (3 QPS) and Performance (1000 QPS) mode

Admin Endpoints — Newsletter Management

MethodEndpointDescription
GET/newsletter/list?type=cpmp|listenerList all newsletters filtered by type
GET/newsletter/{id}Get a single newsletter by UUID (includes content)
POST/newsletter/saveCreate or update a newsletter (body: {id?, title, content, type})
POST/newsletter/{id}/statusToggle newsletter active/inactive status
POST/newsletter/{id}/sendSend newsletter to all active subscribers of matching type via SES
GET/newsletter/subscribers?source=cpmp|listenerList all active subscribers (optional source filter)
GET/newsletter/templates?type=cpmp|listenerList newsletter templates (optional type filter)
GET/newsletter/templates/{id}Get a single template by UUID (includes content)
POST/newsletter/templates/saveCreate or update a template (body: {id?, type, topic, name, content})
DELETE/newsletter/templates/{id}Delete a newsletter template

Admin Endpoints — Email Management

MethodEndpointDescription
GET/email/templates?topic=xxxList email templates (optional topic filter)
GET/email/templates/{id}Get a single email template (includes content)
POST/email/templates/saveCreate or update email template (body: {id?, topic, name, subject, content})
DELETE/email/templates/{id}Delete an email template
GET/email/sendersList all configured email senders (display name, email, reply-to)
POST/email/senders/saveCreate or update sender (body: {id?, display_name, email, reply_to})
DELETE/email/senders/{id}Delete an email sender
GET/email/drafts?status=draft|sentList email drafts (optional status filter)
GET/email/drafts/{id}Get a single draft (includes full content, recipients, CC, BCC)
POST/email/drafts/saveCreate or update draft (body: {id?, template_id?, sender_id?, subject, content, recipients, cc, bcc})
DELETE/email/drafts/{id}Delete an email draft
POST/email/drafts/{id}/sendSend a draft via SES (marks as sent, sets sent_at)

Admin Endpoints — Support Ticket Management

MethodEndpointDescription
GET/support/admin/statsAggregate ticket counts by status (total, new, open, in_progress, awaiting_customer, resolved, closed)
GET/support/admin/tickets?status=x&category=x&email=xList all tickets with optional filters, ordered by updated_at DESC
GET/support/admin/tickets/{id}Get full ticket detail by UUID (includes ALL replies, including internal notes)
POST/support/admin/tickets/{id}/updateUpdate ticket status or category (body: {status?, category?})
POST/support/admin/tickets/{id}/replyAdd a reply to a ticket (body: {author, message, is_internal}). Non-internal replies trigger SES email to customer.

LRS Report Endpoints (on lrs.cpmp-site.org)

These endpoints are on the LRS server (lrs.cpmp-site.org) and require a subscriber API key via the Authorization: Bearer header — not the admin key.

MethodEndpointDescription
GET/healthLRS health check
GET/reports/usageDetailed usage report — individual query logs with pagination, asset/date filters, 4 output formats
GET/reports/summarySummary report — aggregated stats (total requests, cache hit rate, by asset/source)
GET/reports/report-usageReport usage detail — tracks how many reports have been pulled
GET/reports/report-summaryReport usage summary — aggregated report consumption stats
⚠️ Key Management: The admin API key is stored in the application_parameters table under the key admin_api_key. To change it, update the value in the database — the running services will pick up the new key within 5 minutes (the application parameter reload interval). No redeployment required.

17. Troubleshooting

Common issues and their solutions when working with the TBCC:

IssueSolution
Terminal shows "Offline" Run tbccstart in your local terminal to start the WebSocket relay server.
Terminal disconnects frequently Check /tmp/tbcc-relay.log for errors. The relay may have crashed — restart with tbccstop followed by tbccstart.
Commands fail with "credentials" error Run aws sts get-caller-identity to verify your AWS CLI configuration. Ensure credentials are set for account 211998422884 in region us-east-2.
ECS Exec fails Ensure the Session Manager plugin is installed on your Neo machine. Verify by running session-manager-plugin in your terminal. Install from the AWS docs if missing.
CloudWatch links open wrong region Verify you are logged into the us-east-2 (Ohio) region in the AWS Console. The TBCC links include the region parameter, but the AWS Console may override it if you have a different default.
Page shows stale content Run the CloudFront invalidation command from the AWS Operations widget to clear the CDN cache and push updated content to the edge.
WebSocket blocked by browser Ensure you are accessing the TBCC via HTTPS or localhost. Some browsers block mixed content (HTTPS page connecting to ws:// instead of wss://). The relay runs on localhost, which is exempt from mixed content restrictions in most browsers.