Overview

Beep.OilandGas is a comprehensive Oil & Gas Engineering and Data Management Platform built on the PPDM 3.9 data model. The system provides end-to-end lifecycle management for petroleum assets — from exploration and development through production, reservoir management, economics, HSE compliance, and decommissioning. All business operations are field-scoped via IFieldOrchestrator with metadata-driven data access through PPDMGenericRepository.

Three-Layer Architecture

Web Layer

Blazor Server UI with MudBlazor components. Business process pages follow engineer workflows (not CRUD), with dark mode support and SVG icons throughout.

Beep.OilandGas.Web

API Layer

ASP.NET Core REST API with JWT authentication, field-scoped endpoints, and IFieldOrchestrator for current field context management.

Beep.OilandGas.ApiService

Data Layer

PPDM 3.9 schema with PPDMGenericRepository (metadata-driven CRUD) and IDMEEditor (database-agnostic). Single unified database for all lifecycle data.

Beep.OilandGas.PPDM39

Core Projects

ProjectPurpose
Beep.OilandGas.ApiServiceASP.NET Core API — controllers, DI setup, JWT auth
Beep.OilandGas.WebBlazor Server UI — business process pages, data management
Beep.OilandGas.PPDM39PPDM 3.9 models, interfaces, DTOs (central hub)
Beep.OilandGas.PPDM39.DataManagementPPDM services, module setup, seed data, validation
Beep.OilandGas.ModelsShared models, core interfaces, entity base classes
Beep.OilandGas.LifeCycleField orchestrator, exploration services, phase coordination
Beep.OilandGas.UserManagementIdentity, roles, user personas
Beep.OilandGas.ClientHTTP client library for API consumption
Beep.OilandGas.DataManagerData management utilities

Oil & Gas Lifecycle Domains

Prospect Identification

Prospects, leads, plays, seismic interpretation, and risk assessment for exploration opportunities.

Beep.OilandGas.ProspectIdentification

Development Planning

Well planning, facility design, field development plans (FDP), and project scheduling.

Beep.OilandGas.DevelopmentPlanning

Drilling & Construction

Well construction, drilling operations, casing design, cementing, and completion programs.

Beep.OilandGas.DrillingAndConstruction

Production Operations

Well operations, artificial lift, optimization, workover scheduling, and production monitoring.

Beep.OilandGas.ProductionOperations

Production Accounting

Allocation, royalties, run tickets, production balancing, and reserves reporting.

Beep.OilandGas.ProductionAccounting

Production Forecasting

Decline curve analysis (DCA), production predictions, and reserves estimation.

Beep.OilandGas.ProductionForecasting

Economic Analysis

NPV, IRR, PIR calculations, sensitivity analysis, and project economic evaluation.

Beep.OilandGas.EconomicAnalysis

HSE

Health, Safety & Environment — incident tracking, HAZOP studies, barriers, and compliance.

Beep.OilandGas.HSE

Decommissioning

Well abandonment, facility decommissioning, cost estimation, and site restoration planning.

Beep.OilandGas.Decommissioning

Permits & Applications

Regulatory permit applications, compliance tracking, and approval workflows.

Beep.OilandGas.PermitsAndApplications

Lease Acquisition

Land management, mineral rights, lease agreements, and payment tracking.

Beep.OilandGas.LeaseAcquisition

Nodal Analysis

Well performance analysis — IPR/VLP modeling, flow assurance, and system optimization.

Beep.OilandGas.NodalAnalysis

Engineering Analysis Tools

ProjectPurpose
Beep.OilandGas.WellTestAnalysisWell test interpretation (PBU, drawdown, IPR)
Beep.OilandGas.GasLiftGas lift design, valve spacing, and optimization
Beep.OilandGas.SuckerRodPumpingSRP design, rod string analysis, pump diagnostics
Beep.OilandGas.PlungerLiftPlunger lift modeling and cycle optimization
Beep.OilandGas.PumpPerformancePump performance curves and evaluation
Beep.OilandGas.HydraulicPumpsHydraulic pumping system analysis
Beep.OilandGas.PipelineAnalysisPipeline hydraulics, pressure drop, and flow assurance
Beep.OilandGas.CompressorAnalysisCompressor performance and sizing
Beep.OilandGas.ChokeAnalysisChoke performance and critical flow
Beep.OilandGas.FlashCalculationsPVT phase behavior and flash calculations
Beep.OilandGas.GasPropertiesGas property correlations and calculations
Beep.OilandGas.OilPropertiesOil property correlations (black oil, volatile)
Beep.OilandGas.EnhancedRecoveryEOR methods — waterflood, gas injection, chemical
Beep.OilandGas.DrawingWell schematic and diagram rendering
Beep.OilandGas.HeatMapHeat map visualization for reservoir and production data

