mirror of
https://github.com/R0m1k3/Priceflow.git
synced 2026-10-11 17:29:14 +02:00
Add project documentation and initial analysis reports
This commit is contained in:
1 parent
907510bb70
commit
a025ac44df
13 files changed
+643
-9
No files matched your search
@@ -0,0 +1,47 @@
|
||||
# Integration Architecture
|
||||
|
||||
## System Overview
|
||||
|
||||
PriceFlow operates as a distributed system with three main components interacting over the network:
|
||||
|
||||
1. **Frontend (Client)**: React SPA running in the user's browser.
|
||||
2. **Backend (API)**: Python FastAPI service.
|
||||
3. **Browserless Service**: Headless Chrome instance.
|
||||
|
||||
## Communication Patterns
|
||||
|
||||
### Frontend ↔ Backend
|
||||
|
||||
- **Protocol**: HTTP/REST
|
||||
- **Format**: JSON
|
||||
- **Authentication**: (To be determined - check auth middleware)
|
||||
- **Endpoints**: Exposed via `app/routers`
|
||||
|
||||
### Backend ↔ Database
|
||||
|
||||
- **Protocol**: PostgreSQL Wire Protocol (TCP)
|
||||
- **Driver**: `psycopg2-binary` / SQLAlchemy
|
||||
- **Connection**: Persistent pool
|
||||
|
||||
### Backend ↔ Browserless
|
||||
|
||||
- **Protocol**: WebSocket
|
||||
- **Library**: Playwright
|
||||
- **Flow**: The backend connects to the remote browser to execute scraping scripts and retrieving page content/screenshots.
|
||||
|
||||
### Backend ↔ External AI Providers
|
||||
|
||||
- **Protocol**: HTTPS (API Calls)
|
||||
- **Services**: OpenAI, Anthropic, OpenRouter, Ollama (Local/Network)
|
||||
- **Library**: `litellm`
|
||||
|
||||
## Data Flow Diagram (Conceptual)
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
User[User Browser] <-->|HTTP/REST| API[FastAPI Backend]
|
||||
API <-->|SQL| DB[(PostgreSQL)]
|
||||
API <-->|WebSocket| Chrome[Browserless]
|
||||
API <-->|HTTPS| AI[AI Providers (OpenAI/Ollama)]
|
||||
Chrome -->|HTTP| Web[Target Websites]
|
||||
```
|
||||
Reference in new issue
Block a user