How andersonrocha091/bling_pipedrive_integration works
Main Components
a. External Services Layer:
• Pipedrive API (with API URL endpoint)
• Bling API (with API URL endpoint)
b. API Layer:
• Hapi.js Server (Port 5000)
• Three main route groups:
• PipedriveRoutes
• RevenueRoutes
• UtilRoutes
c. Service Layer:
• PipedriveService
• BlingService
d. Data Layer:
• MongoDB Database
• Strategy Pattern Implementation
• Base Strategy
• MongoDB Strategy
• Revenue Schema
Component Relationships
• External clients → API Layer (REST endpoints)
• API Layer → Service Layer (Internal communication)
• Service Layer → External Services (API calls)
• Service Layer → Data Layer (CRUD operations)
Architectural Patterns to Highlight
• Strategy Pattern for database operations (shown in src/db/strategies)
• Base Route Pattern (src/routes/base)
• Service Layer Pattern (src/services)
Infrastructure Layer
A separate section showing:
• Docker containers
• PM2 process manager
• MongoDB client (port 3000)
Environment Configuration
Configuration sources:
• .env files
• Development vs Production environments
[External Clients]
• ↓
[External Services Layer]
• ↓
[API Layer (Hapi.js)]
• ↓
[Service Layer]
• ↓
[Data Layer]
• ↓
[Infrastructure Layer]
Important Details to Include:
Technical Specifications
• Node.js 12.8
• MongoDB connection details
• Docker container architecture
• Port mappings (5000 for API, 3000 for Mongo client)
Testing Coverage
• A note about TDD implementation
• Test file coverage for main components
• Clear separation of concerns
• Integration points between systems
• Data flow directions
• Infrastructure setup
• Environment configurations
This will provide a complete picture of how the system works while maintaining readability and understanding of the architecture.