How r3mem1/lidpilot works
LeadPilot is a multi-tenant business inbox and CRM: customer messages arrive through Telegram or VK, are stored and processed by an AI pipeline, then answered or escalated into manager workflows and leads. A second major workflow handles staff schedules and bookings, including AI-assisted booking requests and staff notifications. The README documents the major capabilities; source excerpts and the SOURCE INDEX support the depicted calls. Several route and subsystem implementations were not sampled, so their internal links are omitted where ownership is uncertain.
Main entry points: main.py FastAPI app · message_service.py Message processing · messages.py Message webhooks · booking_service.py Booking service
Components 26
Application access
- FastAPI app
main.py - Auth routes
routes/auth.py - Business API
routes/businesses.py - Business cabinet
routes/cabinet.py - Admin panel
routes/admin.py
Messaging and CRM
- Message webhooks
routes/messages.py - Channel clients
integrations/base.py - Telegram adapter
integrations/telegram.py - VK adapter
integrations/vk.py - Message processing
services/message_service.py - Leads and customers
services/lead_service.py
AI processing
- AI pipeline
ai/pipeline.py - Business AI context
ai/context.py
Staff booking
- AI booking engine
ai/booking.py - Staff schedules
services/schedule_service.py - Booking service
services/booking_service.py - Booking routes
routes/bookings.py - Staff notifications
services/master_notify_service.py
Platform operations
- Application database
models.py - Access control
services/access_service.py - Authentication
services/auth_service.py - Integration setup
services/integration_service.py - Audit log
services/audit_service.py - Admin operations
services/admin_service.py
Other components
- Customer
- Business staff
Connections 37
- FastAPI app → Auth routes: mounts routes
main.py - FastAPI app → Message webhooks: mounts routes
main.py - FastAPI app → Booking routes: mounts routes
main.py - FastAPI app → Business API: mounts routes
main.py - FastAPI app → Business cabinet: mounts routes
main.py - FastAPI app → Admin panel: mounts routes
main.py - Customer → Message webhooks: sends messages
- Message webhooks → Message processing: delegates processing
routes/messages.py - Message webhooks → Telegram adapter: receives Telegram
routes/messages.py - Message webhooks → VK adapter: receives VK
routes/messages.py - Telegram adapter → Channel clients: implements contract
integrations/telegram.py - VK adapter → Channel clients: implements contract
integrations/vk.py - Message processing → AI pipeline: runs AI pipeline
services/message_service.py - Message processing → Leads and customers: registers classification
services/message_service.py - Message processing → Application database: stores messages
services/message_service.py - AI pipeline → Business AI context: uses business facts
ai/pipeline.py - Business API → Business AI context: provides business context
routes/businesses.py - Business staff → Business cabinet: manages inbox
- Business cabinet → Leads and customers: views CRM
routes/cabinet.py - Business staff → Booking routes: manages bookings
- Booking routes → Booking service: manages bookings
routes/bookings.py - Booking routes → Staff schedules: manages shifts
routes/bookings.py - Message processing → AI booking engine: handles AI booking
services/message_service.py - AI booking engine → Booking service: checks booking slots
- Booking service → Staff schedules: uses staff shifts
services/booking_service.py - Booking service → Application database: persists bookings
services/booking_service.py - Booking service → Staff notifications: notifies staff
services/master_notify_service.py - Integration setup → Telegram adapter: configures Telegram
services/integration_service.py - Integration setup → VK adapter: configures VK
services/integration_service.py - Message processing → Channel clients: uses channel contract
services/message_service.py - Auth routes → Authentication: authenticates users
routes/auth.py - Auth routes → Access control: checks access
routes/auth.py - Access control → Application database: reads memberships
services/access_service.py - Authentication → Application database: loads users
services/auth_service.py - Admin panel → Admin operations: delegates admin work
- Admin operations → Audit log: records changes
services/admin_service.py - Audit log → Application database: writes system logs
services/audit_service.py