Vector Driver
A native app for owner-operator hauliers on iPhone, iPad and Mac. Trips, fuel, costs and Italian e-invoicing, with no server to maintain.
- What
- iOS and Mac app
- When
- August 2026 to November 2026
- Stack
- Swift, SwiftUI, SwiftData, CloudKit, StoreKit 2, App Intents, Vision
- Live
- Visit the site
- App Store
- Get the driver app

/// In forfettario l'imposta di bollo da 2 € è dovuta sopra i 77,47 € di
/// imponibile, perché l'operazione è fuori campo IVA.
static func bolloDovuto(imponibile: Double, profilo: Profilo) -> Double {
guard profilo.forfettario, imponibile > 77.47 else { return 0 }
return 2
}
The problem
Vector serves companies with a fleet and a dispatcher. It is far too much for the person it is nominally about: the padroncino, one driver, one or two vehicles, and all the administration that comes with being your own back office.
They do not need a planning grid for six drivers. They need to know whether last month made money, and to get an invoice to the tax authority without buying a subscription to something built for a company ten times their size.
What I built
A single multiplatform SwiftUI target running on iPhone, iPad and Mac (iOS 18 and macOS 15), backed by SwiftData and syncing through the driver’s own private iCloud database. No server, no account, no backend to keep alive.
- Today: the day’s and the next seven days’ trips, the month’s KPIs, and whatever is about to expire or still unbilled
- Trips: route, client, kilometres, rate and status, grouped by month with €/km yield per row
- Fuel: fill-ups with odometer and a photo of the receipt, which the app reads with on-device OCR to pre-fill litres, price, total and date; real consumption in km/l from consecutive full tanks
- Vehicles, maintenance and deadlines: servicing by date or by kilometres, insurance, inspection, CQC, medical and licence renewals, with local notifications and recurring entries that reopen themselves
- Invoices and clients: completed unbilled trips become an invoice in one gesture, and from there the FatturaPA XML for the SdI and a PDF for the client
- Analysis: period P&L, per-kilometre indicators, break-even point, and an estimate of what to set aside for tax and contributions
It also works without opening it. Siri and the Shortcuts app get “new trip”, “new fill-up” and “new cost” actions, and an App Intent can log the start of a trip on its own, so a personal automation fires it when the phone connects to the truck’s Bluetooth or CarPlay.
Every list exports to CSV that opens correctly in Italian Excel, and the whole archive round-trips as a single JSON backup.
Notes on the hard part
Electronic invoicing. Since 2024 every B2B invoice in Italy goes through the SdI as FatturaPA XML, flat-rate regime included. The app generates v1.2.2 from the profile, client and linked trips, and each detail line is a trip (route, date, kilometres, rate), which is exactly what general-purpose invoicing tools cannot express.
The interesting problems were the unglamorous ones. The SdI rejects incomplete
files and you find out days later, so the emission screen lists what is
missing field by field before it will generate anything. Text has to be
transliterated to Latin-1 for the schema, so the arrow in a route becomes ->
while Italian accents survive. The tax regime drives the rest: RF01 with VAT
shown, or RF19 with nature code N2.2 and the €2 virtual stamp above a
€77.47 taxable amount. And if someone edits the taxable amount away from the
linked trips, the difference appears as an explicit adjustment line rather than
being silently spread across the others.
Refusing to show wrong numbers. Fuel consumption needs two full tanks to mean anything, so with one it shows nothing rather than a bad figure. The OCR leaves a field empty when it isn’t sure, for the same reason. Only completed trips count as revenue; scheduled work is promised money, shown separately, so the P&L is not a forecast wearing a result’s clothes. A €3,600 annual insurance premium is amortised at €300 a month and pro-rated across the months the contract covers. Break-even is hidden outright when the variable margin is zero or negative, instead of printing infinity.
The trial. The first week is the complete app: no account, no purchase, no App Store trial to cancel. Day counting is pure logic held in the keychain, so reinstalling does not grant another week and moving the clock backwards does not extend one. The single thing the demo withholds is generating the SdI XML, because a file sent to the tax authority cannot be recalled.
After the week the app sits behind a StoreKit 2 paywall, but backup export stays reachable from the paywall itself. A sole trader’s invoices should not become hostage to a renewal.
Notes
Version 1.1.4, on the App Store, with its own site at vectordriver.lucaporta.dev. About 10,000 lines of Swift across 62 files, with 86 unit tests (invoicing, accounting, consumption, backup, the trial, the subscription catalogue) run by GitHub Actions on every pull request. The repository is private. Happy to demo it or walk through the FatturaPA generator on request.
