Mobile App Integration
Wiring Phenom Chat into the PhenomApp React Native app: Matrix/Synapse only, Cognito JWT login, and the membership-driven multi-room model (single Red Room to room switcher) that needs no app update.
This is the single source of truth for chat services. Validated live 2026-05-27. The detailed reference sub-pages (architecture, deployment, API, admin) are being reconciled to this page; where they disagree, this page wins. Superseded decisions live in Chat: Decisions & History.
chat.thephenom.app is a Matrix/Synapse chat service. The earlier dual-implementation A/B
design is gone: Implementation B (Hasura Lite chat) is excised and chat is Matrix/Synapse
only. Path: Cloudflare proxy (orange-cloud) to an mTLS-locked AWS ALB (phenom-prod-alb)
fronting Synapse 1.105 + Hasura on ECS Fargate (phenom-prod-cluster). The dev-nest and
nest web SPAs share this production data layer.
flowchart LR
subgraph Clients
MOB["PhenomApp (mobile)<br/>Matrix JWT login"]
SPA["nest / dev-nest SPA<br/>Cognito bearer"]
end
MOB --> CF
SPA --> CF
CF["Cloudflare edge (orange-cloud)<br/>SSL Full, WAF (COUNT), rate-limit"] -->|"AOP client cert (clientAuth EKU)"| ALB
ALB[("phenom-prod-alb :443<br/>mTLS mutual_authentication=verify")] -->|"mTLS verified"| ORI["ECS Fargate (phenom-prod-cluster)<br/>Synapse 1.105 (Matrix) + Hasura<br/>origin enforces Cognito"]
RAW(["raw ALB direct / :80"]) -.->|"rejected / 301"| ALB
Origin is locked; the raw-ALB bypass is closed.
:443 mutual_authentication=verify, trust store b7481113, AOP
leaf cert with the clientAuth EKU. A direct request to the raw origin (no client cert) is
rejected; :80 returns a 301 redirect (plaintext bypass closed).phenom-prod-chat-protect attached in COUNT (defense-in-depth).chat.thephenom.app root and any non-client path now
302-redirect to https://try.thephenom.app (random visitors are sent to the app download).
The Synapse-Admin login UI is no longer publicly served (/_synapse/admin returns 404).
Client paths (/_matrix, /_synapse client routes, /v1, /mcp) are unaffected. Verified live 2026-05-28.Full security state, runbook, and incident history: Chat: Decisions & History.
us-east-1_knEL7cqS3, client 5vlgjrab90897c45ls9jkf9s2p.org.matrix.login.jwt (Cognito ID token) and m.login.sso. After login the
client uses its Matrix access token./v1/graphql is gated on a Cognito bearer. Unauthenticated requests get
no_queries_available (zero data).try.thephenom.app) or receive 401.Chat uses four rooms. The legacy aliases do not match the room names (alias drift); use the room IDs as the stable identifier.
| Room name | Room ID | Legacy alias (does NOT match name) | Notes |
|---|---|---|---|
| The Red Room | !jFXGFANpXTXXgNkdNi |
#the-red-room |
Mobile default. Rendered as plain “chat”, no title. New/mobile users auto-join. |
| Staff | !WXBotwMKlVifIuEeBL |
#internal (legacy) |
Team/admins |
| Analysts | !NvNAXrFhqFBZXUtEkU |
#partners (legacy) |
Analysts |
| Experiencers | !dhlPzWDEjiJBhrqORG |
#community (legacy) |
Community |
The aliases
#internal,#partners,#communityare legacy and do not correspond to the Staff / Analysts / Experiencers room names. Do not infer a room from its alias.
logan@ (Logan), matt@ (M), Jonathan.mark@), in the Analysts room.Cognito PostConfirmation trigger to the chat-user-provisioner lambda, which creates the
Matrix user and auto-joins The Red Room, reaching Synapse via Cloud Map
synapse.phenom-prod.local:8008. Admin actions use the bot @phenom-provisioner-bot (token in
Secrets Manager key phenom-prod-synapse-admin-token). Working as of 2026-05-27.
PhenomApp build 20 (Q): a single Red Room, no title, membership-driven, JWT login.
These are gated and must not be treated as live:
HasuraAdminPaths COUNT to BLOCK (CI-gated)registration_shared_secret, native rate limits,
URL-preview SSRF (registration itself is already disabled)Phenom-earth/phenom-infra. Chat modules under modules/chat-*.
Wiring Phenom Chat into the PhenomApp React Native app: Matrix/Synapse only, Cognito JWT login, and the membership-driven multi-room model (single Red Room to room switcher) that needs no app update.
Deep dive into the Phenom Chat system architecture, including component design, database schema, sequence diagrams, and security model.
Complete API documentation for the Phenom Chat system, covering Hasura Lite GraphQL, MCP tools, and Matrix/Synapse endpoints.
Day-to-day administration, moderation, monitoring, troubleshooting, and emergency procedures for the Phenom Chat system.
Terraform deployment procedures, Docker image builds, DNS configuration, and post-deployment setup for the Phenom Chat system.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
© 2026 Phenom Earth