← Back to index

shiprocket-ads-core

Repo: shiprocket-ads-core

Summary

Spring Boot 3 service providing core capabilities for Shiprocket Ads. It exposes web APIs, integrates with Meta (Facebook) and Google Ads for insights/management, validates seller/platform context, processes CSV-based workflows, publishes/consumes Kafka topics for async processing, persists operational data in MySQL and MongoDB, and uses Redis for caching and shared state. Includes observability via Actuator and OpenTelemetry.

Responsibilities

Dependencies

Architecture Diagram

shiprocket-ads-core architecture diagram

Mermaid Source

flowchart LR
  U[Client/UI or Internal Caller] --> S[shiprocket-ads-core]
  S --> CFG[Config Server]
  S --> K[Kafka]
  S --> R[Redis]
  S --> MY[(MySQL)]
  S --> MO[(MongoDB)]
  S --> S3[AWS S3]
  S --> SES[AWS SES]
  S --> META[Meta Graph API]
  S --> GADS[Google Ads API]
  S --> OAI[OpenAI API]
  S --> VAI[Vertex AI / Gemini]
  S --> OR[OpenRouter]
  S --> AGG[Aggregator Service]
  S --> COMM[Communication Service]
  S --> EDGE[Edge/Checkout Public API]
  S --> PY[Ads Python Service]
  S --> OTLP[OTLP Collector (SigNoz)]

DFD Diagram

shiprocket-ads-core DFD diagram

Mermaid Source

flowchart TB
  %% External Entities
  E1[External Entity: Client/UI] 
  E2[External Entity: Meta Graph API]
  E3[External Entity: Google Ads/OAuth]
  E4[External Entity: AWS S3/SES]
  E5[External Entity: Kafka Cluster]
  E6[External Entity: Config Server]
  E7[External Entity: Internal Services (Aggregator/Communication/Edge/Ads-Python)]
  E8[External Entity: OTLP Collector]
  
  %% Process
  P1((Process: shiprocket-ads-core API & Workers))
  
  %% Data Stores
  D1[(Data Store: MySQL)]
  D2[(Data Store: MongoDB)]
  D3[(Data Store: Redis)]
  
  %% Flows
  E1 -->|API Requests (Ads ops, CSV workflows)| P1
  P1 -->|API Responses| E1
  E6 -->|Config/Secrets/Properties| P1
  P1 -->|Read/Write ads data| D1
  P1 -->|Read/Write documents/insights| D2
  P1 -->|Cache/locks/state| D3
  P1 -->|Publish/Consume events (insights, audit, validation, DLQ)| E5
  P1 -->|Fetch/Manage campaigns & insights| E2
  P1 -->|Auth & Ads operations| E3
  P1 -->|Store creatives / send emails| E4
  P1 -->|Service-to-service calls| E7
  P1 -->|Traces/Metrics (OTLP)| E8