The Architecture
Built for the Long Run. Built on Open Standards.
No proprietary plumbing. Every layer runs on enterprise-grade infrastructure built to last — the same services behind Netflix, Airbnb, and Stripe.
<2s
First-Token Latency*
100%
Open Standards
*Estimates based on early prototypes. Subject to change.
How we run it. The Texting Parrot is a hosted multi-tenant SaaS. Your data lives in a single AWS account we operate, with strict per-tenant isolation enforced in code — every read and write is keyed by a branded TenantId, and the repository layer doesn't expose Scan. The architecture below is what we run on your behalf.
The stack at a glance
Six Layers. Zero Surprises.
Every layer is a name your CTO already knows. Read top-to-bottom for the customer's journey, or bottom-to-top for the foundation it stands on.
Customer's Browser
Where the conversation happens.
Plain HTML · no plugins · works on every device
CloudFront-Served Widget
Loads in under 50 KB. Feels instant.
Shadow DOM · 53 KB / 17 KB gzipped · immutable cache · OAC + private S3 origin
AWS Lambda Function URL
Streams every reply token-by-token.
InvokeMode.RESPONSE_STREAM · per-bot allowedOrigins enforcement · 403 before any stream opens
Anthropic Claude on AWS Bedrock
The brain. Sonnet for nuance, Haiku for speed.
Claude Sonnet 4.6 + Haiku · streaming inference · per-bot model selection · sliding-window compaction
Tenant-Isolated DynamoDB
Your data, walled off at the database layer.
PK = tenantId, SK = id · byTenant GSI · branded TenantId types · Scan-free repo layer
AWS CDK Infrastructure-as-Code
Reproducible from a git checkout.
DataStack · ApiStack · BillingStack · WidgetCdnStack — pure TypeScript, version-controlled
From click to reply
A Customer Question, in Eight Steps
Every reply your customer gets travels this exact path. The plain English on the left is what your team needs to know. The line in gray underneath is what your engineers will recognize.
Customer types their question.
Shadow DOM widget — 17 KB gzipped, no React, no iframe
Widget opens a streaming connection.
SSE over a Lambda Function URL with InvokeMode.RESPONSE_STREAM
We confirm the site is allowed to use this bot.
Per-bot allowedOrigins check returns 403 before any stream opens
We load the bot's frozen production snapshot.
Bot.productionSnapshotId → BotSnapshot.manifest (one-click rollback ready)
We assemble persona + cited facts.
CatalogItemVersion.fields with admin overrides applied at read time
Claude streams the answer.
Sonnet 4.6 InvokeModelWithResponseStream — Haiku optional per bot
Tokens stream back to the visitor.
Markdown-rendered SSE deltas · auto-scroll anchored 30% from top
Every reply is metered atomically.
TransactWriteItems → UsageEvents + UsageRollups (idempotent on retry)
Industry-standard foundation
Every Vendor a Name You Already Trust
We chose proven, enterprise-grade services — not bargain-bin tooling that might vanish next year. You deal with us; the stack beneath is built to outlast any single company, including ours.
AWS
Same cloud as Netflix, Airbnb, and Capital One.
us-east-2 · Lambda · DynamoDB · API Gateway · CloudFront · S3 · EventBridge · Secrets Manager · CDK
Anthropic Claude
Frontier AI, accessed through AWS Bedrock.
Claude Sonnet 4.6 · Claude Haiku · streaming inference · per-bot model selection
Clerk
Enterprise login & user management.
JWT-verified AuthContext · SSO-ready · Svix-signed webhooks
Stripe
Subscriptions, invoicing, metered usage.
Products + Prices + Webhooks · HMAC-verified events · tenantId-stamped metadata
Apify
Commercial web-crawling service.
Per-run webhook secrets · pluggable CrawlEngine adapter · cheerio + datacenter proxy
Vercel
Dashboard hosting used by Walmart, Nike, TikTok.
Edge network · automatic preview environments · zero-config deploys
Next.js
The dashboard framework, by the team behind it.
Next.js 16 App Router · React Server Components · tRPC v11 typed client
TypeScript
End-to-end type safety from database to browser.
Branded TenantId types · zod schemas at every process boundary · ESM-only
Trademarks and logos are property of their respective owners, used here under each vendor's integration-marketing guidelines to indicate technical compatibility — not endorsement.
Built into the code
Five Promises We Couldn't Break If We Tried
Not policies. Not best-effort. Properties of the source code that would take a bigger rewrite to violate than to honor.
Tenant Isolation Is a Schema Invariant
Your data lives in its own walled garden — and the garden walls are checked by the compiler, not by hope.
Every DynamoDB read/write takes a branded TenantId. The repo layer doesn't even expose Scan.
Open Standards End-to-End
Built on widely-used, well-documented technologies — no proprietary frameworks or closed formats locking your data inside our walls.
TypeScript · REST/OpenAPI · JWT · JSON Schema · SSE · DynamoDB · Stripe · Clerk
Self-Healing Operations
If something hiccups, it heals itself. No 3 a.m. cleanup scripts. No manual database surgery.
60s stream-stall watchdog · 5.5-minute auto-recovery of stale jobs · per-card UI watchdog at 3/5/6 min
Reversible Releases
Every change is reversible. Promote a bot to production. Don't like it? Roll back in one click.
Copy-on-write CatalogItemVersion · per-Bot promote · frozen allowlist + live cross-access content
Transparent Receipts
Citations are an optional add-on during extraction: when enabled, each fact links back to the page that supports it. LLMs can still hallucinate, but grounding answers in your real content makes it far less likely.
FactEvidence rows · authority-tier conflict resolution · admin overrides survive re-extraction
Infrastructure as code
Built in Code, Not in a Console.
Every piece of infrastructure is plain TypeScript in the AWS CDK — four small stacks, version-controlled, reproducible from a fresh git checkout. Any AWS-fluent engineer can read it, audit it, or stand up an identical copy in a different account.
DataStack
Your tenant-isolated database
16+ DynamoDB tables · pay-per-request · byTenant GSIs · RemovalPolicy.RETAIN
ApiStack
The brains of the operation
Internal tRPC Lambda + public Hono REST Lambda · API Gateway HTTP API · IAM scoped per route
BillingStack
Stripe + Clerk credentials, never in code
Secrets Manager · loaded at Lambda cold start · zero secret material in CloudFormation
WidgetCdnStack
Global delivery for the chat widget
Private S3 + CloudFront with OAC · immutable cache · wide-open CORS for the bundle
One pnpm exec cdk deploy from a clean checkout stands the whole thing up. The same command tears it down.
For the bill-of-materials conversation
No Single Point of Human Failure — Including Ours
Every service in our stack is enterprise-grade and publicly documented — no fly-by-night tooling that could disappear overnight.
All infrastructure is plain TypeScript code (AWS CDK) — version-controlled, reviewable, reproducible.
You designate the admin. You own the dashboard. Your data is isolated by key design — every query requires your branded TenantId, and the repository layer never exposes Scan.
Want the Technical Deep-Dive?
Adam — the founder and primary engineer — will walk your CTO, your security team, or your board through the architecture one-on-one. No sales gauntlet.
