๐ฆ BSC Cafe Automation
Complete Feature Guide โ Telegram Commands โข Dashboards โข Data Import
๐ฑ Telegram Commands
Bot: @bsc_cafe_manager_bot | Chat ID: 515510458
๐ฐ Financial & Accounting
Log expense โ AI automatically categorizes
POS sales, Paytm QR, expenses, purchases, bank match status
Show unmatched bank transactions count (Paytm/Zomato/Cash)
Run auto-match engine for all 6 match types
Guided manual purchase entry
Show unpaid vendor invoices
๐ Report Tracking
Check Petpooja reports status (daily/weekly/monthly)
Mark report as not available for period
Trigger after uploading Axis Bank XLSX file
๐ Menu & Costing
Recipe cost breakdown + margin for one menu item
Menu items with gross margin < 50%
Active/draft/no-recipe counts + coverage %
๐ฆ Stock & Variance
Ingredients below reorder level or zero stock
Log physical closing stock count
Top 5 worst variance ingredients this month
Last 4 weeks weekly breakdown for one ingredient
๐ Zomato Analytics
Last 7 days Zomato for both brands: orders, revenue, cancel rate
Top 3 peak hours โ Zomato + Dine-In with medals (๐ฅ๐ฅ๐ฅ)
๐ฅ Customers
Top 10 VIP customers (all-time) with spend + last visit + segment
At-risk customers (30โ60 days no visit) with phone + days
Lost customers (60+ days) with phone + total spend
โ๏ธ Operations & Checklists
Opening checklist (14 items, toggle + submit)
Closing checklist (14 items, warns if opening missing)
Log cleaning for a zone (fuzzy name match)
Today's cleaning status for all zones
Last 7 cleaning entries for a zone
๐ง Maintenance
Report maintenance issue with severity
Close issue + optional expense link
All open issues grouped by severity
All equipment โ operational/needs_attention/under_repair count
๐ฆ Ordering & Vendors
Auto-create draft POs for all low-stock items
Create draft PO for specific vendor
Confirm PO + get WhatsApp-ready message
All open POs โ draft/sent/confirmed
Mark PO as received + prompt bill upload
Ingredients with reorder levels โ current stock vs threshold
๐ค File Uploads (Auto-Detect)
Auto-detects: Petpooja reports / Axis Bank statement / Zomato Settlement
Auto-detects: Zomato Business Report
Auto-detects vendor bills: Vaani Ventures / HyperPure / Blinkit
Auto-detects: Vendor bill / Paytm receipt / Daily register book (NO caption needed)
๐ Web Dashboards
Access at: http://localhost:8000/dashboard (or your production URL)
Report Tracker
Petpooja report status (daily/weekly/monthly) โ pending/received/skipped
Profit & Loss
Revenue vs expenses, brand breakdown, margin %, revenue sources per channel
Bank Reconciliation
Auto-match: vendor payments, rent, Paytm QR, Zomato payouts, cash deposits
Recipe & Menu Costing
Recipe costs, ingredient unit costs, menu margin %, coverage %, no-recipe items
Stock Variance
Theoretical vs actual consumption โ waste detection, 30-day trends per ingredient
Zomato Analytics
Peak hours, day-of-week, funnel (impressionsโclicksโorders), ads, cancellation trend
Customer Segments
VIP, regular, occasional, one-time โ at-risk & lost customers, live search
Maintenance Tracker
Equipment status grid, open issues, repair cost chart, warranty expiry
Ordering & Restock
Low stock table, open POs, vendor spend chart, reorder status
Filament Admin Panel
CRUD for Staff, Checklists, Expenses, Recipes, Equipment, POs, etc.
Email: mwctechnologies2023@gmail.com
๐ฅ Data Import Formats
POS โ Petpooja (5 Daily/Weekly/Monthly Reports)
Upload XLSX file โ Auto-detects report type from Row 2 (NOT filename)
- โ Item Report With Customer/Order Details โ DAILY โ pos_line_items
- โ Order Report: After Print Modification โ MONTHLY โ pos_bill_modifications
- โ KOT Report: Modifications Of Item โ DAILY โ pos_kot_modifications
- โ Total Customer Spend Report โ WEEKLY โ pos_customer_spend
- โ Tax Bifurcation: Group Wise โ MONTHLY โ pos_tax_group_summary
Idempotency: Replace-by-date-range (delete + reinsert same period)
Bank Statements โ Axis Bank (XLSX)
Upload "Smart Statement Report" XLSX โ Auto-categorizes each transaction
- Header: Row 15 | Data starts: Row 16
- Amount format: "INR 1,230.00" (includes comma)
- Date format: DD/MM/YYYY
Auto-category rules: POS Settlement, Vendor Payment, TDS, Rent, Bank Charges, Owner Withdrawal, etc.
Zomato Settlement (XLSX Multi-Sheet)
Upload settlement report โ Detects key sheets automatically
- ๐ Order Level sheet (data row 9+) โ zomato_orders, zomato_settlements
- ๐ HSummary sheet (row 2) โ metadata
- ๐ฐ Addition Deductions Details โ ads
Both brands tracked: BSC Zomato (21896844) + Korean Kick Zomato (22485506)
Zomato Business Report (CSV)
Daily CSV report โ zomato_daily_metrics
Vendor Bills (Auto-Detection)
๐ PDF Bills
Vaani Ventures, HyperPure, Blinkit โ parsed & saved to purchases
๐ธ Photo Bills
Kunal (Syrups), DMart โ Gemini OCR โ analyzeVendorBill()
Daily Register Book (Photo)
๐ธ Upload photo โ Auto-detects register vs Paytm receipt
Cash Balance โ Cash Sale โ subtotal โ Exp โ Owner Taken โ Shortage โ Petty Cash closing
No caption needed! Auto re-runs Paytm OCR if paytm_total detected
Paytm EDC Receipt (Photo)
๐ธ QR code machine thermal printout โ paytm_edc_daily
Auto-matched against Petpooja UPI orders: ยฑโน1 amount + ยฑ15 min time
โ๏ธ Local Development Setup
๐ Project Location
/Users/vivek/Documents/Claude/Projects/BSC Cafe Automation Project/bsc
๐ Start Laravel Server
cd bsc && php artisan serve
Port: 8000 (or 8001/8002 if busy)
๐ฆ Queue Worker
php artisan queue:work
Run in separate terminal
๐ Ngrok Tunnel
ngrok http 8000
For Telegram webhook
๐๏ธ Database
Local: bsc_local (XAMPP MariaDB)
User: bsc_user
phpMyAdmin: http://localhost/phpmyadmin
๐ Key URLs
Dashboard: http://localhost:8000/dashboard
Admin: http://localhost:8000/admin
Filament Email: mwctechnologies2023@gmail.com
๐ป Key Code Locations
Developer reference โ where things are built
๐ค Core Systems
app/Http/Controllers/Api/TelegramWebhookController.php
Telegram command routing & webhooks
routes/console.php
All scheduled tasks (04:00 IST โ 23:30 IST)
routes/web.php
Dashboard & admin panel routes
๐ฅ Data Importers
app/Services/Importers/
- โข AxisBankImporter.php
- โข ZomatoSettlementImporter.php
- โข ZomatoBusinessReportImporter.php
- โข PurchaseImporter.php
app/Services/Parsers/
Vendor bill PDF/photo parsers (Vaani, HyperPure, Blinkit, etc.)
๐ง Business Logic
app/Services/Ocr/
- โข GeminiOcrService.php (OCR engine)
- โข RegisterPhotoProcessor.php (Register book parsing)
- โข VendorBillPhotoProcessor.php (Vendor bill saving)
app/Services/Recipes/
- โข RecipeImporter.php
- โข RecipeCostCalculator.php
- โข UnitConverter.php
app/Services/Stock/
- โข IngredientCostUpdater.php
- โข VarianceReportService.php
app/Services/Reconciliation/
- โข PaytmBankMatcher.php
- โข ZomatoBankMatcher.php
- โข CashDepositMatcher.php
๐ Dashboards & Views
resources/views/dashboard/
- โข index.blade.php (Main overview)
- โข pl.blade.php (P&L)
- โข reconcile.blade.php (Bank reconciliation)
- โข menu-costing.blade.php (Recipe costs)
- โข variance.blade.php (Stock variance)
- โข zomato.blade.php (Zomato analytics)
- โข customers.blade.php (Customer segments)
- โข cleaning.blade.php (Cleaning tracker)
- โข maintenance.blade.php (Equipment)
- โข ordering.blade.php (PO & stock)
โ๏ธ Filament Admin Resources
app/Filament/Resources/
- โข StaffResource.php
- โข IngredientResource.php
- โข MenuItemResource.php
- โข RecipeResource.php
- โข ExpenseResource.php
- โข ExpenseCategoryResource.php
- โข PurchaseOrderResource.php
- โข EquipmentResource.php
- โข ChecklistTemplateResource.php
๐ฆ Artisan Commands
app/Console/Commands/
All scheduled commands + manual commands (recipe import, bank recategorize, etc.)
๐ Quick Reference
๐ Telegram Bot
@bsc_cafe_manager_bot
Chat ID: 515510458
๐ช Two Brands, One Kitchen
BSC (Dine-in + Zomato) | Korean Kick (Zomato only)
๐พ Database
MySQL (XAMPP Local) | cPanel Prod
๐ค OCR Engine
Gemini 2.5 Flash (Active)
๐ For detailed technical context, see CLAUDE.md & BUILD_LOG.md in project root