How salievyt/my_exchange works
My Exchange is a Django backend for currency exchange operations and cash management, with a Telegram bot and registration-request intake. The main workflow is an authenticated cashier creating an exchange operation: the API validates the request, checks cash availability, and persists the operation; cash-management endpoints handle balances and shifts, while reports and analytics expose operational results. The graph also includes user, currency, notification, and audit capabilities. Source excerpts confirm only selected links; major unsampled app routes are represented without speculative call edges.
Main entry points: urls.py API routing · analytics/views.py Analytics · reports/views.py Reports and exports · notifications/views.py Notifications
Components 23
Users and access
- User API
backend/apps/users/views.py - Users and roles
backend/apps/users/models.py
Exchange operations
- Currency API
backend/apps/currencies/views.py - Currencies and rates
backend/apps/currencies/models.py - Operation API
backend/apps/operations/views.py - Exchange operations
backend/apps/operations/models.py
Cash management
- Cash API
backend/apps/cash/views.py - Balances and shifts
backend/apps/cash/models.py
Reporting and audit
- Analytics
backend/apps/analytics/views.py - Reports and exports
backend/apps/reports/views.py - Request audit logs
backend/apps/logs/middleware.py - Log records
backend/apps/logs/models.py
Requests and bot
- Registration requests
backend/apps/requests/views.py - Request records
backend/apps/requests/models.py - Request receivers
backend/apps/requests/receivers.py - Telegram notifier
backend/bot_service/notifier.py - Bot webhook
backend/apps/bot/views_webhook.py - Bot configuration
backend/apps/bot/models.py - Notifications
backend/apps/notifications/views.py - Notification records
backend/apps/notifications/models.py
Other components
- Cashier
- API routing
backend/config/urls.py - Telegram
Connections 36
- Cashier → API routing: uses API
backend/config/urls.py - API routing → User API: routes to
backend/config/urls.py - API routing → Currency API: routes to
- API routing → Operation API: routes to
- API routing → Cash API: routes to
- API routing → Registration requests: routes to
- API routing → Analytics: routes to
- API routing → Reports and exports: routes to
- API routing → Notifications: routes to
- User API → Users and roles: reads and writes
backend/apps/users/views.py - Currency API → Currencies and rates: reads and writes
backend/apps/currencies/views.py - Operation API → Exchange operations: reads and writes
backend/apps/operations/views.py - Operation API → Balances and shifts: checks balance
backend/apps/operations/views.py - Operation API → Currencies and rates: uses currency
backend/apps/operations/views.py - Cash API → Balances and shifts: reads and writes
backend/apps/cash/views.py - Cash API → Exchange operations: summarizes activity
backend/apps/cash/views.py - Analytics → Exchange operations: queries
backend/apps/analytics/views.py - Analytics → Balances and shifts: queries
backend/apps/analytics/views.py - Analytics → Currencies and rates: queries
backend/apps/analytics/views.py - Analytics → Users and roles: queries
backend/apps/analytics/views.py - Reports and exports → Exchange operations: queries
backend/apps/reports/views.py - Reports and exports → Balances and shifts: queries
backend/apps/reports/views.py - Reports and exports → Currencies and rates: queries
backend/apps/reports/views.py - Reports and exports → Users and roles: queries
backend/apps/reports/views.py - Request audit logs → Log records: records requests
backend/apps/logs/middleware.py - Registration requests → Request records: creates requests
- Request receivers → Telegram notifier: notifies
backend/apps/requests/receivers.py - Telegram notifier → Bot configuration: reads admin config
backend/bot_service/notifier.py - Telegram notifier → Telegram: sends messages
backend/bot_service/notifier.py - Telegram → Bot webhook: posts updates
backend/apps/bot/views_webhook.py - Bot webhook → Bot configuration: reads configuration
backend/apps/bot/views_webhook.py - Bot webhook → Request records: reads requests
backend/apps/bot/views_webhook.py - Notifications → Notification records: reads and writes
backend/apps/notifications/views.py - Notifications → Balances and shifts: queries
backend/apps/notifications/views.py - Notifications → Exchange operations: queries
backend/apps/notifications/views.py - Notifications → Users and roles: queries
backend/apps/notifications/views.py