1
0
forked from BRT/arc
ARC desktop app
Go to file
2026-05-26 20:30:54 +05:00
android Improve GetProfileInfoScript with polling mechanism for balance loading. Add parseBalanceFromHomeScreenOpt to differentiate loading state from zero balance. Update ScreenXmlParser logic accordingly. 2026-05-26 20:30:54 +05:00
assets Improve GetLastTransactionsScript to parse bottom-sheet transaction details for version 3.2.33. Add parseDushanbeAmount for enhanced number extraction. 2026-05-21 17:29:49 +05:00
build_x64 Fix for windows 2026-04-08 15:43:59 +07:00
database Add transactionId support to EventHandler, EventDAO, and related components for improved event tracking and error handling. Update database queries, error reporting, and UI logic accordingly. 2026-05-26 19:39:35 +05:00
docs Remove outdated AppLogDAO, LogWindow, and related functionalities. Introduce NetworkErrorUtils for detailed error categorization and enhanced logging. Refactor EventHandler to support balance adjustments and optimize thread cleanup. Add retry and timeout mechanisms to network services with improved error handling. 2026-05-23 18:37:49 +05:00
images Add app_version tracking: database schema migration, ADB utility support, and UI enhancements. 2026-05-18 18:42:59 +05:00
models Add transactionId support to EventHandler, EventDAO, and related components for improved event tracking and error handling. Update database queries, error reporting, and UI logic accordingly. 2026-05-26 19:39:35 +05:00
services Add transactionId support to EventHandler, EventDAO, and related components for improved event tracking and error handling. Update database queries, error reporting, and UI logic accordingly. 2026-05-26 19:39:35 +05:00
tessdata Switch Tesseract initialization to memory-based loading of rus.traineddata to fix issues with paths containing Cyrillic characters (Windows). 2026-04-30 19:52:07 +07:00
tests/mock_server Remove outdated AppLogDAO, LogWindow, and related functionalities. Introduce NetworkErrorUtils for detailed error categorization and enhanced logging. Refactor EventHandler to support balance adjustments and optimize thread cleanup. Add retry and timeout mechanisms to network services with improved error handling. 2026-05-23 18:37:49 +05:00
tools/adb Add ADB utilities with platform-specific support 2025-06-11 16:21:13 +07:00
tutorials Add PayByCardScript and PayByPhoneScript for Dushanbe automation, including transaction flow, OCR-based operation ID extraction, and enhanced logging. 2026-04-06 12:51:18 +07:00
views Add transactionId support to EventHandler, EventDAO, and related components for improved event tracking and error handling. Update database queries, error reporting, and UI logic accordingly. 2026-05-26 19:39:35 +05:00
.gitignore Update build documentation to reflect executable name change from ARCDesktopProject to ARC 2026-05-25 16:48:13 +05:00
app.rc Add missing build resources: app.rc (Windows resource script referencing arc.ico for the executable icon) and arc.icns (macOS app icon). Both are referenced by the build but were not tracked in the repository. 2026-05-25 16:44:32 +05:00
arc.icns Add missing build resources: app.rc (Windows resource script referencing arc.ico for the executable icon) and arc.icns (macOS app icon). Both are referenced by the build but were not tracked in the repository. 2026-05-25 16:44:32 +05:00
arc.ico Refactor project naming and executable targets, enhance UI with no-devices label, tutorial handling, and app branding updates. 2026-03-24 14:03:39 +07:00
arc.png Refactor project naming and executable targets, enhance UI with no-devices label, tutorial handling, and app branding updates. 2026-03-24 14:03:39 +07:00
build_x64.bat Fix for windows 2026-05-19 17:23:34 +07:00
BUILD.md Update build documentation to reflect executable name change from ARCDesktopProject to ARC 2026-05-25 16:48:13 +05:00
CMakeLists.txt Add OCR utilities and backend integration for enhanced screen dump analysis: 2026-04-30 19:39:21 +07:00
config.ini Add transactionId support to EventHandler, EventDAO, and related components for improved event tracking and error handling. Update database queries, error reporting, and UI logic accordingly. 2026-05-26 19:39:35 +05:00
eng.traineddata Fix for windows 2026-03-09 17:20:03 +07:00
main.cpp Integrate DeviceScreener with NetworkService for status synchronization, including debounce logic for online/offline transitions and periodic sync initiation. Refactor startDeviceScreener and startNetworkService to enable inter-component interaction. 2026-05-22 16:19:41 +05:00
migrations.sql Add transactionId support to EventHandler, EventDAO, and related components for improved event tracking and error handling. Update database queries, error reporting, and UI logic accordingly. 2026-05-26 19:39:35 +05:00
no_devices.png Refactor project naming and executable targets, enhance UI with no-devices label, tutorial handling, and app branding updates. 2026-03-24 14:03:39 +07:00
README.md Update build documentation to reflect executable name change from ARCDesktopProject to ARC 2026-05-25 16:48:13 +05:00
rus.traineddata Test 2025-04-16 09:05:20 -07:00
split_zip.ps1 Fix for windows 2026-04-12 15:17:28 +07:00

