How rmyndharis/openwa works
OpenWA is a self-hosted WhatsApp API gateway with a React operations dashboard, multi-session lifecycle management, pluggable WhatsApp engines, storage, plugins, caching, and SDKs. The principal workflow is: an operator or API consumer uses the dashboard/SDK, the gateway manages a session, the engine boundary translates operations and events, and WhatsApp produces messages or session state. The sampled files strongly support lifecycle, event, storage, plugin, and engine-boundary relationships; several API modules are represented without unsampled internal call arrows.
Main entry points: App.tsx Dashboard Shell · api.ts Dashboard API Client · app.module.ts HTTP API Gateway · whatsapp-engine.interface.ts WhatsApp Engine Boundary
Components 30
Clients
- JavaScript SDK
sdk/javascript/src/client.ts - Python SDK
sdk/python/openwa/client.py - Go SDK
sdk/go/client.go - Java SDK
sdk/java/src/main/java/com/rmyndharis/openwa/OpenWAClient.java - PHP SDK
sdk/php/src/Client.php
Dashboard
- Dashboard Shell
dashboard/src/App.tsx - Session Operations
dashboard/src/pages/Sessions.tsx - Chat Operations
dashboard/src/pages/Chats.tsx - Infrastructure UI
dashboard/src/pages/Infrastructure.tsx - Plugin Management
dashboard/src/pages/Plugins.tsx - Webhook Management
dashboard/src/pages/Webhooks.tsx - API Key Management
dashboard/src/pages/ApiKeys.tsx - Dashboard API Client
dashboard/src/services/api.ts
Gateway Runtime
- HTTP API Gateway
src/app.module.ts - Session Lifecycle
src/modules/session/session-engine-lifecycle.service.ts - Session Controls
src/modules/session/session-engine-controls.ts - Engine Event Wiring
src/modules/session/session-engine-event-wiring.ts
Engine Layer
- WhatsApp Engine Boundary
src/engine/interfaces/whatsapp-engine.interface.ts - Capability Matrix
src/engine/engine-capability-matrix.ts - Engine Patch Guard
src/engine/adapters/engine-patch-status.ts
Persistence Integrations
- Media Storage
src/common/storage/storage.service.ts - Storage Operations
src/modules/infra/infra-storage.controller.ts - Storage Root
src/config/storage-root.ts - Plugin Storage
src/core/plugins/plugin-storage.service.ts - Cache Layer
src/common/cache/cache.service.ts
Other components
- Operator
- API Consumer
- S3 Storage
- Redis Cache
Connections 39
- Operator → Dashboard Shell: uses
- API Consumer → JavaScript SDK: calls
- API Consumer → Python SDK: calls
- API Consumer → Go SDK: calls
- API Consumer → Java SDK: calls
- API Consumer → PHP SDK: calls
- Dashboard Shell → Session Operations: routes
- Dashboard Shell → Chat Operations: routes
- Dashboard Shell → Infrastructure UI: routes
- Dashboard Shell → Plugin Management: routes
- Dashboard Shell → Webhook Management: routes
- Dashboard Shell → API Key Management: routes
- Session Operations → Dashboard API Client: requests
- Chat Operations → Dashboard API Client: requests
- Infrastructure UI → Dashboard API Client: requests
- Plugin Management → Dashboard API Client: requests
- Webhook Management → Dashboard API Client: requests
- API Key Management → Dashboard API Client: requests
- Dashboard API Client → HTTP API Gateway: calls
- JavaScript SDK → HTTP API Gateway: HTTP calls
- Python SDK → HTTP API Gateway: HTTP calls
- Go SDK → HTTP API Gateway: HTTP calls
- Java SDK → HTTP API Gateway: HTTP calls
- PHP SDK → HTTP API Gateway: HTTP calls
- HTTP API Gateway → Session Lifecycle: dispatches
- Session Lifecycle → Session Controls: delegates
- Session Lifecycle → Engine Event Wiring: builds callbacks
- Session Lifecycle → WhatsApp Engine Boundary: controls engine
- Session Controls → WhatsApp Engine Boundary: starts and stops
- WhatsApp Engine Boundary → Engine Event Wiring: emits events
- Engine Event Wiring → WhatsApp: receives events
- WhatsApp Engine Boundary → WhatsApp: sends operations
- Capability Matrix → WhatsApp Engine Boundary: derives capabilities
- Engine Patch Guard → WhatsApp Engine Boundary: guards adapters
- Storage Operations → Media Storage: exports files
- Media Storage → Storage Root: reads and writes
- Media Storage → S3 Storage: uses backend
- Plugin Storage → Storage Root: persists registry
- Cache Layer → Redis Cache: uses backend