How iflytek/astron-rpa works
Project Type and Purpose
• AstronRPA is a full-stack, cloud-native RPA platform built on a microservices architecture. It provides a web frontend (Vue 3 + TypeScript), a desktop app (Tauri), multiple backend services (Java Spring Boot, Python FastAPI), an execution engine (Python), shared libraries, and a suite of reusable RPA components. It targets enterprise automation with features like visual process design, AI-powered OCR/chat, scheduling, and real-time monitoring.
High-Level Component Inventory
a. Frontend Layer
• Web UI (frontend/packages/web-app)
• UI Component Library (frontend/packages/components)
• Browser extension (frontend/packages/browser-plugin)
• Desktop App (frontend/packages/tauri-app and tauri-app-window)
b. Backend Services (each deployable as a Docker container)
• Robot Service (Java Spring Boot): Authentication, process design, scheduling, execution records
• Resource Service (Java Spring Boot): File storage, S3 config, share links
• AI Service (Python FastAPI): OCR, chat, CAPTCHA, model calls
• OpenAPI Service (Python FastAPI): API gateway, WebSocket streaming, workflow execution endpoints
c. RPA Engine & Execution Kit
• Engine Core (engine/…): FastAPI-based execution orchestrator, component registry, WebSocket hooks
• Execkit (engine/execkit): atomic and executor modules for workflow parsing and running
d. Shared Libraries
• rpaframe, rpawebsocket, locator, table_helper, etc., providing cross-service functionality
e. Infrastructure
• Nginx (docker/…): reverse proxy, load balancer, Lua auth handler
• MySQL & Redis (docker/…): persistence and caching
• Message Queue (implied—for async tasks)
• SkyWalking: distributed tracing and observability
Relationships and Data Flows
• Clients (Browser / Electron / Tauri) → Nginx gateway (HTTP/WS) → Backend services
• Web UI ↔ Robot-Service (REST) for CRUD and scheduling
• Web UI ↔ OpenAPI-Service (REST/WebSocket) for real-time execution data
• Web UI ↔ AI-Service (REST) for OCR/chat
• Desktop App communicates similarly over HTTP/WS + local SDK bridges
• Robot-Service publishes tasks/event messages to Message Queue → Engine consumes and executes via Execkit → Reports status back over WebSocket to OpenAPI-Service → UI
• Resource-Service (S3 or local store) is invoked by Robot-Service and Engine for file I/O
• All services read/write MySQL & Redis; tracing data exported to SkyWalking
Architectural Patterns and Principles
• Microservices: each domain (auth, resource, AI, openapi, execution) is isolated
• Polyglot: Java for core services, Python for AI & engine
• Monorepo (pnpm workspace): single repo for frontend packages, promoting consistency
• Containerization: Docker Compose orchestration
• Event-driven/asynchronous tasks via MQ
• Real-time feedback via WebSocket
Final Checklist
• Clear, human-readable labels on all nodes
• Version or branch indicator (e.g., v1.0) and date for architecture freshness