@companyio/fuel
v0.1.5
Published
Fuel station operations for CompanyIO. Meter sales and tanker receipts stay here. Commercial invoices stay in Sales.
Readme
@companyio/fuel
Fuel station operations vertical for CompanyIO.
Fuel owns physical station behavior (tanks, pumps, nozzles, meter/dip readings, business days, physical sales/receipts, tank transfers, cash counts).
Fuel does not own product master data, selling prices, purchase costs, invoices, bills, payments, expenses, payroll, notifications, or the financial ledger.
Ownership
| Concern | Owner |
| ------------------------------------ | -------------------------------------------------- |
| Product / SKU / unit / selling price | @companyio/catalog |
| Branch fuel product link | FuelProductConfig (this package) |
| Purchase costs / supplier bills | @companyio/purchasing |
| Financial sales invoices / AR | @companyio/sales |
| Money movement | @companyio/payments |
| Expenses | @companyio/expenses |
| GL / journals | @companyio/accounting |
| Parties (incl. suppliers) | @companyio/contacts |
| Staff | @companyio/hr |
| Audit / notifications | @companyio/auditlog / @companyio/notifications |
Fuel HTTP surface (/api/v1/fuel)
| Domain | Routes |
| ------------------------- | --------------------------------------------------------------------------- |
| Stations | GET/POST /stations, PATCH /stations/:id |
| Fuel types / config | GET/POST /types, PATCH /types/:id |
| Tanks / pumps / nozzles | GET /stations/:branchId/assets, POST/PATCH /tanks, /pumps, /nozzles |
| Meter sales | /meter-sales, /days/... opening |
| Credit sales | POST /credit-sales |
| Fuel customers / vehicles | /customers, /vehicles, /customers/:id/ledger |
| Tanker receiving | /receiving, /receipts |
| Cash reconciliation | /cash-counts, /cash-recon |
| Stock reconciliation | /stock-recon |
| Day closing | /closing, /days |
| Denominations | /denominations |
Suppliers → /api/v1/contacts/suppliers. Payments, expenses, reports, PnL, audit → their packages — not Fuel.
Core models
FuelProductConfig, Tank, Pump, Nozzle, FuelSale/FuelSaleLine, FuelReceipt/FuelReceiptLine, FuelStockMovement, TankTransfer, DipReading, FuelMeterReading, BusinessDay (+ meter/tank snapshots), CashDenomination, CashCount/CashCountLine, Vehicle.
Organization: Business → Branch (branchId). UI may still say “Station”.
Prisma
This package ships prisma/fuel.prisma + 0001_fuel_baseline. The host (apps/api) owns DATABASE_URL, client generation, and migrate deploy.
fuel init
# then host: prisma migrate deploy