How dagmawi54/pie-payment-app works
This repository implements Block Payments: a Telegram-based payment and receipt workflow with a web mini-app and administrative console. The sampled Node bot buffers Telegram text and receipt-photo OCR, extracts payment details, checks transaction duplicates, records payments in Google Sheets, and replies with status. The admin console manages groups, houses, spreadsheets, advertisements, and other operational areas through a web API. Source excerpts support the bot’s principal calls and selected admin UI interactions; backend route wiring and several unsampled capabilities are represented conservatively.
Main entry points: App.jsx Admin console · api.js Admin API client · index.js Receipt bot · GroupsManager.jsx Group management
Components 20
Receipt processing
- Receipt bot
index.js - OCR service
- Payment extraction
Administration
- Admin console
webapp/admin-panel/src/App.jsx - Group management
webapp/admin-panel/src/pages/GroupsManager.jsx - House management
webapp/admin-panel/src/pages/HousesManager.jsx - Sheet management
webapp/admin-panel/src/pages/SheetsManager.jsx - Ad campaigns
webapp/admin-panel/src/pages/AdsManager.jsx - Receipt review
webapp/admin-panel/src/pages/ReceiptVerificationManager.jsx - Admin API client
webapp/admin-panel/src/api.js - Admin backend
webapp/admin_api.py - Web application API
webapp/api.py - Campaign lifecycle
webapp/ads_manager.py
Platform services
- Telegram
- Google Sheets
- House-sheet sync
webapp/house_sheet_sync_worker.py - Mini-app launcher
webapp/launcher_bot_service.py
Receipt evaluation
- Receipt evaluation tools
receipt_lab/cli.py
Other components
- Telegram user
- Admin user
Connections 20
- Telegram user → Telegram: sends receipt
- Telegram → Receipt bot: delivers messages
- Receipt bot → OCR service: runs OCR
- Receipt bot → Payment extraction: extracts details
- Receipt bot → Google Sheets: checks and saves
- Receipt bot → Telegram: replies
- Admin user → Admin console: manages payments
- Admin console → Admin API client: uses API
- Admin console → Group management: routes to
- Admin console → House management: routes to
- Admin console → Sheet management: routes to
- Admin console → Ad campaigns: routes to
- Admin console → Receipt review: routes to
- Group management → Admin API client: loads and updates
- House management → Admin API client: manages houses
- Sheet management → Admin API client: manages sheets
- Ad campaigns → Admin API client: saves campaigns
- Admin API client → Admin backend: sends requests
- Mini-app launcher → Telegram: launches mini-app
- House-sheet sync → Admin backend: loads sync function