How lyfe00011/levanter works
Levanter is a multi-session WhatsApp bot with a plugin-driven command surface and an optional authenticated HTTP/webhook API. Its principal workflow starts the configured instance, connects WhatsApp sessions, handles user commands through plugins, and returns replies or performs group/media actions. The README also documents API sends, session listing, media retrieval and incoming-message webhooks. Source excerpts establish startup and several plugin-to-library calls; most client, API and handler internals were not sampled, so their detailed dispatch and persistence links are intentionally limited.
Main entry points: lib/index.js Bot command runtime · client.js WhatsApp client · index.js Process startup · api.js HTTP API
Components 20
Runtime and sessions
- Process startup
index.js - Configuration
config.js - WhatsApp client
lib/client.js
Bot capabilities
- Command plugins
plugins - Group administration
plugins/group.js - Group moderation
plugins/antiLink.js - Media tools
plugins/media.js - Photo editor
plugins/editor.js - Google Tasks
plugins/task.js - Bot command runtime
lib/index.js - Message handling
lib/handle.js
State and localization
- Session state
lib/db/session.js - Database access
lib/db/index.js - Localized responses
lib/lang.js
HTTP API
- HTTP API
lib/api.js - Incoming webhooks
lib/api.js - Received media cache
lib/api.js
Other components
- Operator
- WhatsApp users
- External app
Connections 21
- Operator → Process startup: starts
index.js - Process startup → Configuration: reads settings
index.js - Process startup → Database access: authenticates
index.js - Process startup → WhatsApp client: connects
index.js - WhatsApp users → WhatsApp client: messages
- WhatsApp client → Bot command runtime: dispatches commands
- Command plugins → Bot command runtime: registers commands
plugins/openrouter.js - Bot command runtime → Message handling: handles messages
- Group administration → Bot command runtime: registers commands
plugins/group.js - Group moderation → Bot command runtime: registers commands
plugins/antiLink.js - Media tools → Bot command runtime: registers commands
plugins/media.js - Photo editor → Bot command runtime: registers commands
plugins/editor.js - Google Tasks → Bot command runtime: registers commands
plugins/task.js - Group moderation → Database access: reads and updates
plugins/antiLink.js - Google Tasks → External app: uses Google Tasks
- Operator → HTTP API: sends requests
README.md - HTTP API → WhatsApp client: sends via sessions
README.md - HTTP API → Received media cache: serves cached media
README.md - WhatsApp client → Incoming webhooks: forwards messages
README.md - Incoming webhooks → External app: posts payloads
README.md - External app → HTTP API: downloads media
README.md