How rodriguedev13/whatsapp-otp works
This is a self-hosted WhatsApp OTP service: Laravel serves the user-facing dashboard and authenticated OTP API, while an internal Node sidecar manages the WhatsApp Web session and sends messages. The main transaction validates an API request, checks session readiness, then sends through the sidecar. Separate dashboard flows show status/QR and switch linked accounts; account login and API-key administration support those operations. The README documents the product boundaries and capabilities; source excerpts establish most calls, while links between the Laravel client and sidecar routes are HTTP-based.
Main entry points: web.php Web routes · WhatsAppEngineClient.php Engine HTTP client · routes.js Engine endpoints · whatsapp.js WhatsApp session engine
Components 17
Laravel application
- Web routes
app/routes/web.php - OTP API route
app/routes/api.php - OTP endpoint
app/app/Http/Controllers/Api/OtpController.php - Session dashboard
app/app/Http/Controllers/DashboardController.php - Engine HTTP client
app/app/Services/WhatsAppEngineClient.php - Usage documentation
app/resources/views/docs.blade.php
Access and keys
- Login flow
app/app/Http/Controllers/Auth/LoginController.php - Admin user
app/app/Models/User.php - API-key management
app/app/Http/Controllers/ApiKeyController.php - API-key records
app/app/Models/ApiKey.php - API-key authentication
app/app/Http/Middleware/ApiKeyAuth.php
WhatsApp sidecar
- Internal HTTP server
engine/src/server.js - Engine endpoints
engine/src/routes.js - WhatsApp session engine
engine/src/whatsapp.js
Other components
- OTP integrator
- Administrator
- WhatsApp Web
Connections 17
- Web routes → Login flow: routes to
app/routes/web.php - Web routes → Session dashboard: routes to
app/routes/web.php - Web routes → API-key management: routes to
app/routes/web.php - OTP API route → OTP endpoint: routes to
app/routes/api.php - OTP endpoint → Engine HTTP client: checks and sends
app/app/Http/Controllers/Api/OtpController.php - Session dashboard → Engine HTTP client: reads status, QR
app/app/Http/Controllers/DashboardController.php - Administrator → Web routes: uses dashboard
README.md - OTP integrator → OTP API route: submits OTP
README.md - API-key management → API-key records: manages keys
app/app/Http/Controllers/ApiKeyController.php - API-key authentication → API-key records: checks key
app/app/Http/Middleware/ApiKeyAuth.php - Login flow → Admin user: authenticates
- Engine HTTP client → Engine endpoints: HTTP requests
app/app/Services/WhatsAppEngineClient.php - Internal HTTP server → Engine endpoints: mounts routes
engine/src/server.js - Internal HTTP server → WhatsApp session engine: starts engine
engine/src/server.js - Engine endpoints → WhatsApp session engine: dispatches operations
engine/src/routes.js - WhatsApp session engine → WhatsApp Web: controls session
README.md - Usage documentation → OTP integrator: documents API use
README.md