Key Principles

Single Database

All lifecycle data (Exploration → Development → Production → Decommissioning) stored in a unified PPDM39 schema.

Field-Scoped Operations

All business operations scoped to a current field via IFieldOrchestrator.

Metadata-Driven Data Access

PPDMGenericRepository uses IPPDMMetadataRepository for table discovery and AppFilter for database-agnostic queries.

No Mock Data

Every page loads from live API endpoints. No hardcoded lists or TODO stubs.

Data Access Pattern

Canonical CRUD Operations

// Get metadata and entity type
var metadata = await _metadata.GetTableMetadataAsync("TABLE_NAME");
var entityType = Type.GetType($"Beep.OilandGas.PPDM39.Models.{metadata.EntityTypeName}");

// Create repository
var repo = new PPDMGenericRepository(
    _editor, _commonColumnHandler, _defaults, _metadata,
    entityType, _connectionName, "TABLE_NAME");

// Build filters using AppFilter (database-agnostic)
var filters = new List<AppFilter>
{
    new AppFilter { FieldName = "FIELD_ID", Operator = "=", FilterValue = fieldId },
    new AppFilter { FieldName = "ACTIVE_IND", Operator = "=", FilterValue = "Y" }
};

// Execute
var entities = await repo.GetAsync(filters);        // Query
var single = await repo.GetByIdAsync(id);           // Get by ID
await repo.InsertAsync(entity, userId);             // Insert
await repo.UpdateAsync(entity, userId);             // Update
await repo.SoftDeleteAsync(id, userId);             // Soft delete

Service Registration

Factory Pattern in Program.cs

builder.Services.AddScoped<IMyService>(sp =>
{
    var editor = sp.GetRequiredService<IDMEEditor>();
    var commonColumnHandler = sp.GetRequiredService<ICommonColumnHandler>();
    var defaults = sp.GetRequiredService<IPPDM39DefaultsRepository>();
    var metadata = sp.GetRequiredService<IPPDMMetadataRepository>();
    var logger = sp.GetRequiredService<ILoggerFactory>().CreateLogger<MyService>();
    
    return new MyService(editor, commonColumnHandler, defaults, metadata, connectionName, logger);
});

Registration order matters: AddBeepServices → metadata/defaults → domain services.

Controller Pattern

Field-Scoped API Endpoints

[ApiController]
[Route("api/field/current")]
[Authorize]
public class MyController : ControllerBase
{
    private readonly IFieldOrchestrator _fieldOrchestrator;
    private readonly IMyService _service;
    
    [HttpGet("{id}")]
    public async Task<ActionResult<MyDto>> GetAsync(string id)
    {
        var fieldId = _fieldOrchestrator.CurrentFieldId;
        var result = await _service.GetByIdAsync(fieldId, id);
        return Ok(result);
    }
}

Quick Start

Build

dotnet build Beep.OilandGas.sln

Run API

dotnet run --project Beep.OilandGas.ApiService

Run Web

dotnet run --project Beep.OilandGas.Web

Swagger UI: http://localhost:5000/swagger

UI/UX Conventions

MudBlazor

Components use Color.* enum — no hardcoded colors. Consistent theme across all pages.

Dark Mode

Full dark mode support via theme CSS variables and MudBlazor theme provider.

SVG Icons

SVG icons only for all new assets. No PNG/JPG usage for icons or navigation elements.

Engineer Workflows

Business process pages follow engineer workflows, not CRUD: Dashboard → Exploration → Development → Production → Reservoir → Economics → HSE → Data Management.

Source Layout

AreaPathRole
API ServiceBeep.OilandGas.ApiService/REST API, controllers, DI, JWT auth
Web UIBeep.OilandGas.Web/Blazor Server pages, MudBlazor components
PPDM 3.9 CoreBeep.OilandGas.PPDM39/Data models, interfaces, DTOs
PPDM Data MgmtBeep.OilandGas.PPDM39.DataManagement/Services, validation, seed data
LifecycleBeep.OilandGas.LifeCycle/Field orchestrator, exploration coordination
Domain ProjectsBeep.OilandGas.{Domain}/13 oil & gas lifecycle domain projects
Engineering ToolsBeep.OilandGas.{Tool}/15 analysis & engineering tools
InfrastructureBeep.OilandGas.Client/, DataManager/, UserManagement/HTTP client, data utilities, identity
Database ScriptsBeep.OilandGas.Models/Scripts/SQL scripts per dialect (SQL Server, PostgreSQL, SQLite, Oracle, MySQL, MariaDB)
Documentationhelp/HTML help (this folder)