A self-hosted WhatsApp Gateway & Dashboard built with Next.js 15, Baileys, and Prisma. Manage multi-session accounts, schedule messages, create auto-replies, and integrate via Webhooks.
See the codeA professional, multi-session WhatsApp Gateway, Dashboard, and Automation System.
Built with Next.js 15, React, and Baileys for high-performance messaging automation and real-time WhatsApp Bot Gateway services.
[!TIP] Looking for the latest features? Check out the beta branch or our pre-releases for experimental sources.
Features β’ User Guide β’ API Documentation β’ Database Setup β’ Installation
WA-AKG comes with extensive documentation designed for both developers and users.
WA-AKG transforms your WhatsApp into a fully programmable RESTful API. It's designed for scale, reliability, and ease of use, making it the perfect bridge between your business logic and WhatsApp's global reach. Excellent for developing a WhatsApp Bot, Automation, or Customer Service Gateway.
graph LR
User([User / App]) -->|REST API| API[WA-AKG Gateway]
API -->|Baileys| WhatsApp[[WhatsApp Server]]
API -->|Real-time| DB[(Prisma / DB)]
WhatsApp -.->|Webhook| API
API -.->|Event| Webhook([External CRM / API])
@whiskeysockets/baileys for high-speed, stable, and secure WebSocket connections.remove.bg integration).swagger-ui-react at /docs.{
"event": "message.received",
"sessionId": "xgj7d9",
"timestamp": "2026-01-17T05:33:08.545Z",
"data": {
"key": { "remoteJid": "6287748687946@s.whatsapp.net", "fromMe": false, "id": "3EB0B78..." },
"from": "6287748687946@s.whatsapp.net",
"sender": "100429287395370@lid",
"remoteJidAlt": "100429287395370@lid",
"type": "TEXT",
"content": "saya sedang reply",
"isGroup": false,
"quoted": {
"type": "IMAGE",
"caption": "Ini caption dari reply",
"fileUrl": "/media/xgj7d9-A54FD0B6F..."
}
}
}
WA-AKG natively supports n8n! You can build complex, no-code/low-code WhatsApp automation workflows using our official community nodes.
π View on npm (n8n-nodes-wa-akg)
npm install -g pm2)# Clone and install
git clone https://github.com/mrifqidaffaaditya/WA-AKG.git
cd WA-AKG
npm install
# Configure environment
cp .env.example .env
# Edit .env with your DATABASE_URL, AUTH_SECRET, PORT, etc.
# Push schema and generate Prisma Client
npm run db:push
# Create SuperAdmin account
npm run make-admin admin@example.com password123
npm run dev
We recommend deploying with PM2 to run the app in the background and ensure it restarts automatically if the server rebooted or crashed.
We provide a built-in start.sh script that automates everything: checking the configuration, installing dependencies, syncing the database schema, compiling production assets, and starting or reloading PM2:
./start.sh
Build the application:
npm run build
Start with PM2: Using the built-in ecosystem.config.js configuration file:
pm2 start ecosystem.config.js
Manage the process:
pm2 statuspm2 logs wa-akgpm2 stop wa-akgpm2 restart wa-akgEnable auto-start on server boot:
pm2 startup
# Copy-paste the command outputted by the command above
pm2 save
Although PM2 is highly recommended, you can also deploy using Docker Compose:
Prepare Environment:
cp .env.example .env
Edit .env β set DATABASE_URL (points to the MySQL container), AUTH_SECRET, and other branding settings.
Start Services:
docker compose up -d
This spins up the MySQL database container alongside the Next.js gateway application.
WA-AKG provides a comprehensive REST API to integrate WhatsApp Messaging directly into your applications. Full details in API_DOCUMENTATION.md.
[!TIP] Use the built-in Swagger UI for interactive exploration at
/docs.
| Method | Endpoint | Description |
|---|---|---|
POST | /api/messages/{sessionId}/{jid}/send | Send text, media, or stickers |
POST | /api/messages/{sessionId}/broadcast | Scalable bulk messaging |
PATCH | /api/sessions/{id}/settings | Update session configuration |
GET | /api/groups/{sessionId} | List all available groups |
POST | /api/webhooks/{sessionId} | Register real-time event listeners |
POST | /api/autoreplies/{sessionId} | Create context-aware auto-replies |
POST | /api/auth/register | Register new users via the web securely |
curl -X POST http://localhost:3000/api/messages/session_01/62812345678@s.whatsapp.net/send \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"message": { "text": "Hello from WA-AKG!" }
}'
[!WARNING] Status Update Feature (POST
/api/status/update)The WhatsApp status/story update feature is currently experiencing known issues and should be avoided in production:
- Text statuses with custom background colors may not display correctly
- Media statuses (images/videos) may fail to upload to WhatsApp servers
- The feature is under active development
We recommend waiting for the next release before using this endpoint in critical workflows.
X-API-Key header.SUPERADMIN, OWNER, STAFF).AUTH_SECRET (wajib diisi β tidak ada fallback).TypeScript
96.8%
JavaScript
1.9%
A self-hosted WhatsApp Gateway & Dashboard built with Next.js 15, Baileys, and Prisma. Manage multi-session accounts, schedule messages, create auto-replies, and integrate via Webhooks.
See the codeA professional, multi-session WhatsApp Gateway, Dashboard, and Automation System.
Built with Next.js 15, React, and Baileys for high-performance messaging automation and real-time WhatsApp Bot Gateway services.
[!TIP] Looking for the latest features? Check out the beta branch or our pre-releases for experimental sources.
Features β’ User Guide β’ API Documentation β’ Database Setup β’ Installation
WA-AKG comes with extensive documentation designed for both developers and users.
WA-AKG transforms your WhatsApp into a fully programmable RESTful API. It's designed for scale, reliability, and ease of use, making it the perfect bridge between your business logic and WhatsApp's global reach. Excellent for developing a WhatsApp Bot, Automation, or Customer Service Gateway.
graph LR
User([User / App]) -->|REST API| API[WA-AKG Gateway]
API -->|Baileys| WhatsApp[[WhatsApp Server]]
API -->|Real-time| DB[(Prisma / DB)]
WhatsApp -.->|Webhook| API
API -.->|Event| Webhook([External CRM / API])
@whiskeysockets/baileys for high-speed, stable, and secure WebSocket connections.remove.bg integration).swagger-ui-react at /docs.{
"event": "message.received",
"sessionId": "xgj7d9",
"timestamp": "2026-01-17T05:33:08.545Z",
"data": {
"key": { "remoteJid": "6287748687946@s.whatsapp.net", "fromMe": false, "id": "3EB0B78..." },
"from": "6287748687946@s.whatsapp.net",
"sender": "100429287395370@lid",
"remoteJidAlt": "100429287395370@lid",
"type": "TEXT",
"content": "saya sedang reply",
"isGroup": false,
"quoted": {
"type": "IMAGE",
"caption": "Ini caption dari reply",
"fileUrl": "/media/xgj7d9-A54FD0B6F..."
}
}
}
WA-AKG natively supports n8n! You can build complex, no-code/low-code WhatsApp automation workflows using our official community nodes.
π View on npm (n8n-nodes-wa-akg)
npm install -g pm2)# Clone and install
git clone https://github.com/mrifqidaffaaditya/WA-AKG.git
cd WA-AKG
npm install
# Configure environment
cp .env.example .env
# Edit .env with your DATABASE_URL, AUTH_SECRET, PORT, etc.
# Push schema and generate Prisma Client
npm run db:push
# Create SuperAdmin account
npm run make-admin admin@example.com password123
npm run dev
We recommend deploying with PM2 to run the app in the background and ensure it restarts automatically if the server rebooted or crashed.
We provide a built-in start.sh script that automates everything: checking the configuration, installing dependencies, syncing the database schema, compiling production assets, and starting or reloading PM2:
./start.sh
Build the application:
npm run build
Start with PM2: Using the built-in ecosystem.config.js configuration file:
pm2 start ecosystem.config.js
Manage the process:
pm2 statuspm2 logs wa-akgpm2 stop wa-akgpm2 restart wa-akgEnable auto-start on server boot:
pm2 startup
# Copy-paste the command outputted by the command above
pm2 save
Although PM2 is highly recommended, you can also deploy using Docker Compose:
Prepare Environment:
cp .env.example .env
Edit .env β set DATABASE_URL (points to the MySQL container), AUTH_SECRET, and other branding settings.
Start Services:
docker compose up -d
This spins up the MySQL database container alongside the Next.js gateway application.
WA-AKG provides a comprehensive REST API to integrate WhatsApp Messaging directly into your applications. Full details in API_DOCUMENTATION.md.
[!TIP] Use the built-in Swagger UI for interactive exploration at
/docs.
| Method | Endpoint | Description |
|---|---|---|
POST | /api/messages/{sessionId}/{jid}/send | Send text, media, or stickers |
POST | /api/messages/{sessionId}/broadcast | Scalable bulk messaging |
PATCH | /api/sessions/{id}/settings | Update session configuration |
GET | /api/groups/{sessionId} | List all available groups |
POST | /api/webhooks/{sessionId} | Register real-time event listeners |
POST | /api/autoreplies/{sessionId} | Create context-aware auto-replies |
POST | /api/auth/register | Register new users via the web securely |
curl -X POST http://localhost:3000/api/messages/session_01/62812345678@s.whatsapp.net/send \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"message": { "text": "Hello from WA-AKG!" }
}'
[!WARNING] Status Update Feature (POST
/api/status/update)The WhatsApp status/story update feature is currently experiencing known issues and should be avoided in production:
- Text statuses with custom background colors may not display correctly
- Media statuses (images/videos) may fail to upload to WhatsApp servers
- The feature is under active development
We recommend waiting for the next release before using this endpoint in critical workflows.
X-API-Key header.SUPERADMIN, OWNER, STAFF).AUTH_SECRET (wajib diisi β tidak ada fallback).TypeScript
96.8%
JavaScript
1.9%