How zarnicaclub/zcminiapp works
newCRM ingests Tilda orders and Google Sheets BSO updates, processes emailed call recordings, and presents linked orders, clients, calls, and BSO records in a Telegram Mini App. The main flow is webhook normalization and persistence, plus IMAP parsing/matching and S3 storage; CRM users browse or manually match calls. The graph follows sampled entry points and README capabilities; CRM repository internals and some worker/webhook details are represented only at their supported module paths.
Main entry points: orders_webhook/app.py Webhook routes · service.py Call matching and storage · crm/app.py CRM API · db.py Database access
Components 24
Order intake
- Application entry
app/main.py - Webhook routes
orders_webhook/app.py - Tilda normalization
shared/tilda.py - BSO normalization
shared/gsheets.py - Order and BSO upsert
orders_webhook/service.py - Confirmation email
shared/mailer.py
Call processing
- Worker scheduler
calls_worker/main.py - IMAP fetch
calls_worker/imap.py - Email and MP3 parser
calls_worker/parser.py - Call matching and storage
calls_worker/service.py
CRM experience
- CRM API
crm/app.py - Mini App assets
crm/webassets.py - CRM interface
crm/static/app.js - Telegram auth
crm/auth.py - CRM data access
crm/repo.py
Shared services
- Database access
shared/db.py - PostgreSQL
- S3 recordings
- Telegram API
- SMTP service
Other components
- Tilda
- Google Apps Script
- Call email
- Telegram user
Connections 25
- Telegram user → Application entry: opens Mini App
- Application entry → CRM API: dispatches CRM routes
- Application entry → Webhook routes: dispatches webhook routes
- Tilda → Webhook routes: posts order
- Google Apps Script → Webhook routes: posts BSO
- Webhook routes → Tilda normalization: parses payload
- Webhook routes → BSO normalization: parses payload
- Webhook routes → Order and BSO upsert: upserts records
- Order and BSO upsert → Database access: writes orders and clients
- Database access → PostgreSQL: queries
- Order and BSO upsert → Confirmation email: sends confirmation
- Confirmation email → SMTP service: sends email
- Worker scheduler → Call matching and storage: runs cycles
- Call matching and storage → IMAP fetch: fetches messages
- IMAP fetch → Call email: reads mail
- Call matching and storage → Email and MP3 parser: parses and matches
- Call matching and storage → Database access: reads orders; writes calls
- Call matching and storage → S3 recordings: uploads recordings
- CRM interface → CRM API: requests API data
- CRM API → Mini App assets: serves assets
- CRM API → Telegram auth: validates initData
- CRM API → CRM data access: handles CRM queries
- CRM data access → Database access: reads and updates records
- CRM data access → S3 recordings: creates recording links
- Worker scheduler → Telegram API: sends failure alerts