SOP Bot_V2 v3.0 · Step 4 database-first

Telegram Shop Bot — database foundation

The MySQL schema, Laravel migrations, catalog seed and deployment alert protocol are in place under laravel/. Lovable never touches MySQL directly — it will consume the Laravel API only.

Schema map

Identity

customers, customer_preferences, admin_users, roles, permissions

Bot session

bot_sessions, bot_message_registry, navigation_events

Catalog

service_categories, services, service_packages, tutorials, media_assets

Commerce

orders, order_status_history, products, product_orders

Money

wallet_accounts, wallet_transactions, payments, payment_callbacks

Content

broadcasts, broadcast_recipients, notification_logs

Giveaway

giveaway_campaigns, giveaway_entries, giveaway_winners

Control

settings, deployment_events, migration_alerts, audit_logs

Deployment alert protocol

Every release runs php artisan deploy:check, which records a deployment event and pushes this alert to the admin Telegram chat.

Frontend-only deployment

UI deployed; no database migration detected.

INFO

Laravel code, no migration

Backend deployed; schema unchanged.

INFO

Pending migration found

ACTION REQUIRED: review N pending migrations.

ACTION

Migration succeeded

Database updated successfully; migration batch recorded.

SUCCESS

Migration failed

DEPLOYMENT STOPPED; database update failed; review logs.

CRITICAL

Next steps

  1. 01

    Create the Hostinger MySQL database and least-privilege app user, then fill shared/.env.

  2. 02

    Run php artisan migrate --force followed by db:seed --force to load roles, settings and the TikTok/Facebook/Instagram catalog.

  3. 03

    Point settings.deploy_alert_chat_id at the admin Telegram group so every deploy alerts us.

  4. 04

    Then build the Mini App UI module by module against the published API contract.