How presidio-oss/factif-ai works
High-Level Components
a) Frontend Layer:
• React-based web application (indicated by the frontend/src structure)
• Key components: Chat, Console, Explorer, Preview, Terminal
• WebSocket connections for real-time communication
b) Backend Layer:
• Node.js/TypeScript server (evident from backend/src)
• RESTful API endpoints
• WebSocket server for streaming
• Controller layer for different functionalities
c) AI Services Layer:
• Multiple LLM Providers (OpenAI, Anthropic, Gemini)
• OmniParser integration for screen parsing
• Vision-language model integration
d) Automation Layer:
• Puppeteer Mode for web automation
• Docker VNC Mode for desktop automation
• Browser Service interfaces
Component Relationships
Frontend ←→ Backend (REST/WebSocket)
Backend ←→ AI Services
Backend ←→ Automation Layer
Automation Layer ←→ Target Applications
Detailed Component Breakdown
a) Frontend Components (Blue Rectangle):
• Chat Interface
• Preview Window
• File Explorer
• Terminal/Console
• WebSocket Client
b) Backend Services (Green Rectangle):
• Action Controller
• Chat Controller
• File System Controller
• Screenshot Controller
• Streaming Controller
• Testcase Controller
c) AI Services (Purple Hexagon):
• OpenAI Provider
• Anthropic Provider
• Gemini Provider
• OmniParser Service
d) Automation Services (Orange Rectangle):
• Puppeteer Service
• Docker VNC Service
• Browser Service Interface
• Action Executor Service
Infrastructure Components (Gray Rectangle)
• Docker Containers
• VNC Server
• WebSocket Server
• File System
Data Flow Indicators
• Container communications (thick lines)
Notes Section
Annotations for:
• Scalability points
• Security boundaries
• External service dependencies
• Configuration requirements
Remember to highlight the two main automation modes (Puppeteer and Docker VNC) as parallel paths in the architecture, showing how they integrate with the core system differently.