How sparrowapp-dev/sparrow-api works
Main Components Identification
The system should be divided into these major components:
a. Core Modules:
• Identity Module (Authentication/Authorization)
• Workspace Module (API Management)
• Proxy Module (API Communication)
• Common Module (Shared Services)
b. External Services:
• MongoDB Database
• Kafka Message Broker
• Blob Storage
• Email Service
• HubSpot Integration
Client Layer
API Gateway Layer (NestJS)
Service Layer
• Identity Services
• Workspace Services
• Proxy Services
• Common Services
Data Access Layer
• Repositories
• External Services
Component Details
a. Identity Module (Authentication):
• User management and team collaboration features
• Connection to email service for notifications
b. Workspace Module:
• Collection management
• Environment handling
• AI Assistant integration
• Test flow management
• Feature management
c. Proxy Module:
• HTTP controller
• WebSocket gateway
• SocketIO gateway
• Custom adapters
d. Common Services:
• Kafka message handling (producers/consumers)
• Blob storage service
• Email service
• Parser service
• API response service
Data Flow Visualization
• → Synchronous communication
• ⇢ Asynchronous communication (Kafka)
• ⇄ WebSocket connections
Additional Elements
• Security layer (Guards, JWT, OAuth)
• Error handling and logging
• Configuration management
• Environment separation