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.

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
The inspected repository establishes implementation artifacts but does not establish an individual contributor role.
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
-
Fastify API
registers webhook, conversation, analytics, handoff, agent, and order routes
backend/src/app.ts -
Channel adapters
define text, template, interactive, and media delivery operations
backend/src/channels/channel.interface.ts -
BullMQ queues
configure inbound, outbound, follow-up, and embedding job queues with shared retry policy
backend/src/queue/queue.config.ts -
PostgreSQL model
stores organizations, conversations, messages, roles, and audit records
prisma/schema.prisma
TRUST BOUNDARIES
Public request to API
Webhook payloads and authenticated API requests enter Fastify routes.
backend/src/app.tsAPI to queue
Message work crosses into Redis-backed job queues with retry policy.
backend/src/queue/queue.config.ts
SECURITY DECISIONS
Unauthenticated or inactive users reaching protected operations.
JWT verification reloads the user and exposes role checks to route handlers.
backend/src/middleware/auth.tsBurst traffic exhausting global API capacity.
The Fastify application registers a global rate-limit plugin with configured limits and windows.
backend/src/app.tsBurst 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.tsIMPLEMENTATION EVIDENCE
backend/src/app.tsAPI composition
Fastify registers security middleware, health checks, metrics, and domain routes.
backend/src/queue/queue.config.tsQueue policy
Four BullMQ queues share bounded retries and exponential backoff.
prisma/schema.prismaConversation data model
The schema defines channel, role, conversation-state, message-status, and audit-log records.
tests/unit/statemachine.test.tsConversation state tests
A local unit-test artifact exercises the conversation state machine.
VERIFIED OUTCOMES
Channel delivery behavior is represented by one adapter contract.
backend/src/channels/channel.interface.tsConversation and message lifecycles have explicit persisted states.
prisma/schema.prisma
OPEN HARDENING
Verify authorization middleware coverage route by route before presenting the API as tenant-isolated.
backend/src/app.ts