Public repository

SMS Manager

Importing CSV must not block the Nest API. The campaign persists and publishes to RabbitMQ; consumers in TypeScript, Go, or Rust record the result in Mongo. The API does not wait for the carrier.

Repository

Desacoplamento da campanha
Desacoplamento da campanha CSV entra na API Nest, que persiste em PostgreSQL e publica na fila RabbitMQ. Consumidores em TypeScript, Go ou Rust, no mesmo contrato, registram o resultado no MongoDB. A API não bloqueia no ritmo da operadora. CSV upload API Nest campanha Postgres persistência API → fila Fila RabbitMQ TS Go Rust mesmo contrato Mongo resultado API não espera a operadora

CSV na API Nest com persistência Postgres; publicação na fila; consumidores no mesmo contrato gravam no Mongo. A API não espera a operadora.

Problem

SMS campaigns start from CSV files, users, companies, and authentication between services. Validating and persisting in the same process that fires thousands of messages couples the API to the pace of the carrier and the queue.

Constraints

The environment must be reproducible. Authentication between services cannot depend on JWT without revocation. Consumers in more than one language exist to compare the same messaging contract.

Decision

Seven applications: NestJS user/auth and company/campaign APIs; equivalent consumers in Node.js/TypeScript, Go, and Rust; declarative provisioner for exchanges, queues, and bindings; CSV bulk generator. PostgreSQL/TypeORM for relational API data; MongoDB for consumption results; Redis for opaque revocable token cache; gRPC for authentication between services; RabbitMQ with topic exchanges for batches. The API publishes and moves on without blocking on the carrier pace.

Current state

Public repository with Docker Compose for PostgreSQL, MongoDB, Redis, and RabbitMQ. The architecture separates domain, application, and infrastructure in the users, authentication, and companies contexts; the three consumers implement the same message contract.

Limitations

It is a study artifact and local messaging operation, not a commercial product with a carrier SLA. The three consumers demonstrate the contract; they do not claim the three languages run together in the author’s production.