How wppconnect-team/wppconnect-server works
WPPConnect Server exposes a session-scoped REST API around the WPPConnect WhatsApp automation library, with a Manager UI and real-time events. Users create or pair sessions, then invoke messaging, device, group, contact, catalog and related operations; session events can be delivered through webhooks or Manager sockets. The graph highlights those domain stages and token persistence. Some feature controllers and integrations are represented at their exact directories because their implementations were not sampled; their existence and route dispatch are documented by the route index and README.
Main entry points: routes/index.ts API Routes · sessionController.ts Session API · createSessionUtil.ts Session Creation · src/index.ts HTTP Server
Components 21
HTTP and Manager
- HTTP Server
src/index.ts - API Routes
src/routes/index.ts - Manager UI and Routes
src/manager/routes.ts - Manager Authorization
src/manager/auth.ts - Manager Events
src/manager/socket.ts
Session Runtime
- Session API
src/controller/sessionController.ts - Session Creation
src/util/createSessionUtil.ts - Session Registry
src/util/sessionUtil.ts - Session Maintenance
src/util/sessionMaintenance.ts
WhatsApp Operations
- Messaging
src/controller/messageController.ts - Device and Chats
src/controller/deviceController.ts - Groups
src/controller/groupController.ts - Product Catalog
src/controller/catalogController.ts - Contacts and Features
src/controller
Persistence and Integrations
- Token Store Factory
src/util/tokenStore/factory.ts - Token Stores
src/util/tokenStore - Webhook Utilities
src/util/functions.ts - Chatwoot Client
src/util/chatWootClient.ts - Server Configuration
src/config.ts
Other components
- API Integrator
- WPPConnect Library
Connections 23
- API Integrator → HTTP Server: calls API
README.md - HTTP Server → API Routes: mounts routes
src/index.ts - HTTP Server → Manager UI and Routes: mounts routes
src/index.ts - Manager UI and Routes → Manager Authorization: checks access
src/manager/routes.ts - API Routes → Session API: dispatches sessions
src/routes/index.ts - API Routes → Messaging: dispatches messages
src/routes/index.ts - API Routes → Device and Chats: dispatches device actions
src/routes/index.ts - API Routes → Groups: dispatches group actions
src/routes/index.ts - API Routes → Product Catalog: dispatches catalog actions
src/routes/index.ts - API Routes → Contacts and Features: dispatches features
src/routes/index.ts - Session API → Session Creation: creates sessions
src/controller/sessionController.ts - Session API → Session Registry: cleans sessions
src/controller/sessionController.ts - Session Creation → WPPConnect Library: creates client
src/util/createSessionUtil.ts - Session Creation → Manager Events: emits events
src/util/createSessionUtil.ts - Session Creation → Webhook Utilities: sends event hooks
src/util/createSessionUtil.ts - Session Creation → Chatwoot Client: initializes client
src/util/createSessionUtil.ts - Manager UI and Routes → Token Store Factory: loads tokens
src/manager/routes.ts - Token Store Factory → Token Stores: selects store
src/util/tokenStore/factory.ts - Session API → Token Store Factory: lists tokens
src/controller/sessionController.ts - HTTP Server → Server Configuration: loads options
src/index.ts - Session API → Session Maintenance: checks maintenance
src/controller/sessionController.ts - API Integrator → Manager UI and Routes: administers sessions
README.md - WPPConnect Library → API Integrator: sends messages