Jinja + JavaScript
Workflow pages, filters, tables, and chart rendering.
An auditable analytics product that transforms monthly AI inference billing workbooks into supplier-level profit and margin insights.

Monthly AI inference billing arrives as multiple workbooks. Revenue, model-specific costs, exchange settings, supplier payments, and weekly incentives do not share one reliable analytical surface. The product turns those fragmented inputs into a traceable sequence so an analyst can inspect both the final answer and the evidence behind it.
Workbooks enter independent staging batches. The analyst can review automatic field mapping, correct ambiguous headers, inspect valid, fallback, warning, and rejected rows, then confirm or cancel the import. Pricing and supplier incentives are configured only after the durable usage data is ready.




Usage is grouped first by month, week segment, supplier, model, and input-size bucket. Revenue and partner payment are calculated there before results roll up. This avoids silently applying a blended price to models and token buckets with different economics.
gross_profit = customer_revenue − partner_total_paymentGross margin is calculated only when revenue is present and non-zero. The browser visualizes results; it does not recalculate them.
The latest non-stale completed run can be filtered by month, week segment, or supplier. Totals reconcile with the supplier table, while comparisons reveal where partner payments overtake customer revenue.



Flask coordinates the multi-page workflow and server-side rules. SQLite stores staged imports, confirmed usage, configuration, immutable runs, and reconciled results. Jinja and JavaScript present those results, while Chart.js is limited to visualization.
Workflow pages, filters, tables, and chart rendering.
Validation, dependency guards, aggregation, and dashboard APIs.
Staging · confirmed usage · inputs · runs · results · quality.
Bad workbook data never enters durable records before review.
Inconsistent source headers remain visible and correctable.
Completed results stay reproducible after later input changes.
Supplier incentives never leak across calendar months.
Missing or zero revenue is not misrepresented as 0%.
The workflow returns users to the earliest incomplete input.
The prototype is intentionally local-first: it can process financial workbooks without requiring a separate database service, and each completed run remains reproducible. A hosted production version would add authentication, role-based access, durable object storage, automated tests, observability, and controlled result sharing.
Watch product demo ↗