How org-45/escrow-agent works
Main System Components
a) Frontend Layer:
• Next.js application (shown in /frontend directory)
• Key pages: login, signup, home, upload
• API service integration
b) Backend Layer:
• Go-based REST API server
• Internal modules:
• Authentication system
• Admin management
• Escrow handling
• Transaction processing
• File upload service
• Logging system
c) Database Layer:
• PostgreSQL database (evident from db_init)
d) External Services:
• S3 bucket for document storage (mentioned in README)
• Payment gateway integration points
• BrowserStack for testing
[Client Layer]
• ↓ ↑
[API Gateway/Load Balancer]
• ↓ ↑
[Application Layer]
• ↓ ↑
[Service Layer]
• ↓ ↑
[Database Layer]
Component Relationships
Key interactions:
• User authentication flow
• Escrow transaction flow
• Document storage flow
• Payment processing flow
• Dispute resolution flow
Specific Implementation Details
Crucial elements:
a) Frontend Section:
• Next.js pages and components
• API service connector
• User interface flows
b) Backend Services (Go):
• Auth Service (/internal/auth)
• Admin Service (/internal/admin)
• Escrow Service (/internal/escrow)
• Transaction Service (/internal/transactions)
• File Upload Service (/internal/fileupload)
• Logging Service (/internal/logs)
c) Database:
• PostgreSQL instance
• Key tables (users, transactions, escrows, disputes)
d) Security Layer:
• JWT authentication
• Middleware components
• Authorization flows
Key Flows to Highlight
Critical paths:
Escrow Transaction Flow
• Buyer deposit
• Seller fulfillment
• Buyer confirmation
• Fund release