CASE FILE / APPLICATION PLATFORM

APPLICATION PLATFORM / PROTOTYPE

Multi-Channel AI Messaging Platform

A prototype messaging backend that normalizes channel operations behind adapters and moves message work through Redis-backed queues.

Technical systems artwork for Multi-Channel AI Messaging Platform

SYSTEM QUESTION

Separate channel-specific delivery from conversation state and asynchronous processing so each boundary can be inspected independently.

Inbound webhooks, channel APIs, user authorization, and background processing cross different trust and failure boundaries.

DIRECT ANSWER

What does Multi-Channel AI Messaging Platform do?

A prototype messaging backend that normalizes channel operations behind adapters and moves message work through Redis-backed queues. It addresses inbound webhooks, channel apis, user authorization, and background processing cross different trust and failure boundaries.

ROLE & SCOPE

ROLE EVIDENCE

The inspected repository establishes implementation artifacts but does not establish an individual contributor role.

AUDITED SCOPE

The audited slice covers API registration, channel contracts, queue configuration, authorization middleware, rate limiting, and relational state.

CONSTRAINTS

No customer, delivery-volume, uptime, or deployment claim is made; the audit is limited to local source and schema artifacts.

ARCHITECTURE

  1. 01

    internal

    Fastify API

    registers webhook, conversation, analytics, handoff, agent, and order routes

    backend/src/app.ts
  2. 02

    boundary

    Channel adapters

    define text, template, interactive, and media delivery operations

    backend/src/channels/channel.interface.ts
  3. 03

    internal

    BullMQ queues

    configure inbound, outbound, follow-up, and embedding job queues with shared retry policy

    backend/src/queue/queue.config.ts
  4. 04

    data

    PostgreSQL model

    stores organizations, conversations, messages, roles, and audit records

    prisma/schema.prisma

TRUST BOUNDARIES

  1. BOUNDARY 01

    Public request to API

    Webhook payloads and authenticated API requests enter Fastify routes.

    backend/src/app.ts
  2. BOUNDARY 02

    API to queue

    Message work crosses into Redis-backed job queues with retry policy.

    backend/src/queue/queue.config.ts

SECURITY DECISIONS

RISKCONTROLSOURCE

Unauthenticated or inactive users reaching protected operations.

JWT verification reloads the user and exposes role checks to route handlers.

backend/src/middleware/auth.ts

Burst traffic exhausting global API capacity.

The Fastify application registers a global rate-limit plugin with configured limits and windows.

backend/src/app.ts

Burst traffic exhausting capacity on routes that use the custom limiter.

A Redis counter-based middleware enforces a supplied maximum and time window.

backend/src/middleware/rateLimiter.ts

IMPLEMENTATION EVIDENCE

  1. sourcebackend/src/app.ts

    API composition

    Fastify registers security middleware, health checks, metrics, and domain routes.

  2. sourcebackend/src/queue/queue.config.ts

    Queue policy

    Four BullMQ queues share bounded retries and exponential backoff.

  3. schemaprisma/schema.prisma

    Conversation data model

    The schema defines channel, role, conversation-state, message-status, and audit-log records.

  4. testtests/unit/statemachine.test.ts

    Conversation state tests

    A local unit-test artifact exercises the conversation state machine.

VERIFIED OUTCOMES

  1. Channel delivery behavior is represented by one adapter contract.

    backend/src/channels/channel.interface.ts
  2. Conversation and message lifecycles have explicit persisted states.

    prisma/schema.prisma

OPEN HARDENING

  1. 01

    Verify authorization middleware coverage route by route before presenting the API as tenant-isolated.

    backend/src/app.ts