03

Water delivery, end to end

Company operations platform · architecture, monorepo, bots, 1C integration

A delivery company with a long history. Orders lived in a notebook and phone calls. Now it is a platform: customers order through the site or a Telegram bot, dispatch builds routes, drivers run their deliveries from a phone, and stock and counterparties sync with the 1C sitting in the client's office.

How it worked before

Orders were taken by hand and passed to drivers over a messenger. Where the water was, and whether it had arrived, was known only by calling the driver. The books lived separately and were reconciled by hand at the end of the day.

What made it hard

The client's 1C is unreachable from the internet, and doing without it is not an option: the accounting lives there. On top of that, five applications — site, worker, two bots and a connector — have to be one product while holding different rights to the data.

Engineering decisions

  1. 01

    A local agent instead of a tunnel into someone's network

    The connector runs inside the client's network, calls 1C over OData itself and initiates the exchange itself — not one port is opened outward.

  2. 02

    The database boundary is held by a test, not an agreement

    A CI guard fails if a bot or the connector imports the database client: they reach the platform over signed HTTP. Direct database access belongs to the web app and the worker only.

  3. 03

    Queues instead of synchronous integrations

    The 1C exchange and the notifications are retryable jobs, not a request that can hang the checkout.

  4. 04

    Installed on a phone without an app store

    A PWA with a service worker and push: the driver has an app on the home screen, and updates arrive by deploy rather than by store review.

Documentation as part of delivery

22 documents: architecture, schema, roles, API, user flows, operations, staging, diagnostics — and a separate set for 1C: the integration contract, a discovery checklist, a playbook for the call with their programmer, a rollout runbook.

Where it stands

The platform runs in production on live traffic: orders, routes, bots and notifications. The 1C exchange has passed discovery and its integration contract and is in final validation.

Order
from the site or a Telegram bot
Platform
web and worker — the only ones touching the database
Database
orders, routes, statuses
Driver
route and statuses from a phone
Queues
exchange and notifications as retryable jobs
Push to the app
a PWA, no app store
Connector inside the client's network
initiates the connection itself
1C in the office
OData inside the perimeter
Five applications, but only two reach the database. The bots and the connector talk to the platform over signed HTTP, and the connector initiates the link from inside the client's network — so its perimeter stays closed.

Got something like this?

Get in touch