1
0
forked from BRT/arc
ARC desktop app
Go to file
2026-06-17 14:12:39 +07:00
android Force portrait orientation on connected devices, remove x100 heuristic from transaction matching, and add secondary text search filter in monitoring app. 2026-06-08 21:06:00 +05:00
assets Add screen dumps and app version track for Ozon Bank 19.19.1, including Compose-specific parsing logic and new XML assets. 2026-06-06 18:52:02 +05:00
build_x64 Fix for windows 2026-04-08 15:43:59 +07:00
database Add delete profile functionality with UI integration, local cleanup, and server synchronization. 2026-06-09 00:18:57 +05:00
docs Force portrait orientation on connected devices, remove x100 heuristic from transaction matching, and add secondary text search filter in monitoring app. 2026-06-08 21:37:46 +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
monitoring Force portrait orientation on connected devices, remove x100 heuristic from transaction matching, and add secondary text search filter in monitoring app. 2026-06-08 21:06:00 +05:00
services Added android id to post bank profile 2026-06-17 14:12:39 +07: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 Update Ozon screen dump checklist for version 19.19.1: add versioning details, revise instructions, and integrate Compose-specific parsing notes. Include new capture script for automated screenshot and UI dump generation. 2026-06-06 16:15:02 +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 delete profile functionality with UI integration, local cleanup, and server synchronization. 2026-06-09 00:18:57 +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 Include archive size in Telegram notification for x64 build. Adjust build_x64.bat to calculate and append file size to update messages. 2026-05-30 15:01:23 +05: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 AppVersionTrack enum and related helpers to support version-based parsing. Include XML assets for Dushanbe 3.2.38 version. 2026-06-01 18:17:38 +05:00
config.ini Add taskJson parameter to sendTaskError, introduce sendTaskSuccess, enhance error and success logging with detailed JSON data, and refine time mismatch handling. 2026-06-03 15:17:22 +05:00
eng.traineddata Fix for windows 2026-03-09 17:20:03 +07:00
main.cpp Optimize database logging, improve thread performance, and implement periodic maintenance to avoid GUI blocking. Replace infinite waits in AdbUtils with safe timeouts to prevent thread starvation. 2026-06-05 14:39:29 +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)