Skip to content

leonardomb1/Conductor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

201 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Conductor Logo

Conductor

High-Performance ETL Platform for Modern Data Engineering

.NET 9.0 Svelte Docker License Version

Conductor is a powerful, enterprise-grade ETL (Extract, Transform, Load) platform designed for seamless data orchestration between databases, APIs, and file systems. Built with modern .NET and featuring a beautiful Svelte frontend, it delivers exceptional performance through advanced parallelization and channel-based processing.


πŸ“‹ Table of Contents


✨ Features

πŸš€ Core Capabilities

  • High-Performance ETL: Channel-based producer-consumer pattern for maximum throughput
  • Multi-Database Support: PostgreSQL, MySQL, SQLite, SQL Server with connection pooling
  • RESTful API Integration: Native support for HTTP/HTTPS endpoints with pagination
  • Parallel Processing: Configurable parallel execution with intelligent resource management
  • Real-time Monitoring: Built-in job tracking, health checks, and performance metrics

🎨 Modern Interface

  • Intuitive Dashboard: Clean, responsive Svelte-based UI with Tailwind CSS
  • Job Management: Visual job scheduling, monitoring, and execution control
  • Data Preview: Interactive data exploration and validation tools
  • Real-time Updates: Live status updates and progress tracking

πŸ”’ Enterprise Security

  • LDAP Authentication: Enterprise directory integration
  • Data Encryption: AES-256 encryption for sensitive connection strings
  • Network Security: IP filtering, CORS configuration, and HTTPS support
  • Role-based Access: Fine-grained permission system

πŸ“Š Observability

  • OpenTelemetry: Comprehensive distributed tracing
  • Structured Logging: Serilog with configurable log levels
  • Health Monitoring: Docker-ready health checks
  • Error Notifications: Webhook-based error alerting

πŸ”§ Deployment Ready

  • Docker Support: Complete containerization with Docker Compose
  • Environment Configuration: Flexible configuration management
  • Scalability: Horizontal scaling capabilities
  • Cloud Ready: Kubernetes and cloud platform compatible

πŸ—οΈ Architecture

graph TB
    subgraph "Frontend Layer"
        UI[Svelte UI]
        API_CLIENT[API Client]
    end
    
    subgraph "API Layer"
        CONTROLLER[Controllers]
        MIDDLEWARE[Middleware]
        AUTH[Authentication]
    end
    
    subgraph "Business Logic"
        PIPELINE[Extraction Pipeline]
        SCHEDULER[Job Scheduler]
        TRANSFORMER[Data Transformer]
    end
    
    subgraph "Data Layer"
        REPO[Repositories]
        POOL[Connection Pool]
        MEMORY[Memory Manager]
    end
    
    subgraph "External Systems"
        DB[(Databases)]
        API_EXT[External APIs]
        FILES[File Systems]
    end
    
    UI --> API_CLIENT
    API_CLIENT --> CONTROLLER
    CONTROLLER --> MIDDLEWARE
    MIDDLEWARE --> AUTH
    CONTROLLER --> PIPELINE
    CONTROLLER --> SCHEDULER
    PIPELINE --> TRANSFORMER
    PIPELINE --> REPO
    REPO --> POOL
    POOL --> DB
    PIPELINE --> API_EXT
    PIPELINE --> FILES
    SCHEDULER --> PIPELINE
    MEMORY --> PIPELINE
Loading

Key Components

  • 🎭 Extraction Pipeline: Core processing engine with parallel execution
  • πŸ—„οΈ Connection Pool Manager: Efficient database connection management
  • 🧠 Memory Manager: Intelligent DataTable lifecycle management
  • πŸ“‹ Job Tracker: Comprehensive job scheduling and monitoring
  • πŸ”„ Data Transformers: Flexible data transformation capabilities
  • 🌐 HTTP Exchange: RESTful API integration layer

πŸš€ Quick Start

Get Conductor running in under 5 minutes:

# Clone the repository
git clone https://github.com/leonardomb1/Conductor.git
cd Conductor

