Project · build
Inbound Outbound
A multi-tenant SaaS for booking vehicles into a warehouse and calling them to a dock, built on Cloudflare in three days as a test of building real full-stack cloud applications.
build complete cloudflare typescript saas logistics
- Status
- active
- Started
- 2026-11-14
Inbound Outbound schedules vehicles in and out of a warehouse or goods receiving dock for many companies at once. It is a play project: I wanted to find out whether I could build a full-stack application in the cloud, from the scheduling rules to the infrastructure and what it costs, and finish it. It runs at io.id.au. The demo button creates a private organisation with a working day in progress and deletes it after 24 hours.
The subject comes from my own work. My interest started at Qantas Catering, where deliveries arrived all day, every day, and we had no decent method of scheduling them. Covid-19 displaced me from aviation catering, and I moved into distribution centres. There I had to build my own processes and systems, and all of it ran in Microsoft Excel on exports from SAP. In that position again, I would build this.
I built it between 14 and 16 November 2026 with Claude Code. I set the requirements, made the design decisions and reviewed the results.
What it does
Planning
- Sites and spaces. An organisation has any number of sites. Six templates set one up: distribution centre, small warehouse, store, supermarket, loading zone and mailroom counter. Each sets the hours, slot length, geofence radius and rules.
- Bookings and slots. A slot grid per site. A booking is placed only on a space that fits the truck’s direction, load class, truck class, size and equipment, and is free for the whole duration. See Which truck gets the dock.
- Orders. Purchase and sales orders arrive from an ERP, and a booking made against one names each pallet after the product on it.
- Carrier portal. A carrier books and moves its own slots and sees only its own bookings.
The gate
- Five ways to check in. The gate screen, a kiosk, the driver’s phone link, the GPS geofence and a plate camera each put a truck in the queue.
- Gatehouse. The gate officer looks a truck up by plate, booking reference or mobile number, reads its issues, then admits it, holds it or turns it away. An exit check runs on the way out.
- Driver rules. A site can require an induction and add penalty points for no-shows, late arrivals and rejected loads. A driver at the limit is blocked.
- Licence checks. The gate records the result of a licence check for any Australian state. No licence number is stored.
- Lobby display and kiosk. Screens for a wall and a tablet that show who is called and where to go.
The dock
- The queue. Waiting trucks are ranked by a weighted score with every contribution listed, and called to the space that fits and is free soonest. A site can call automatically.
- The dock cycle. A visit moves through nine statuses from waiting to departed. Each step belongs to the role that does it, and the screen says what is blocking the next one.
- Checks. The dock clerk checks paperwork, seal and temperature, then accepts or rejects the load. With blind checking on, the clerk enters the seal number without seeing the recorded one.
- Receiving. A forklift terminal counts each pallet as received, damaged or missing, by tap or by scanning the pallet label. See Receiving a pallet from its label.
- Compliance records. Temperature logs, halal, organic and kosher certificates with expiry dates, dangerous goods documents, import and biosecurity papers and bonded-store declarations, per visit. A failed record raises an alert.
Tracking
- GPS. The driver page shares position while it is open. Trucks on the road appear on the Tracking page with distance and expected arrival.
- Telematics. Geotab and Samsara connectors supply positions for fleets that have them.
Figures
- Timing insights. A nightly job reports slow drivers, pairs, docks and drift. See A planted finding that showed up on four days out of seven.
- Timing privacy. Capture of figures about people is off by default. Operators are recorded by name only after a notice period, and each operator sees their own timings.
- Reports. Charts, a carrier scorecard and nine reports that download as CSV or PDF.
Integration and administration
- Connectors. Twelve adapters: SAP S/4HANA, NetSuite, Dynamics 365, Odoo, EDI X12, UN/EDIFACT, CSV, a WMS adapter, a REST adapter, Geotab, Samsara and a sandbox.
- Events. Every change is written to an audit log, appears on open screens within a second or two and can be sent to another system.
- API. Another system can do everything the screens do.
- Roles. Eight roles, from owner to read only. Each person sees the screens their role uses.
- Sign-in. Passwords, or company single sign-on with Microsoft Entra, Google, Okta, Auth0 and Keycloak. See Single sign-on, and the test that read my SQL.
- Installable app. The web app installs to a phone or tablet home screen.
How it is built
It runs on Cloudflare: a Worker for the API, D1 for the database, a Durable Object for live updates and Queues for background jobs. The app is React on the Jupiter design system (design), and the documentation is written with docs. It has about 15,000 lines of TypeScript and 992 passing tests. See Counting D1 rows before the bill for what it costs to run.
What has not been tested
- The connectors run against recorded fixtures, not live tenants.
- The ESP32 card reader firmware, camera scanning and NFC have not run on a device.
- Single sign-on runs against a stand-in provider.
- The three plate camera formats are tested against fixtures, not cameras.
- The PDF compiler, tectonic-pdf-service, compiled a report with Tectonic locally. Its container image has not been built or deployed.
- Cost figures are estimates from the code, not measured on a deployed Worker.