Technical Deep Dive

The workflow engine
for energy operations.

Not another SaaS dashboard. A programmable pipeline that turns documents into structured data, applies your rules, and produces auditable outputs.

What it replaces

The tools you're currently stitching together

Gridline replaces the fragile workflows that energy operators rely on. No more duct-taped spreadsheets, no more copy-paste from PDFs, no more wondering if a statement went out. Instead, you get a deterministic pipeline that handles document ingestion, data extraction, rule application, and output generation — with full audit trails and the ability to rerun any step.

Spreadsheet Chaos → Declarative Rules
utility_bills_jan.xlsx
=#REF!156.23???
Sub A=#DIV/0!24.50
Sub B0MISSING
Formula reference broken
Division by zero error
Missing subscriber data
Manual reconciliation needed
Formulas break. Manual fixes every month.
Allocation Rules
allocate_by: "kwh_usage"
fallback: "even_split"
validate: required_fields
Rules validated
Allocation computed
Output generated
Audit trail logged
Deterministic, version-controlled, replayable
Manual Copy-Paste → Automated Extraction
utility_bill_dec.pdf
Account: 12345
Total kWh: 8,456
Amount Due: $1,234.56
Manual data entry
Typo risk high
No validation
5 min per document
Copy-paste into spreadsheet manually
Extracted Data
"account": "12345"
"kwh": 8456
"amount": 1234.56
"confidence": 0.98
Auto-extracted
Schema validated
98% confidence
0.3s processing
LLM extraction with confidence scores
Manual Doc Creation → Batch Generation
Creating invoice in Word...
1. Open template doc
2. Fill in subscriber name
3. Calculate credits manually
4. Export to PDF
5. Attach to email
30 min per invoice
Version confusion
Calculation errors
No tracking
30 min per invoice, error-prone
Generated Artifacts
statement_sub_123.pdf 0.8s
invoice_inv_456.pdf 0.6s
email_delivered 1.2s
150 invoices/batch
Branded PDFs
Auto-delivered
Full audit trail
Batch generation, all subscribers, one click

How it works

Connectors → Workflow Engine → Templates → Data Model

CONNECTORS
G Google Sheets/Drive +
Email (SMTP) +
$ PayPal +
Storage (S3) +
🌐 Web Portals +
Read & Write Data
WORKFLOW ENGINE
Parse
Compute
Write
Generate
Invoice
TEMPLATES

Each use case is just a config + a few step functions, not a new app

Invoice Reminder
Metered Billing
Interconnection
DATA MODEL
Members
External Accounts
Runs
Run Steps
Artifacts
Invoices
Messages
...

The Pipeline

Six stages from document to delivery

These six primitives are the building blocks Gridline reuses for every workflow — billing, interconnection, financing, regulatory filings. Unlike typical document automation tools that use probabilistic ML models, Gridline combines hybrid NLP primitives: LLM-powered extraction with structured validation, rule-based computation with version control, and templated generation with full lineage tracking.

No other platform in energy operations combines deterministic extraction, declarative rule engines, and workflow-as-data in a single pipeline. This isn't RPA. This isn't generic ETL. It's purpose-built infrastructure for regulated industries handling financial documents.

01

Upload

PDF ingestion, file validation, S3 storage

bill.pdf
02

Parse

LLM extraction, schema validation, confidence scoring

parsed_data.json
03

Compute

Allocation rules, rate schedules, credit distribution

allocations.json
06

Deliver

Email dispatch, portal tokens, delivery confirmation

delivered: true
05

Invoice

PayPal sync, payment links, webhook handlers

invoice_id
04

Generate

PDF templating, statement rendering, branding

statement.pdf

Tech Stack

Production infrastructure, not prototypes

Frontend
Next.js 14, React Server Components, Tailwind
API
tRPC, Zod validation, Edge functions
Database
Supabase Postgres, Row-level security
Queue
Redis + BullMQ, dead letter queues
Storage
S3-compatible, signed URLs, encryption at rest
Workers
Render background jobs, auto-retry

Where We're Pushing

The unrefined edges. The things nobody else is building.

Deterministic Extraction

Shipped

LLM-powered PDF parsing with structured output validation. Not probabilistic guessing — deterministic field extraction with confidence scores and fallback rules.

The Edge:

Most document AI is black-box. We expose confidence scores, let you set thresholds, and provide human-in-the-loop for low-confidence extractions.

Workflow-as-Data

Shipped

Runs are first-class data objects, not ephemeral processes. Every step, artifact, and decision is queryable, replayable, and auditable.

The Edge:

Traditional ETL pipelines are fire-and-forget. We treat workflow execution as structured data you can inspect, debug, and replay.

Template Composition

Building

Each use case is just a config + step functions. New workflows are assembled from primitives, not built from scratch.

The Edge:

We're building towards a workflow DSL where operators can compose new automations without engineering support.

Provenance Graphs

Research

Every output artifact links back to its source documents and transformation steps. Full lineage for any data point.

The Edge:

When an auditor asks "where did this number come from?" — you can show the exact PDF page, extraction rule, and calculation.

Security

Built for regulated industries handling financial data

Data Isolation

Row-Level Security

Every database query filtered by tenant. No cross-customer data leakage possible at the query layer.

Access Control

Signed Portal Links

Time-limited, cryptographically signed URLs. Tokens expire, can be revoked, audit-logged.

Data Protection

Encryption at Rest

All artifacts encrypted with AES-256. Database encrypted. Backups encrypted. Keys rotated.

Compliance

Full Audit Trail

Every action logged with actor, timestamp, IP. Immutable audit log. Compliance-ready exports.

Input Security

Input Validation

Zod schemas on every endpoint. File type validation. Size limits. Sanitization.

Infrastructure

Network Security

TLS 1.3 everywhere. HSTS. CSP headers. Rate limiting. DDoS protection via Cloudflare.

Request Flow
Client
TLS 1.3
Edge (Cloudflare) DDoS, WAF, Rate Limit
Verified
API Layer Auth, Validation, RLS
Encrypted
Data Layer AES-256, Audit Log

Runs & Artifacts

Everything is data. Everything is replayable.

run_abc123 completed
subscriber: sub_456 period: 2024-12 duration: 18.2s
upload 0.8s
parse 4.2s
compute 0.3s
generate 2.1s
invoice 3.8s
deliver 7.0s
artifacts:
bill.pdf parsed.json statement.pdf invoice_id email_event

See it run.

No sales pitch. No signup. Just the product running on sample data.