The Problem
Organizations that need a WhatsApp Business integration must stitch together separate messaging APIs, authentication, UI dashboards, and analytics. Existing commercial solutions are costly and lock‑in, while open‑source alternatives rarely ship a single binary that includes both API server and a ready‑to‑run UI.
What This Does
whatomate delivers a self‑contained WhatsApp Business Platform. The Go backend (cmd/whatomate/main.go) builds a single binary that embeds the Vue‑based UI (frontend/). Core capabilities such as multi‑tenant data isolation, role‑based access control, webhook handling for Meta’s Cloud API, real‑time WebSocket chat, template & campaign management, and AI‑driven chatbot flows live in the internal/ and pkg/ packages. The docs/ folder holds a static site generated with Astro that documents the REST API and UI features.
Key files:
cmd/whatomate/main.go– entry point, parses CLI flags, runs DB migrations, starts HTTP server.internal/handlers/*.go– HTTP handlers for agents, analytics, campaigns, etc.frontend/src/components/**– Vue 3 components (shadcn‑vue) that render the dashboard.docker/docker-compose.yml– orchestration of the Go service, a PostgreSQL container, and optional Redis worker.
How It Is Wired
Execution begins in cmd/whatomate/main.go. After flag parsing it calls server.Start() (in internal/server). That function:
- Loads configuration from
config.example.toml(or a user‑providedconfig.toml). - Initializes the PostgreSQL connection (via
pkg/db). - Registers routes defined in
internal/router.go, wiring each endpoint to a handler ininternal/handlers. - Starts a WebSocket hub (
internal/ws/hub.go) that pushes real‑time messages to connected Vue components.
Handlers such as internal/handlers/campaigns.go invoke service layer functions in pkg/service/*, which in turn use repository structs in pkg/repo/* to perform CRUD against the DB. The only circular import detected involves the toast UI (frontend/src/components/ui/toast/index.ts ↔ frontend/src/components/ui/toast/use-toast.ts). The most connected module is frontend/e2e/helpers/index.ts, imported by 13 test pages, indicating a high‑impact area for test‑suite stability.
How To Use It
# Clone the upstream repository
git clone https://github.com/moses-y/whatomate.git
cd whatomate
# Build the single binary (requires Go 1.24+)
make build-prod # produces ./whatomate
# Prepare configuration
cp config.example.toml config.toml # edit as needed (DB credentials, Meta API keys)
# Run migrations and start the server
./whatomate server -migrate
# UI is served at http://localhost:8080
# Default login: admin@admin.com / admin
Docker alternative (requires Docker Engine):
curl -LO https://raw.githubusercontent.com/shridarpatil/whatomate/main/docker/docker-compose.yml
curl -LO https://raw.githubusercontent.com/shridarpatil/whatomate/main/config.example.toml
cp config.example.toml config.toml
docker compose up -d
Both paths rely on the embedded frontend; no separate npm install is needed for production runs.
Real‑World Use
A contact‑center can deploy whatomate behind an internal reverse proxy, point the Meta WhatsApp Cloud webhook at https://myhost/api/webhook, and let agents log in via the dashboard. Campaign JSON files can be dropped into a watched directory (handled by internal/worker/campaign_worker.go), triggering bulk sends with automatic retry on failure.
Code Health & Issues
Measured findings (static analysis)
- HIGH – Deep nesting (max depth 8) in several Vue view files – refactor with guard clauses.
- HIGH – Duplicated 6‑line blocks across 145 test files – extract shared helpers.
- HIGH – Import cycle between toast UI modules – break the cycle.
- HIGH – Oversized Vue files (> 1 600 lines) – split by responsibility.
- MEDIUM – Hub module
frontend/e2e/helpers/index.ts(13 dependents) – keep stable, move volatile logic out. - MEDIUM – High branching density in Go handlers (
internal/handlers/*.go) – decompose decision logic.
Code‑health audit
- HIGH – Pin GitHub Actions to commit SHAs (
.github/workflows/*). - MEDIUM – Declare least‑privilege
GITHUB_TOKENpermissions (e2e-tests.yml). - MEDIUM – Enable Dependabot/Renovate (
.github/dependabot.ymlmissing). - MEDIUM – Pin Docker base images by digest (
docker/Dockerfile). - MEDIUM – Add dependency‑vulnerability scan to CI.
- MEDIUM – Set
persist-credentials: falseon checkout (deploy-docs.yml). - MEDIUM – Run container as non‑root (
docker/Dockerfile). - LOW – Define job timeouts in workflows.
- LOW – Add convention files (
.editorconfig,.gitattributes, formatter config).
Additional observations: tests exist (34 files) and CI runs via GitHub Actions; a license file is present; no secrets were found in the history.
The Bottom Line
whatomate offers a functional, single‑binary WhatsApp Business platform with a complete UI and extensible Go backend. It is production‑ready but carries technical debt: deep nesting, large Vue files, and a few import cycles that will increase maintenance cost. Teams comfortable with Go and Vue can adopt it quickly, especially if they address the high‑severity findings and tighten CI/CD hygiene.