How gabrielfranicevich/wpp works
wpp is a terminal WhatsApp client. Its main workflow loads the active saved session, resolves a chat, then lists or pages through conversations and sends messages through an application-facing WhatsApp abstraction backed by the native client. Other branches cover login and session management, chat search and management, realtime listening, and message synchronization into a separate SQLite cache. The README documents the major layers and storage split; several implementation details are not sampled, so their links are included only where the README or SOURCE INDEX supports them.
Main entry points: mod.rs Command router · client.rs WhatsApp abstraction · chat.rs Chat command · pager.rs Interactive pager
Components 32
CLI commands
- Application entry
src/main.rs - Command router
src/cli/mod.rs - Login
src/cli/login.rs - Session commands
src/cli/session.rs - Switch session
src/cli/switch.rs - Logout
src/cli/logout.rs - Chat command
src/cli/chat.rs - List and search
src/cli/list.rs - Send command
src/cli/send.rs - Sync command
src/cli/sync.rs - Realtime listen
src/cli/listen.rs
Application services
- Chat resolution
src/app/services/chat_resolver.rs - Chat listing
src/app/services/chat_listing.rs - Chat management
src/app/services/chats.rs - Message history
src/app/services/message_pager.rs - Message sending
src/app/services/messages.rs - Message sync
src/app/services/sync.rs
Terminal interface
- Interactive pager
src/terminal/pager.rs - Message composer
src/terminal/composer.rs - Terminal rendering
src/terminal/render.rs
WhatsApp connectivity
- WhatsApp abstraction
src/whatsapp/client.rs - Domain models
src/whatsapp/models.rs - Native client
src/whatsapp/native/client.rs - Native authentication
src/whatsapp/native/auth.rs - Native chat operations
src/whatsapp/native/chats.rs - Native messaging
src/whatsapp/native/messages.rs - Realtime events
src/whatsapp/native/realtime.rs
Session and cache
- Active app context
src/app/state.rs - Session configuration
src/app/config.rs - SQLite message cache
src/storage/sqlite.rs
Other components
- Terminal user
- WhatsApp service
Connections 46
- Terminal user → Application entry: runs
README.md - Application entry → Command router: dispatches
src/main.rs - Command router → Login: routes login
src/cli/mod.rs - Command router → Session commands: routes session
src/cli/mod.rs - Command router → Switch session: routes switch
src/cli/mod.rs - Command router → Logout: routes logout
src/cli/mod.rs - Command router → Chat command: routes chat
src/cli/mod.rs - Command router → List and search: routes list
src/cli/mod.rs - Command router → Send command: routes send
src/cli/mod.rs - Command router → Sync command: routes sync
src/cli/mod.rs - Command router → Realtime listen: routes listen
src/cli/mod.rs - Login → Native authentication: authenticates
src/cli/login.rs - Login → Session configuration: saves session
README.md - Switch session → Session configuration: selects session
src/cli/switch.rs - Logout → Session configuration: removes metadata
src/cli/logout.rs - Active app context → Session configuration: loads active session
src/app/state.rs - Active app context → WhatsApp abstraction: opens client
src/app/state.rs - Chat command → Chat resolution: resolves target
src/cli/chat.rs - Chat command → Chat management: manages chat
src/cli/chat.rs - Chat command → Message history: loads history
src/cli/chat.rs - Chat command → Interactive pager: opens pager
src/cli/chat.rs - List and search → Chat listing: lists chats
src/cli/list.rs - List and search → Terminal rendering: renders results
src/cli/list.rs - Send command → Chat resolution: resolves target
src/cli/send.rs - Send command → Message sending: sends text
src/cli/send.rs - Sync command → Message sync: starts sync
src/cli/sync.rs - Message sync → SQLite message cache: writes cache
src/app/services/sync.rs - Realtime listen → WhatsApp abstraction: opens listener
README.md - Interactive pager → Message composer: uses composer
src/terminal/pager.rs - Interactive pager → Message history: pages history
src/terminal/pager.rs - Interactive pager → WhatsApp abstraction: receives events
README.md - Chat resolution → WhatsApp abstraction: queries chats
src/app/services/chat_resolver.rs - Chat listing → WhatsApp abstraction: lists chats
src/app/services/chat_listing.rs - Chat management → WhatsApp abstraction: manages chats
src/app/services/chats.rs - Message history → WhatsApp abstraction: loads messages
src/app/services/message_pager.rs - Message history → Message sending: delegates sending
src/app/services/message_pager.rs - Message sending → WhatsApp abstraction: sends text
src/app/services/messages.rs - Message sync → WhatsApp abstraction: fetches messages
src/app/services/sync.rs - WhatsApp abstraction → Native client: delegates calls
src/whatsapp/client.rs - Native client → Native authentication: uses auth
src/whatsapp/native/client.rs - Native client → Realtime events: opens listener
src/whatsapp/native/client.rs - WhatsApp abstraction → Domain models: exposes models
src/whatsapp/client.rs - Native chat operations → Domain models: maps chats
src/whatsapp/native/chats.rs - Native messaging → Domain models: maps messages
src/whatsapp/native/messages.rs - WhatsApp service → Native client: connects protocol
README.md - Realtime events → Realtime listen: streams events
README.md