Back to Blog

Building PRI: Prospect Risk Intelligence, a Full-Stack Oil & Gas Platform

April 22, 2026 · Chris Pelatari
asp-net-core
vue
oil-gas
architecture

The Problem

Oil and gas exploration is expensive. Before a company drills, it evaluates dozens — sometimes hundreds — of geological prospects. Each prospect needs probabilistic analysis: what’s the chance of finding hydrocarbons? What’s the expected volume? What’s the net present value at various price assumptions?

Spreadsheets can’t handle this at scale. We needed a proper platform.

The Stack

We landed on ASP.NET Core 9 for the backend and Vue 3 with TypeScript for the frontend. A few reasons:

  • The geoscience team already had C# tooling for their calculations
  • ASP.NET Core’s minimal APIs are genuinely pleasant to work with now
  • Vue 3’s Composition API maps naturally to the domain objects (a Prospect composable, a Portfolio composable, etc.)

Monte Carlo at the Core

The heart of PRI — Prospect Risk Intelligence — is a Monte Carlo simulation engine. Each prospect has probabilistic inputs: porosity, net pay, area. Modeled as distributions (log-normal, triangular, uniform). We run 10,000 iterations per prospect, sampling each distribution independently.

public class MonteCarloEngine
{
    private readonly Random _rng;

    public SimulationResult Run(Prospect prospect, int iterations = 10_000)
    {
        var volumes = new double[iterations];
        for (int i = 0; i < iterations; i++)
        {
            volumes[i] = SampleVolume(prospect);
        }
        return new SimulationResult(volumes);
    }
}

On the frontend, we display the resulting distribution as a histogram using Chart.js, overlaid with P10/P50/P90 markers. Users can immediately see the risk profile.

Architecture Decisions

Separate read and write models. Prospects get created and edited through a command API, but the portfolio view aggregates across hundreds of prospects using a pre-computed read model. This keeps the portfolio view fast even when the underlying data is complex.

Optimistic UI updates. When a geoscientist tweaks an input parameter, they see the result immediately on the chart — the simulation runs client-side in a Web Worker while the server-side version catches up asynchronously. The results converge in under a second for most prospects.

Audit trail by default. In regulated industries, you need to know who changed what and when. We implemented event sourcing for all prospect mutations, giving us a complete history without any extra effort at the feature level.

What We’d Do Differently

The Monte Carlo engine could benefit from GPU acceleration via WebGPU for large portfolios. We also underestimated how much domain-specific validation logic there is — the “simple” rule that porosity can’t exceed 40% turns out to have seven exceptions depending on rock type.

Overall, Prospect Risk Intelligence is becoming the system of record for exploration decisions. Not bad for what started as “can we get this out of Excel?”