ARC Desktop

Десктопное Qt6/C++ приложение для мониторинга и автоматизации Android-приложений мобильных банков через ADB. Принимает задачи с бэкенда (получение профиля/балансов, выписка по транзакциям, создание платежей), исполняет их в реальном приложении банка на подключённом устройстве и возвращает результат.

Репозиторий: git@git.brtservice.io:BRT/arc.git


Быстрый старт

git clone git@git.brtservice.io:BRT/arc.git
cd arc

# macOS
brew install qt tesseract leptonica
mkdir -p build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
./ARC

Подробнее — см. BUILD.md (macOS + Windows).

При первом запуске потребуется токен авторизации; настройки лежат в config.ini.


Документация

Все актуальные материалы в каталоге docs/. Точка входа — docs/index.md.

Архитектура и фичи

Документ О чём
docs/index.md Общая схема приложения, потоки, технологии
docs/events.md Жизненный цикл задачи: API → БД → выполнение скриптом → отчёт
docs/bank-setup-wizard.md BankSetupWizard — мастер заведения банковского профиля (Ozon, Black, Dushanbe)
docs/status-sync.md Синхронизация online/offline статусов устройств и сервиса
docs/black_tasks.md Скрипты для банка Black (Birbank)
docs/ozon_tasks.md Скрипты для Ozon

Backend API

Документ О чём
docs/api/auth.md Логин, refresh, хранение токенов
docs/api/profile.md bank_profile и material (карты)
docs/api/device.md Регистрация десктопов и Android-устройств, отправка скриншотов
docs/api/task.md Получение задач, отправка результатов
docs/api/network.md Полная карта HTTP-вызовов приложения
docs/api/openapi.json OpenAPI спецификация бэкенда

Сборка и тесты

Документ О чём
BUILD.md Сборка под macOS и Windows
tests/mock_server/README.md Локальный mock-бэкенд для интеграционных тестов
tests/mock_server/WINDOWS.md Особенности запуска моков на Windows
tutorials/ui_info.md Туториал по UI приложения

Архитектура

MainWindow (Qt6 GUI)
  ├── DeviceScreener  (QThread) — опрос ADB-устройств, скриншоты
  ├── EventHandler    (QThread) — оркестратор задач, запуск bank-скриптов
  └── NetworkService  (QThread) — REST API + monitoring relay
android/<bank>/        — автоматизация конкретного банка (ozon, black, dushanbe, ...)
  ├── *Script.{h,cpp}       — CommonScript, LoginAndCheckAccountsScript, PayByCardScript, GetLastTransactionsScript, ...
  └── ScreenXmlParser       — парсинг ADB UI dump

android/adb/           — обёртка над adb (скриншот, tap, swipe, input, uiautomator dump)
android/ocr/           — Tesseract + утилиты поиска текста на скриншоте
android/dump/          — захват UI-дампов

database/              — SQLite через DatabaseManager (singleton) + DAO-слой
  Таблицы: devices → applications → accounts → transactions/events

models/                — POCO: DeviceInfo, AccountInfo, EventInfo, TransactionInfo, ...
services/              — фоновые потоки (DeviceScreener, EventHandler, NetworkService, AppLogger, LogArchiveSender)
views/                 — Qt-виджеты: MainWindow, DeviceWidget, BankSetupWizard, AccountWindow, ...

Полная диаграмма потоков и сигналов — docs/index.md, детально по задачам — docs/events.md.


Технологии

  • Qt 6 (Widgets, Network, Sql, Xml)
  • C++17, CMake (опционально Ninja)
  • SQLite (через QtSql)
  • ADB (платформенные бинари в tools/adb/)
  • Tesseract OCR + Leptonica (eng.traineddata, rus.traineddata)

Поддерживаемые банки (в текущем config.ini): Ozon, Black (Birbank), Dushanbe City Bank. Список расширяется через [apps] list= в config.ini.


Конфигурация

Главный файл — config.ini:

Секция Назначение
[common] Версия, валюты, токен
[apps] list= Активные банки
[db] dbPath= Путь к SQLite (./database/app_data.db)
[net] apiBase, пути ручек, мониторинг-релей
[<bank>] android_package_name, currency, country, app_version, ...

Схема БД — migrations.sql (5 таблиц).


Полезные пути

  • Логи приложения: application.log (в корне), архив отправляется через LogArchiveSender на monitoringBase
  • ADB-бинари для Windows: tools/adb/windows/
  • Тестовые скриншоты/XML: assets/<bank>/
  • Иконки и ресурсы: images/, arc.icns, arc.ico, app.rc

Скрипты бэкенда и операционные ссылки

  • Backend API (prod): см. apiBase в config.ini
  • Monitoring relay: 142.93.102.40:8080 — релеит /monitoring/log и /monitoring/dump в Telegram (systemd arc-monitoring.service)