ADR 0001: Public Contract Through API

Status

Accepted

Context

The project needs a stable HTTP REST JSON API for other systems, a vendor WhatsApp runtime, and a small operator-facing application for manual actions.

Decision

  • whatsapp-adapter-waha remains a private vendor integration module.
  • whatsapp-adapter-api is the only public application contract.
  • whatsapp-adapter-app calls whatsapp-adapter-api and never talks to whatsapp-adapter-waha directly.
  • Group identifiers exposed to operators and external systems are project-owned IDs issued by whatsapp-adapter-api, then mapped to WAHA group IDs.

Alternatives Considered

  • Let whatsapp-adapter-app talk directly to whatsapp-adapter-waha.
  • Expose whatsapp-adapter-waha directly to external clients.
  • Merge whatsapp-adapter-app into whatsapp-adapter-api from day one.

Consequences

  • We keep one integration path to WAHA and one stable contract for clients.
  • whatsapp-adapter-api owns validation, mapping, and future persistence.
  • whatsapp-adapter-app stays replaceable without breaking external users.