lily_website

πŸ“‚ Commands Logic

⬅️ Back 🏠 Docs Root

Business logic layer for the Commands feature.

πŸ—ΊοΈ Module Map

Component Description
πŸ“œ Orchestrator Start logic and user registration

πŸ—οΈ Class: StartOrchestrator

Located in: src/telegram_bot/features/telegram/commands/logic/orchestrator.py

BaseBotOrchestrator
  └── StartOrchestrator

Constructor

Parameter Type Description
auth_provider AuthDataProvider (Protocol) Data access layer (API or DB)
ui CommandsUI Pure UI renderer

Entry Flow

handle_entry(user_id, payload=User)
β”‚
β”œβ”€β”€ 1. Extract User from payload
β”œβ”€β”€ 2. Build UserUpsertDTO (telegram_id, first_name, username, ...)
β”œβ”€β”€ 3. await self.auth.upsert_user(user_dto)  ← Contract call
β”œβ”€β”€ 4. user_name = user.first_name or "User"
└── 5. return await self.render(user_name)
         └── self.ui.render_start_screen(user_name)