Architecture

System Context

The User Service is a set of AWS Lambda functions behind an IAM-authenticated API Gateway, with DynamoDB and RDS PostgreSQL as its data stores. It serves synchronous requests from FloatMe backend services, the global FloatMe API Gateway and the Cloudflare Workers in the edge repo (signup, access codes, Zendesk webhook), and it consumes and produces events over Kinesis, SQS and DynamoDB Streams. Event routing detail is drawn on the Events page.

system context user service

Components

Component Trigger Purpose

{env}-user-service-api (Lambda)

API Gateway {env}-user-service (AWS IAM)

REST API (54 operations): users, memberships, access codes, tags, consent, KYC, bans, data deletion — see API Specification

{env}-user-service-payment-worker (Lambda)

Kinesis {env}-payments (chargeback event types)

Bans the user on a CHARGED_BACK payment — Chargeback ban

{env}-user-service-subscriptions (Lambda)

Kinesis {env}-subscriptions

Handles pause-skipped and pause-resume — Subscription worker

{env}-user-service-kinesis-feeder (Lambda)

DynamoDB Streams on {env}-user-service-users

Forwards USER and MEMBERSHIP records to the {env}-user-service-users Kinesis stream — Users stream

{env}-user-service-cleanup (Lambda)

SQS {env}-user-service-cleanup

Janitor: Plaid item removal, Auth0 block, Array cleanup, GDPR vendor signals — Janitor

{env}-user-service-webhook-handler (Lambda)

API Gateway (webhooks gateway, infrastructure repo)

Verifies the Typeform HMAC signature and enqueues the payload on {env}-typeform-events

{env}-user-service-typeform (Lambda)

SQS {env}-typeform-events

Closes the account named in a confirmed "FloatMe Cancellation Process" form — Typeform cancellation

{env}-user-service-survey-webhook-handler (Lambda)

API Gateway (webhooks gateway, infrastructure repo)

Verifies the Tally signature and stores the raw survey response — Survey response

{env}-user-service-floatmetrics (Lambda)

SQS {env}-floatmetrics-queue

Stores app metric events in the {env}-floatmetrics table — floatmetrics

{env}-user-service-sms-worker (Lambda)

SQS {env}-user-service-sms

Sends the access-code SMS through Twilio — SMS delivery

Storage

  • PostgreSQL Schema — FloatMeAPI_usermodel, the user profile table (RDS main + read replica)

  • DynamoDB Tables — the {env}-user-service-users single table and the us-east-1 tables

External Dependencies

Service Role

Auth0

Requires MFA at signup; blocks and unblocks accounts; changes email; removes SMS enrollments; reports email-verified state

Payments Service

Debit cards, the prorated upgrade charge and refund, bank-account hash check for related accounts, marketing locks (released on closure), debit-card deletion on cancellation

Twilio

Delivers the access-code SMS, called by the sms-worker Lambda only

Subscription Service

Activates, reactivates, pauses (next collection date), upgrades, downgrades and bans subscriptions; billing details for proration

Float Service

Float payback on reactivation; float ban

Transactions Service

Plaid items (list, remove, persist), Plaid Layer item creation at signup, KYC sessions

Underwriting Service

Underwriting recalculation after activation and reactivation

Insight Service

Income verification info returned with the user profile

Admin API

Ban audit note on the user’s backoffice record

Entitlements Service

Array cleanup scheduled by the janitor

Castle

Risk scoring of self-service profile updates — Castle

GrowthBook

Tier configuration, pause-eligible states, GDPR kill switch — Feature Flags

Segment

Notification events (cancellation, pause, unpause, reactivation receipt, consent, first debit card) — Vendor events

Iterable

Personal-info-updated events, upgrade receipt, GDPR forget-user, SMS opt-in subscription

AppsFlyer

first_debit_card_connected attribution event; GDPR user deletion

Zendesk

Closes and comments on "Delete My Data" tickets — Zendesk webhook

Intercom Fin

Audience of the HMAC-signed identity JWT issued by GET /{user_id}/fin/jwt — Fin JWT

Datadog

Metrics and SLOs — Monitoring