dotnet publish -c Release linux-x64 (or the platform you're using)

cd build/publish/
./Conductor -fM ../../.env

That's it! Conductor is now running as an API and ready to process your data.

The docker setup is recommend as it has a web interface aswell:

# Clone the repository
git clone https://github.com/leonardomb1/Conductor.git
cd Conductor

docker compose up -d

open http://localhost:3000

πŸ“– Installation

Prerequisites

Option 1: Docker Deployment (Recommended)

# Clone and configure
git clone https://github.com/leonardomb1/Conductor.git
cd Conductor

# Copy and configure environment
cp .env.example .env
# Edit .env with your settings

# Deploy with Docker Compose
docker compose up -d

# Check health status
docker compose ps

Option 2: Local Development

# Backend setup
cd src/Backend
dotnet restore
dotnet build

# Frontend setup  
cd ../Frontend
npm install
npm run build

# Configure environment
cp .env.example .env
# Edit .env with your database settings

# Run migrations
dotnet run -- --migrate-init-file

# Start the application
dotnet run -- --file

Option 3: Production Binary

# Download latest release
wget https://github.com/leonardomb1/Conductor/releases/latest/download/conductor-linux-x64.tar.gz

# Extract and run
tar -xzf conductor-linux-x64.tar.gz
cd conductor

# Configure environment
cp .env.example .env
# Edit .env with your settings

# Run migrations and start
./Conductor --migrate-init-file

βš™οΈ Configuration

Environment Variables

Create a .env file in the project root, you can use the .env.example as a basis and edit for your use.

Database Support

Conductor supports multiple database systems:

Database Connection String Example
PostgreSQL Server=localhost;Port=5432;Database=mydb;User Id=user;Password=pass;
MySQL Server=localhost;Port=3306;Database=mydb;Uid=user;Pwd=pass;
SQLite Data Source=app.db;Mode=ReadWriteCreate;
SQL Server Server=localhost;Database=mydb;User Id=user;Password=pass;

🎯 Usage

1. Creating Data Sources

Database Origin

{
  "originName": "Production Database",
  "originDbType": "PostgreSQL",
  "originConStr": "Server=prod-db;Port=5432;Database=sales;User Id=reader;Password=***;",
  "": "Server=prod-db;Port=5432;Database=sales;User Id=reader;Password=***;",
  "originTimeZoneOffSet": 0
}

2. Configuring Extractions

{
  "name": "Daily Sales Extract",
  "originId": 1,
  "destinationId": 2,
  "scheduleId": 1,
  "overrideQuery": "SELECT * FROM sales WHERE created_date >= '2025-01-01'"
}

3. Running Extractions

Via API

# Execute transfer (source to destination)
curl -X POST "http://localhost:8080/api/extractions/transfer?scheduleId=1" \
  -H "Authorization: Key your-api-key"

# Execute pull (source to CSV)
curl -X POST "http://localhost:8080/api/extractions/pull?scheduleId=1" \
  -H "Authorization: Key your-api-key"

# Fetch data preview
curl -X GET "http://localhost:8080/api/extractions/fetch?id=1&page=1" \
  -H "Authorization: Key your-api-key"

Via Frontend

  1. Navigate to Extractions in the dashboard
  2. Select your extraction configuration
  3. Click Execute Transfer or Pull Data
  4. Monitor progress in the Jobs section

4. Scheduling Jobs

To be done in the future. Recommended to use a scheduler such as Airflow for this.


πŸ”Œ API Reference

Authentication

When Authentication is activated in the environment variable, all routes, barring ssologin and login routes, require authentication through 'Authorization' header prefixed with either: 1. Key, when using API master key; 2. Bearer, JWT token gained by succesfully logging in the login or ssologin routes; or 3. Basic, with a Base64 encoded user and password.

It is recomended to always use Bearer tokens whenever possible.

Authorization: {Basic|Bearer|Key} your_secret

Core Endpoints

Extractions

  • GET /api/extractions - List all extractions
  • POST /api/extractions - Create new extraction
  • GET /api/extractions/{id} - Get extraction details
  • PUT /api/extractions/{id} - Update extraction
  • DELETE /api/extractions/{id} - Delete extraction
  • POST /api/extractions/transfer - Execute transfer job
  • POST /api/extractions/pull - Execute pull job
  • GET /api/extractions/fetch - Preview data

Jobs

  • GET /api/jobs - List all jobs
  • GET /api/jobs/{id} - Get job details
  • DELETE /api/jobs/{id} - Cancel job

Origins & Destinations

  • GET /api/origins - List data sources
  • POST /api/origins - Create data source
  • GET /api/destinations - List destinations
  • POST /api/destinations - Create destination

Schedules

  • GET /api/schedules - List schedules
  • POST /api/schedules - Create schedule
  • PUT /api/schedules/{id} - Update schedule

Query Parameters

Filtering

  • name - Filter by exact name
  • contains - Filter by partial name match
  • scheduleId - Filter by schedule ID
  • originId - Filter by origin ID
  • take - Limit results

Pagination

  • page - Page number (1-based)
  • pageSize - Results per page

Response Format

{
  "statusCode": 200,
  "message": "Success",
  "content": [...],
  "page": 1,
  "success": true
}

🌊 Data Flow

Transfer Process

  1. Source Query - Execute query against origin database/API
  2. Data Extraction - Fetch data using parallel processing
  3. Transformation - Apply any configured transformations
  4. Destination Load - Insert/update data in destination
  5. Monitoring - Track progress and handle errors

Pull Process

  1. Source Query - Execute query against origin
  2. Data Extraction - Fetch data in batches
  3. CSV Generation - Convert to CSV format
  4. File Export - Save to configured output directory

Parallel Processing

  • Producer-Consumer Pattern - Separate data extraction and loading
  • Channel-based Communication - High-performance data pipeline
  • Configurable Parallelism - Optimize for your infrastructure
  • Memory Management - Automatic cleanup and optimization

πŸ”§ Advanced Configuration

Connection Pooling

# Connection pool settings
CONNECTION_POOL_MAX_SIZE=50
CONNECTION_POOL_MIN_SIZE=5
CONNECTION_IDLE_TIMEOUT_MINUTES=30

Memory Management

# DataTable memory management
DATATABLE_LIFETIME_MINUTES=30
DATATABLE_CLEANUP_INTERVAL_MINUTES=5
MEMORY_PRESSURE_THRESHOLD_GB=4
GC_CHECK_INTERVAL_MINUTES=1

Performance Tuning

# Parallel processing
MAX_DEGREE_PARALLEL=20
MAX_CONSUMER_FETCH=200
MAX_PRODUCER_LINECOUNT=100000

# Timeouts
QUERY_TIMEOUT_SEC=1800
CONNECTION_TIMEOUT_MIN=15

Custom Transformations

// Example transformation script
public class CustomTransformer : IDataTransformer
{
    public async Task<Result<DataTable>> TransformAsync(DataTable input, string script)
    {
        // Your transformation logic here
        return Result.Ok(transformedData);
    }
}

πŸ“Š Monitoring & Observability

Health Checks

# Check API health
curl http://localhost:8080/api/health

Metrics & Tracing

  • OpenTelemetry Integration - Distributed tracing
  • Prometheus Metrics - Performance monitoring
  • Structured Logging - Comprehensive audit trail
  • Custom Dashboards - Grafana-compatible metrics

Log Levels

# Configure logging
LOGGING_LEVEL_DEBUG=false
DEVELOPMENT_MODE=false
SEND_WEBHOOK_ON_ERROR=true

Error Handling

  • Automatic Retries - Configurable retry policies
  • Dead Letter Queues - Failed message handling
  • Webhook Notifications - Real-time error alerts
  • Graceful Degradation - Partial failure handling

πŸ” Security

Authentication Methods

  1. API Key Authentication - Simple key-based access
  2. LDAP Integration - Enterprise directory services
  3. Role-based Access Control - Planned for the future

Data Protection

  • Encryption at Rest - AES-256 encryption for sensitive data
  • Encryption in Transit - TLS/SSL for all communications
  • Connection String Encryption - Automatic credential protection
  • IP Whitelisting - Network-level access control

Security Best Practices

# Generate secure encryption key
openssl rand -base64 32

# Configure secure headers
USE_HTTPS=true
VERIFY_CORS=true
VERIFY_TCP=true

# Set up IP filtering
ALLOWED_IP_ADDRESSES="10.0.0.0/8|192.168.0.0/16"

🐳 Docker Deployment

Docker Compose (Recommended)

# docker-compose.yml
version: '3.8'

services:
  conductor-api:
    image: conductor-api:latest
    environment:
      - CONNECTION_STRING=Server=database;Port=5432;Database=ConductorDb;User Id=conductor;Password=password;
    depends_on:
      - database
    ports:
      - "8080:8080"

  conductor-frontend:
    image: conductor-frontend:latest
    environment:
      - API_HOST=conductor-api:8080
    ports:
      - "3000:3000"

  database:
    image: postgres:15
    environment:
      - POSTGRES_DB=ConductorDb
      - POSTGRES_USER=conductor
      - POSTGRES_PASSWORD=password
    volumes:
      - postgres_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"

volumes:
  postgres_data:

Kubernetes Deployment

# kubernetes-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: conductor-api
spec:
  replicas: 3
  selector:
    matchLabels:
      app: conductor-api
  template:
    metadata:
      labels:
        app: conductor-api
    spec:
      containers:
      - name: conductor-api
        image: conductor-api:latest
        ports:
        - containerPort: 8080
        env:
        - name: CONNECTION_STRING
          valueFrom:
            secretKeyRef:
              name: conductor-secrets
              key: connection-string

πŸ§ͺ Development

Prerequisites

  • .NET 9.0 SDK
  • Node.js 18+
  • Docker Desktop
  • PostgreSQL (optional)

Project Structure

Conductor/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Backend/
β”‚   β”‚   β”œβ”€β”€ Controller/          # API controllers
β”‚   β”‚   β”œβ”€β”€ Service/             # Business logic
β”‚   β”‚   β”œβ”€β”€ Repository/          # Data access
β”‚   β”‚   β”œβ”€β”€ Model/               # Entity models
β”‚   β”‚   β”œβ”€β”€ Middleware/          # Custom middleware
β”‚   β”‚   └── Shared/              # Shared utilities
β”‚   └── Frontend/
β”‚       β”œβ”€β”€ src/
β”‚       β”‚   β”œβ”€β”€ routes/          # Svelte routes
β”‚       β”‚   β”œβ”€β”€ lib/             # Shared components
β”‚       β”‚   └── app.html         # Main template
β”‚       └── static/              # Static assets
β”œβ”€β”€ docker/                      # Docker configurations
β”œβ”€β”€ .github/                     # GitHub Actions
└── docs/                        # Documentation

🀝 Contributing

We welcome contributions!

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

Reporting Issues

  • Use the issue tracker
  • Include reproduction steps and environment details
  • Label issues appropriately (bug, enhancement, question)

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


⭐ Star this repository if you find it useful!

About

Data Orchestration in C#. Extract data from HTTP and SQL sources into SQL Databases.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages