How mikemin32/shipmentstrackbot works
Deliverybot is an allowlisted Telegram operations bot for managing clone shipments. Authorized users open a persistent, single-message workspace to browse status-grouped shipments, search and edit records, manage accounts and teams, archive or deliver shipments, and set reminders. The bot’s handlers coordinate workspace views and repository operations over SQLite; a background worker delivers manual and Expected Delivery reminders. The README documents the major capabilities, while some handler and worker internals were not excerpted, so those documented links use README evidence.
Main entry points: bot.py Bot startup · workspace.py Workspace handlers · repository.py Shipment and reminder repositories · views.py Workspace views
Components 18
Bot runtime
- Bot startup
bot.py - Allowlist middleware
middlewares/auth.py
Interactive workspace
- Workspace handlers
handlers/workspace.py - Workspace state and navigation
bot_ui/workspace.py - Workspace views
bot_ui/views.py - Workspace keyboards
bot_ui/keyboards.py
Shipment operations
- Command and shipment handlers
handlers/shipments.py - Reminder worker
services/reminder_worker.py
Persistence
- Shipment and reminder repositories
database/repository.py - SQLite database and migrations
database/db.py - Workspace sessions
database/sessions.py
Domain and formatting
- Workspace rendering
bot_ui/format.py - Shipment statuses
domain/status.py - Country helpers
domain/countries.py - Date and timezone helpers
utils/dates.py - Formatting helpers
utils/formatting.py
Other components
- Authorized user
- Telegram
Connections 25
- Authorized user → Telegram: uses bot
README.md - Telegram → Allowlist middleware: sends updates
README.md - Allowlist middleware → Workspace handlers: routes authorized
README.md - Bot startup → Allowlist middleware: registers middleware
bot.py - Bot startup → Workspace handlers: registers handlers
- Bot startup → SQLite database and migrations: connects database
bot.py - Bot startup → Shipment and reminder repositories: creates repositories
bot.py - Bot startup → Workspace sessions: creates sessions
bot.py - Bot startup → Reminder worker: starts worker
bot.py - Workspace handlers → Workspace state and navigation: coordinates workspace
handlers/workspace.py - Workspace handlers → Workspace views: requests views
handlers/workspace.py - Workspace handlers → Shipment and reminder repositories: reads and edits
handlers/workspace.py - Workspace handlers → Workspace sessions: stores workspace state
handlers/workspace.py - Workspace views → Shipment and reminder repositories: loads shipment data
bot_ui/views.py - Workspace views → Workspace keyboards: builds controls
bot_ui/views.py - Workspace views → Workspace rendering: formats screens
bot_ui/views.py - Workspace keyboards → Shipment statuses: uses status options
bot_ui/keyboards.py - Workspace rendering → Shipment statuses: labels statuses
bot_ui/format.py - Workspace rendering → Country helpers: formats countries
bot_ui/format.py - Workspace rendering → Date and timezone helpers: formats dates
bot_ui/format.py - Command and shipment handlers → Shipment and reminder repositories: manages shipments
handlers/shipments.py - Command and shipment handlers → Formatting helpers: formats responses
handlers/shipments.py - Shipment and reminder repositories → SQLite database and migrations: queries and writes
database/repository.py - Reminder worker → Shipment and reminder repositories: loads due reminders
services/reminder_worker.py - Reminder worker → Telegram: delivers reminders
README.md