Skip to content

refactor(matrix): migrate AS transaction receiver from apps/web to apps/api #2484

Description

@rozagerardo

Context

The Matrix AS inbound transaction receiver (#2483) is being built in apps/web as a pragmatic first home. apps/api (the Fastify service) is currently not deployed anywhere — no Vercel project, no deploy workflow references it, only a local Dockerfile + docker-compose.yml. Its README describes it as the backend for the (paused) Hypha Mobile project.

Once mobile work resumes and apps/api is re-established as a deployed, always-on service, the receiver should move there: it is a long-lived webhook that Dendrite holds a retry queue against, which fits a persistent process better than serverless functions.

What this involves

  • Add a Fastify route adapter over the existing shared receiver function. The core logic (verify → parse → dedupe → dispatch handoff) is already framework-agnostic from feat(matrix): inbound Application Service transaction receiver #2483, so this should be a thin adapter.
  • Move the catch-up / reconciler cron equivalent to apps/api, or keep it calling the shared function.
  • Re-point the Dendrite AS registration url: to the new host — Preview registration file first, then Prod — and restart Dendrite.
  • Re-verify end-to-end: Dendrite reaches the endpoint, non-200 responses get retried, downtime catch-up still works.
  • Remove the apps/web route once the new endpoint is confirmed live.

Depends on

Note

The code migration is small. The real work is the ops re-point + end-to-end re-verification — a careful cutover, Preview then Prod, roughly half a day. Do not estimate this as a rename.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreRepo Management and ArchitectureinfrastructureHosting, CI/CD, Docker, environmentsmatrixMatrix chat integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions