Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ uploads/
# Git worktrees
.worktrees/

# TypeScript
*.tsbuildinfo

# AI Agents
.agent/
.claude/
Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **Lockfile compatibility**: Regenerated `package-lock.json` with npm 10 to match CI runtime
- **TypeScript type conflicts**: Fixed `whatsapp-web.js` type mismatches after dependency update using `Omit<>` pattern
- **ESLint peer dependency**: Pinned `@eslint/js` and `eslint` to v9 to resolve Dependabot-introduced peer conflict
- **CI npm audit**: Changed audit level from `high` to `critical` high-severity findings are all in unfixable transitive dependencies
- **CI npm audit**: Changed audit level from `high` to `critical` - high-severity findings are all in unfixable transitive dependencies

### Changed

Expand All @@ -98,21 +98,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- **Dashboard React Query**: Migrate all 8 pages from manual `useState`/`useEffect` to `@tanstack/react-query` with automatic caching and deduplication
- **Dashboard code splitting**: Route-level lazy loading with `React.lazy` + `Suspense` main bundle reduced 36%
- **Dashboard code splitting**: Route-level lazy loading with `React.lazy` + `Suspense` - main bundle reduced 36%

### Added

- **CI npm audit**: `npm audit --audit-level=high` in CI pipeline to catch vulnerabilities
- **CI coverage threshold**: Jest coverage floor to prevent regression
- **CI dashboard job**: Lint + build for React dashboard runs parallel with backend CI
- **Dependabot**: Automated dependency updates npm weekly, GitHub Actions monthly
- **Dependabot**: Automated dependency updates - npm weekly, GitHub Actions monthly

## [0.1.1] - 2026-02-17

### Added

- **Unit Tests**: 94 new tests across auth, session, message, and webhook modules (110 total, ~17% coverage)
- **Release Workflow**: `release.yml` GitHub Actions tag-triggered with test gate, GitHub Release, and Docker semver tagging
- **Release Workflow**: `release.yml` GitHub Actions - tag-triggered with test gate, GitHub Release, and Docker semver tagging
- **SDK Scaffolds**: JavaScript/TypeScript and Python client libraries in `sdk/` directory
- New hook events: `webhook:queued` (after queue add) and `webhook:delivered` (after actual delivery)

Expand All @@ -126,7 +126,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.1.0] - 2026-02-05

### 🎉 Initial Release
### Initial Release

OpenWA v0.1.0 is the first stable release featuring a complete WhatsApp API Gateway with all core functionality.

Expand Down
97 changes: 50 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,77 +22,80 @@
<img src="https://img.shields.io/badge/NestJS-11.x-red.svg" alt="NestJS"/>
<img src="https://img.shields.io/badge/docker-ready-blue.svg" alt="Docker"/>
<img src="https://img.shields.io/badge/TypeScript-5.x-3178C6.svg" alt="TypeScript"/>
<img src="https://img.shields.io/badge/tests-passing-brightgreen.svg" alt="Tests"/>
<img src="https://img.shields.io/badge/coverage-75%25-yellow.svg" alt="Coverage"/>
<img src="https://github.com/rmyndharis/OpenWA/actions/workflows/ci.yml/badge.svg" alt="CI"/>
</p>

---

## Why OpenWA?
## Why OpenWA?

**OpenWA** is a free, open-source WhatsApp API Gateway designed for developers who need full control over their messaging infrastructurewithout vendor lock-in or hidden paywalls.
**OpenWA** is a free, open-source WhatsApp API Gateway designed for developers who need full control over their messaging infrastructure, without vendor lock-in or hidden paywalls.

Built on a **pluggable architecture**, OpenWA lets you swap database engines (SQLite/PostgreSQL), storage backends (Local/S3), and cache layers (Memory/Redis) without changing a single line of application code.

| | |
| ----------------------------- | ------------------------------------------------------------ |
| 🔓 **100% Open Source** | No licensing fees, no feature locks, full source code access |
| 🏗️ **Pluggable Architecture** | Swap adapters for database, storage, and cache via config |
| 🖥️ **Full Dashboard** | Modern React UI for session, webhook, and API key management |
| 🔹 **Multi-Session Ready** | Run multiple WhatsApp sessions concurrently on one instance |
| 🐳 **Docker Native** | Production-ready with zero configuration |
| 🔗 **n8n Integration** | Community nodes for workflow automation |
| **100% Open Source** | No licensing fees, no feature locks, full source code access |
| **Pluggable Architecture** | Swap adapters for database, storage, and cache via config |
| **Full Dashboard** | Modern React UI for session, webhook, and API key management |
| **Multi-Session Ready** | Run multiple WhatsApp sessions concurrently on one instance |
| **Docker Native** | Production-ready with zero configuration |
| **n8n Integration** | Community nodes for workflow automation |

---

## 🎯 Features
## Features

### Core Features

| Feature | Status | Description |
| ------------- | ------ | ------------------------------------ |
| REST API | | Full WhatsApp API via HTTP endpoints |
| Multi-Session | | Manage multiple WhatsApp accounts |
| Webhooks | | Real-time events with HMAC signature |
| Web Dashboard | | Visual management interface |
| API Key Auth | | Secure API authentication |
| Swagger Docs | | Interactive API documentation |
| REST API | Yes | Full WhatsApp API via HTTP endpoints |
| Multi-Session | Yes | Manage multiple WhatsApp accounts |
| Webhooks | Yes | Real-time events with HMAC signature |
| Web Dashboard | Yes | Visual management interface |
| API Key Auth | Yes | Secure API authentication |
| Swagger Docs | Yes | Interactive API documentation |

### Messaging

| Feature | Status | Description |
| ----------------- | ------ | -------------------------------- |
| Text Messages | | Send/receive text messages |
| Media Messages | | Images, videos, documents, audio |
| Message Reactions | | React to messages with emoji |
| Bulk Messaging | | Send to multiple recipients |
| Message Status | | Track delivery and read receipts |
| Text Messages | Yes | Send/receive text messages |
| Media Messages | Yes | Images, videos, documents, audio |
| Message Reactions | Yes | React to messages with emoji |
| Bulk Messaging | Yes | Send to multiple recipients |
| Message Status | Yes | Track delivery and read receipts |

### Advanced

| Feature | Status | Description |
| ------------------- | ------ | ---------------------------------- |
| Groups API | | Create, manage, and message groups |
| Channels/Newsletter | | WhatsApp Channels support |
| Labels Management | | Organize chats with labels |
| Proxy Support | | Per-session proxy configuration |
| Rate Limiting | | Configurable request limits |
| CIDR Whitelisting | | IP-based access control |
| Audit Logging | | Track all API operations |
| Groups API | Yes | Create, manage, and message groups |
| Channels/Newsletter | Yes | WhatsApp Channels support |
| Labels Management | Yes | Organize chats with labels |
| Proxy Support | Yes | Per-session proxy configuration |
| Rate Limiting | Yes | Configurable request limits |
| CIDR Whitelisting | Yes | IP-based access control |
| Audit Logging | Yes | Track all API operations |

### Infrastructure

| Feature | Status | Description |
| ---------------- | ------ | ------------------------------ |
| SQLite | | Zero-config embedded database |
| PostgreSQL | | Production-grade database |
| Redis Cache | | Optional performance caching |
| S3/MinIO Storage | | Scalable media storage |
| Docker | | One-command deployment |
| Health Checks | | Kubernetes-ready probes |
| Data Migration | | Export/import between backends |
| SQLite | Yes | Zero-config embedded database |
| PostgreSQL | Yes | Production-grade database |
| Redis Cache | Yes | Optional performance caching |
| S3/MinIO Storage | Yes | Scalable media storage |
| Docker | Yes | One-command deployment |
| Health Checks | Yes | Kubernetes-ready probes |
| Data Migration | Yes | Export/import between backends |

---

## 🚀 Quick Start
## Quick Start

### Option A: Docker (Recommended)

Expand Down Expand Up @@ -129,7 +132,7 @@ npm run dev

---

## 🏭 Production Deployment
## Production Deployment

For production, use the main `docker-compose.yml` with optional services:

Expand Down Expand Up @@ -158,7 +161,7 @@ docker compose --profile full up -d
> - Development (`docker-compose.dev.yml`): SQLite, local storage, both API & Dashboard included
> - Production (`docker-compose.yml`): Configurable database, profiles for optional services

## 🔌 Ports
## Ports

| Service | Port | Description |
| --------- | --------------- | ------------------------ |
Expand All @@ -168,7 +171,7 @@ docker compose --profile full up -d

---

## 📡 API Examples
## API Examples

### Create a Session

Expand Down Expand Up @@ -218,7 +221,7 @@ curl -X POST http://localhost:2785/api/sessions/{sessionId}/webhooks \

---

## 🛠 Tech Stack
## Tech Stack

| Layer | Technology |
| ------------- | ----------------------- |
Expand All @@ -234,7 +237,7 @@ curl -X POST http://localhost:2785/api/sessions/{sessionId}/webhooks \

---

## 📁 Project Structure
## Project Structure

```
openwa/
Expand Down Expand Up @@ -267,7 +270,7 @@ openwa/

---

## 📚 Documentation
## Documentation

Comprehensive documentation is available in the `docs/` folder:

Expand All @@ -284,7 +287,7 @@ Comprehensive documentation is available in the `docs/` folder:

---

## 🤝 Contributing
## Contributing

We welcome contributions! Here's how to get started:

Expand All @@ -298,22 +301,22 @@ Please read our [Development Guidelines](./docs/08-development-guidelines.md) fo

---

## 📄 License
## License

This project is licensed under the **MIT License** free for personal and commercial use.
This project is licensed under the **MIT License** - free for personal and commercial use.

See [LICENSE](./LICENSE) for details.

---

<div align="center">

**OpenWA** Free, Open Source WhatsApp API Gateway
**OpenWA** - Free, Open Source WhatsApp API Gateway

[📖 Documentation](./docs/README.md) · [🔌 API Docs](http://localhost:2785/api/docs) · [🐛 Report Bug](https://github.com/rmyndharis/OpenWA/issues) · [💡 Request Feature](https://github.com/rmyndharis/OpenWA/issues)
[Documentation](./docs/README.md) · [API Docs](http://localhost:2785/api/docs) · [Report Bug](https://github.com/rmyndharis/OpenWA/issues) · [Request Feature](https://github.com/rmyndharis/OpenWA/issues)

<br/>

<sub>Made with ❤️ by <a href="https://github.com/rmyndharis">Yudhi Armyndharis</a> and the OpenWA Community</sub>
<sub>Made by <a href="https://github.com/rmyndharis">Yudhi Armyndharis</a> and the OpenWA Community</sub>

</div>
12 changes: 6 additions & 6 deletions dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Modern web dashboard for managing OpenWA WhatsApp API Gateway sessions, webhooks, and infrastructure.

## Features
## Features

- **Session Management** - Create, monitor, and control WhatsApp sessions
- **QR Code Authentication** - Real-time QR code display for device pairing
Expand All @@ -15,7 +15,7 @@ Modern web dashboard for managing OpenWA WhatsApp API Gateway sessions, webhooks
- **Infrastructure Monitoring** - View system health and storage status
- **Real-time Updates** - Live session status via WebSocket

## 🛠️ Tech Stack
## Tech Stack

| Technology | Purpose |
| ---------------- | ----------------------- |
Expand All @@ -28,7 +28,7 @@ Modern web dashboard for managing OpenWA WhatsApp API Gateway sessions, webhooks
| Socket.IO Client | Real-time Communication |
| Lucide React | Icons |

## 🚀 Getting Started
## Getting Started

### Prerequisites

Expand Down Expand Up @@ -57,7 +57,7 @@ npm run build
npm run preview
```

## 📁 Project Structure
## Project Structure

```
dashboard/
Expand All @@ -76,14 +76,14 @@ dashboard/
└── vite.config.ts # Vite configuration
```

## 🔗 API Connection
## API Connection

The dashboard connects to the OpenWA API backend. Configure the API URL in environment variables:

```bash
VITE_API_URL=http://localhost:2785
```

## 📄 License
## License

MIT License - Part of the [OpenWA](https://github.com/rmyndharis/OpenWA) project.
12 changes: 6 additions & 6 deletions dashboard/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"connectionError": "Unable to connect to server. Please try again.",
"help": "Need help?",
"viewDocs": "View Documentation",
"footer": "Made with ❤️ by Yudhi Armyndharis and the OpenWA Community",
"footer": "Made by Yudhi Armyndharis and the OpenWA Community",
"version": "v{{version}} · {{date}}"
},
"dashboard": {
Expand Down Expand Up @@ -447,11 +447,11 @@
"disabled": "Disabled"
},
"restart": {
"idleTitle": "⚙️ Configuration Saved",
"restartingTitle": "🔄 Restarting Server...",
"waitingTitle": "Please Wait...",
"successTitle": "Server Ready",
"errorTitle": "Restart Failed",
"idleTitle": "Configuration Saved",
"restartingTitle": "Restarting Server...",
"waitingTitle": "Please Wait...",
"successTitle": "Server Ready",
"errorTitle": "Restart Failed",
"idleDesc": "Configuration has been saved to <code>.env.generated</code>.<br/>A server restart is required to apply the changes.",
"later": "Restart Later",
"now": "Restart Now",
Expand Down
10 changes: 5 additions & 5 deletions dashboard/src/i18n/locales/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,11 @@
"disabled": "מושבת"
},
"restart": {
"idleTitle": "⚙️ התצורה נשמרה",
"restartingTitle": "🔄 מאתחל את השרת...",
"waitingTitle": "אנא להמתין...",
"successTitle": "השרת מוכן",
"errorTitle": "האתחול נכשל",
"idleTitle": "התצורה נשמרה",
"restartingTitle": "מאתחל את השרת...",
"waitingTitle": "אנא להמתין...",
"successTitle": "השרת מוכן",
"errorTitle": "האתחול נכשל",
"idleDesc": "התצורה נשמרה ל-<code>.env.generated</code>.<br/>נדרש אתחול שרת כדי להחיל את השינויים.",
"later": "אתחול מאוחר יותר",
"now": "אתחול עכשיו",
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ code {
text-align: right;
}

/* URLs, emails, phones force LTR even inside RTL */
/* URLs, emails, phones - force LTR even inside RTL */
[dir="rtl"] input[type="url"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"] {
Expand All @@ -353,7 +353,7 @@ code {
flex-direction: row-reverse;
}

/* Toast container slide in from the opposite side */
/* Toast container - slide in from the opposite side */
[dir="rtl"] .toast-container {
right: auto;
left: 1rem;
Expand Down
6 changes: 3 additions & 3 deletions dashboard/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export function Dashboard() {
trend: `+${stats?.ready ?? 0}`,
trendUp: true,
},
{ label: t('dashboard.stats.messagesToday'), value: '', icon: Send, trend: '0', trendUp: null },
{ label: t('dashboard.stats.messagesToday'), value: '-', icon: Send, trend: '0', trendUp: null },
{ label: t('dashboard.stats.webhooksConfigured'), value: webhookCount, icon: Webhook, trend: '0', trendUp: null },
{ label: t('dashboard.stats.apiCalls'), value: '', icon: Activity, trend: '0', trendUp: null },
{ label: t('dashboard.stats.apiCalls'), value: '-', icon: Activity, trend: '0', trendUp: null },
];

const formatLastActive = (date?: string) => {
Expand Down Expand Up @@ -135,7 +135,7 @@ export function Dashboard() {
{session.name}
</span>
</div>
<span className="phone">{session.phone || ''}</span>
<span className="phone">{session.phone || '-'}</span>
<span className={`status-pill ${session.status}`}>{formatStatus(session.status)}</span>
<span className="last-active">{formatLastActive(session.lastActive)}</span>
<div className="actions">
Expand Down
Loading