Skip to main content

System Architecture

CorrData uses a modern, event-driven architecture designed for reliability, scalability, and real-time analytics.
┌─────────────────────────────────────────────────────────────────┐
│                        Client Layer                              │
├─────────────────┬─────────────────┬─────────────────────────────┤
│   Web Dashboard │   Mobile PWA    │   AI Assistants (MCP)       │
└────────┬────────┴────────┬────────┴─────────────┬───────────────┘
         │                 │                       │
         ▼                 ▼                       ▼
┌─────────────────────────────────────────────────────────────────┐
│                       API Gateway                                │
│                    (GraphQL / REST)                             │
└────────────────────────────┬────────────────────────────────────┘

         ┌───────────────────┼───────────────────┐
         ▼                   ▼                   ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│  Asset Service  │ │ Analytics Svc   │ │ Compliance Svc  │
└────────┬────────┘ └────────┬────────┘ └────────┬────────┘
         │                   │                   │
         ▼                   ▼                   ▼
┌─────────────────────────────────────────────────────────────────┐
│                       Data Layer                                 │
├─────────────────┬─────────────────┬─────────────────────────────┤
│   PostgreSQL    │   TimescaleDB   │      Neo4j                  │
│   (Assets)      │   (Time-series) │      (Relationships)        │
└─────────────────┴─────────────────┴─────────────────────────────┘

Core Components

Client Layer

Web Dashboard

React-based SPA for operators and managers. Real-time dashboards, compliance tracking, and reporting.

Mobile PWA

Progressive Web App for field technicians. Offline-first design with GPS integration.

AI Assistants

MCP server enables Claude and other AI assistants to interact with pipeline data.

API Layer

CorrData exposes a unified GraphQL API for all client applications:
  • Queries - Read operations for assets, measurements, compliance status
  • Mutations - Write operations for creating readings, updating assets
  • Subscriptions - Real-time updates for dashboards and alerts

Service Layer

ServiceResponsibility
Asset ServiceCRUD operations for pipelines, segments, test stations, rectifiers
Analytics ServiceRisk scoring, trend analysis, anomaly detection
Compliance ServiceRegulation tracking, deadline management, reporting
Import ServiceGIS data import from ArcGIS and Shapefiles
Notification ServiceAlerts, emails, SMS for critical events

Data Layer

Primary relational database for asset data:
  • Asset metadata and attributes
  • Tenant isolation via row-level security
  • Geospatial queries with PostGIS extension
Time-series database for measurements:
  • Optimized for time-series queries
  • Automatic data compression
  • Continuous aggregates for dashboards
Graph database for relationships:
  • Asset topology (what protects what)
  • Impact analysis (cascade effects)
  • Visualization data for relationship graphs

Deployment Architecture

CorrData is deployed on AWS using containerized services:
┌─────────────────────────────────────────────────────────────────┐
│                         AWS Cloud                                │
├─────────────────────────────────────────────────────────────────┤
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐              │
│  │ CloudFront  │  │    ALB      │  │  API GW     │              │
│  │   (CDN)     │  │             │  │             │              │
│  └──────┬──────┘  └──────┬──────┘  └──────┬──────┘              │
│         │                │                │                      │
│         ▼                ▼                ▼                      │
│  ┌─────────────────────────────────────────────────────┐        │
│  │                  ECS Fargate                         │        │
│  │  ┌─────────┐  ┌─────────┐  ┌─────────┐              │        │
│  │  │ Web App │  │ GraphQL │  │ Workers │              │        │
│  │  └─────────┘  └─────────┘  └─────────┘              │        │
│  └─────────────────────────────────────────────────────┘        │
│                              │                                   │
│         ┌────────────────────┼────────────────────┐              │
│         ▼                    ▼                    ▼              │
│  ┌─────────────┐      ┌─────────────┐      ┌─────────────┐      │
│  │    RDS      │      │ ElastiCache │      │   Neptune   │      │
│  │ PostgreSQL  │      │   (Redis)   │      │  (Neo4j)    │      │
│  └─────────────┘      └─────────────┘      └─────────────┘      │
└─────────────────────────────────────────────────────────────────┘

Security Architecture

Multi-Tenant Isolation

CorrData uses PostgreSQL Row-Level Security (RLS) for tenant isolation:
  • Every table has a tenant_id column
  • RLS policies enforce tenant boundaries at the database level
  • API tokens include tenant claims for automatic filtering

Authentication Flow

User → Cognito → JWT Token → API Gateway → Service

                    └── Contains: user_id, tenant_id, roles

Data Encryption

LayerEncryption
In TransitTLS 1.3 for all connections
At RestAES-256 for RDS and S3
ApplicationField-level encryption for sensitive data

Scalability

CorrData scales horizontally to handle growing data volumes:
  • ECS Auto-Scaling - Add containers based on CPU/memory
  • Read Replicas - Scale database reads independently
  • TimescaleDB Partitioning - Automatic time-based partitioning
  • CDN Caching - Edge caching for static assets