How baihaqi34/jalurgaib-wa-gateway works
WA Gateway lets users connect WhatsApp devices and send messages through an API. The principal flow is client request → Laravel authentication and message handling → queued delivery → Go/whatsmeow service → WhatsApp. Laravel also manages devices, message history, API keys, quotas, packages, and admin/user dashboards. The README documents the Go service’s multi-device sessions, reconnect behavior, delays, and SQLite persistence. Some controller and service relationships are supported by the source index rather than full excerpts; unsampled capability links are documented in the README.
Main entry points: api.php API Routes · WhatsAppService.php WhatsApp Client · Models Gateway Data Models · web.php Web Routes
Components 21
Access and Accounts
- API Routes
backend/routes/api.php - API Authentication
backend/app/Http/Middleware/ApiKeyAuth.php - API Auth
backend/app/Http/Controllers/Auth/LoginController.php - API Key Management
backend/app/Http/Controllers/Api/ApiKeyController.php - Web Routes
backend/routes/web.php - Web Authentication
backend/app/Http/Controllers/Web/AuthController.php
Laravel Gateway
- Device API
backend/app/Http/Controllers/Api/DeviceController.php - Message API
backend/app/Http/Controllers/Api/MessageController.php - Delivery Job
backend/app/Jobs/SendWhatsAppMessage.php - WhatsApp Client
backend/app/Services/WhatsAppService.php - Gateway Data Models
backend/app/Models - Relational Database
backend/config/database.php
Management and Plans
- Admin Management
backend/app/Http/Controllers/Admin/AdminUserController.php - Admin Dashboard
backend/app/Http/Controllers/Admin/AdminDashboardController.php - User Dashboard
backend/app/Http/Controllers/User/UserDashboardController.php - User Portal Views
backend/resources/views/user/dashboard.blade.php - Gateway Landing
backend/resources/views/welcome.blade.php
WhatsApp Delivery
- Go WhatsApp Service
wa-service/main.go - SQLite Sessions
Other components
- Client App
- WhatsApp Network
Connections 27
- Client App → API Routes: calls API
README.md - API Routes → API Auth: routes auth
backend/routes/api.php - API Routes → Device API: routes devices
backend/routes/api.php - API Routes → Message API: routes messages
backend/routes/api.php - API Routes → API Key Management: routes keys
backend/routes/api.php - API Routes → API Authentication: applies key auth
- Web Routes → Web Authentication: routes login
backend/routes/web.php - Web Routes → Admin Management: routes admin
backend/routes/web.php - Web Routes → Admin Dashboard: routes dashboard
backend/routes/web.php - Web Routes → User Dashboard: routes user area
backend/routes/web.php - Device API → Gateway Data Models: reads and updates
backend/app/Http/Controllers/Api/DeviceController.php - Device API → WhatsApp Client: requests device actions
backend/app/Http/Controllers/Api/DeviceController.php - Message API → Gateway Data Models: creates and queries
backend/app/Http/Controllers/Api/MessageController.php - Message API → Delivery Job: dispatches delivery
backend/app/Http/Controllers/Api/MessageController.php - Message API → WhatsApp Client: checks device status
backend/app/Http/Controllers/Api/MessageController.php - Delivery Job → WhatsApp Client: sends message
backend/app/Jobs/SendWhatsAppMessage.php - WhatsApp Client → Go WhatsApp Service: HTTP requests
backend/app/Services/WhatsAppService.php - Go WhatsApp Service → WhatsApp Network: uses protocol
README.md - Go WhatsApp Service → SQLite Sessions: persists sessions
README.md - Admin Management → Gateway Data Models: manages accounts
backend/app/Http/Controllers/Admin/AdminUserController.php - Admin Dashboard → Gateway Data Models: reads metrics
backend/app/Http/Controllers/Admin/AdminDashboardController.php - Admin Dashboard → WhatsApp Client: checks service
backend/app/Http/Controllers/Admin/AdminDashboardController.php - User Dashboard → Gateway Data Models: reads account stats
backend/app/Http/Controllers/User/UserDashboardController.php - User Dashboard → WhatsApp Client: refreshes device status
backend/app/Http/Controllers/User/UserDashboardController.php - User Dashboard → User Portal Views: renders
backend/app/Http/Controllers/User/UserDashboardController.php - Gateway Data Models → Relational Database: stores records
- Web Authentication → Gateway Landing: serves portal