1
0
forked from BRT/arc
ARC desktop app
Go to file
2026-06-01 19:55:45 +05:00
android Expand AppVersionTrack documentation with guidelines for adding new app versions. 2026-06-01 19:55:45 +05:00
assets Expand AppVersionTrack documentation with guidelines for adding new app versions. 2026-06-01 19:55:45 +05:00
build_x64 Fix for windows 2026-04-08 15:43:59 +07:00
database Add support for database wipe on exit, including delayed deletion handling and user-triggered wipe option in GUI. Update DatabaseManager with sentinel logic and file path utilities. 2026-05-30 12:29:23 +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 parallel ADB scanning with QtConcurrent, optimize device sync logic, and replace blocking API calls with fire-and-forget dispatch for improved performance. 2026-06-01 14:54:17 +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 Add DesktopSelectionWindow with UI logic for selecting or creating desktops. Update NetworkService to handle desktop selection flow. Improve desktop synchronization and settings management. Enhance mock server to support desktop device data in tests. 2026-05-28 19:12:27 +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 Expand AppVersionTrack documentation with guidelines for adding new app versions. 2026-06-01 19:55:45 +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 appVersion to TaskDumpMeta structure and update associated scripts for enhanced application version tracking in tasks and monitoring outputs. 2026-06-01 14:29:05 +05:00
eng.traineddata Fix for windows 2026-03-09 17:20:03 +07:00
main.cpp Add update mechanism for ARC: implement UpdateService for version checks, downloads, and staging; add ApplyUpdate for file copying and relaunch; integrate update actions into MainWindow and workflows. 2026-05-30 13:36:50 +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)