Architecture Overview
Mesmer
App Family

Three independent apps. One shared backend. Modular architecture built for scalability, security, and speed — hosted on AWS.

Web App Native App Community Shared Backend SSO External APIs
System Overview
4 Building Blocks

Three independent frontends connected through a centralized backend platform with single sign-on.

Frontend A — Web

Custom Hypnosis Web App

React / Next.js
  • Landing / Funnel Pages
  • Account Creation + Onboarding
  • Pricing Router (Upfront / 3x / 6x)
  • Embedded Checkout (Stripe)
  • Hypnosis Library (Custom + Prerecorded)
  • Audio Player (Signed URL Streaming)
Frontend B — Mobile

Native App

iOS + Android
  • Day / Night Session Players
  • Streaks (Daily Usage)
  • Journal (Post-Session Entries)
  • Chat / Support / Coach
  • In-App Purchase / Upgrade
Frontend C — Web

Community

Skool-like, Login-Gated
  • Spaces / Groups
  • Posts, Comments, Reactions
  • Modules + Progress Tracking
  • Notifications
  • Moderation Tools
Shared Platform

Backend + Infrastructure

Central auth/SSO, domain services, databases, caching, API gateway, and external integrations — used by all three frontends. Hosted on AWS.

Auth / SSOAPI GatewayMicroservicesPostgreSQLRedisS3EC2LambdaCDN / WAF
Data Flows
How Data Moves

Five core user journeys through the system — from first contact through payment to daily retention.

Flow 1 — Revenue MVP

Single Custom Hypnosis

Web
Reels / ManyChat
Landing PageWeb App
AuthCreate Account
CheckoutEmbedded / Stripe
WebhookEntitlements Active
OnboardingQuestions
GenerateElevenLabs TTS
Audio StoredObject Storage
Email LinkSigned Token
PlaybackSecure Stream
Flow 2 — Pricing Router

6-Month Offer

Web
Landing PageWeb
Auth
Pricing Page3 Options
CheckoutSession per Option
WebhookEntitlements
Onboarding
GenerateLimit 1–2/Month
LibraryAccess
Flow 3 — Surge Safe

Launch Event

Event + Web + Native
Opt-inSOP Form
EmailEducation Sequence
Event LiveAccount (Free)
Short Answers
Hypnosis
In-App Pricing
CheckoutEntitlements
Native AppDay/Night Sessions
Flow 4 — Retention

Native App Usage

Mobile
Login
EntitlementsCheck
SessionPlayback
CompletionEvent
StreakUpdate
JournalPrompt
NotificationsSchedule Updated
InactivityTrigger
Flow 5 — Gated Access

Community

Web
Login
Entitlementscommunity_access
Access Granted
Posts / Modules
Notifications
Moderation
System Architecture
Architecture

All layers — from clients through edge and API gateway down to services and data stores.

Clients
Web AppHypnosis + Funnels
Native AppiOS / Android
CommunitySkool-like
↓   ↓   ↓
Edge / Delivery
CDNStatic Assets
WAF / DDoSBot Protection
Rate LimitingAuth + Forms + Gen
↓
Entry Point
API GatewayAWS / Reverse Proxy
↓
Backend Services
Auth / SSO
User / Profile
Subscriptions
Hypnosis Gen
Content
Sessions
Journal
Chat
Community
Notifications
Analytics
↓   ↓   ↓   ↓
Data Stores
PostgreSQLPrimary DB
RedisCache / KV
AWS S3Audio + Files
SearchOptional

External Integrations
StripePayments
ElevenLabsTTS / Audio Gen
FCM / APNsPush
ResendEmail
ManyChatFunnel

Single Sign-On — One Identity, All Three Apps

Web App
→
Auth Service (JWT)
←
Native App
Community
→
Auth Service
→
Entitlements DB

The central entitlements system determines which user can access which features and content.

Shared Platform
Backend Services

Core microservices powering all three frontends.

Auth Service

Email/password, magic link, JWT issuance, refresh token rotation, device registry, RBAC.

User / Profile

Base profile, onboarding answers, Rabbit Hole SOP, event answers, preferences.

Subscription / Entitlements

Plans, installments, trial states, usage limits (1–2 custom/month), feature flags per tier.

Funnel & Routing

Landing page configs, UTM capture, pricing router logic, event-mode routing.

Hypnosis Generation

Prompt assembly, ElevenLabs TTS pipeline, versioning, limit enforcement, jobs queue (Lambda).

Content / Library

Pre-recorded catalog, custom index, access control via entitlements.

Sessions / Streaks / Journal

Day/night definitions, playback completion, streak calculation, post-session journal entries.

Chat / Support

In-app chat threads, attachments, admin console integration.

Community

Spaces, posts, comments, reactions, membership roles, modules + progress.

Notifications / Email

Schedules, inactivity triggers, templates (push/email/in-app). Transactional email delivery.

Analytics

Funnel events, onboarding, generation, session completes, upgrades. Warehouse stream.

Admin / Audit

User lookup, entitlement overrides, support dashboard, content management, audit logging.

Integrations & Security
External APIs & Protection

External services and security measures that complete the platform.

Stripe

Checkout sessions, webhooks to entitlements, installments (3/6 split), customer portal.

ElevenLabs TTS

Called by Hypnosis Generation Service via Lambda. Output: audio files + metadata stored on S3.

Push / Email / ManyChat

FCM/APNs for push, Resend for transactional email, ManyChat for funnel automation.

Audio Protection

  • Private AWS S3 bucket, signed URLs
  • Playback token: short TTL, bound to user + device
  • Screen recording detection (native)

Data Security

  • Field-level encryption for sensitive answers
  • Strict RBAC (community vs. hypnosis vs. admin)
  • WAF + rate limits + bot rules

Edge Protection

  • CDN for static assets
  • WAF / DDoS / bot protection
  • API gateway as single entry point