Logistics & Transport

Siyanie TC — Driver App

Siyanie TC — Driver App — 1

An architecture audit and full system design for digitalizing freight operations at TC Siyanie — a refrigerated logistics carrier running 300+ road trains across Russia and the CIS since 1998. The audit specified two products on a shared backend: an offline-first mobile app for long-haul drivers and a web panel for dispatchers, mechanics, and fleet managers.

1C:TMS Integration

The core challenge: the client's 1C:TMS is closed and exposes no external API. We designed an intermediate PostgreSQL buffer that 1C connects to over SSL. Realtime flows through a change_log + LISTEN/NOTIFY mechanism — the backend learns of 1C changes in ~10–50 ms — while 1C polls the same log for driver-side updates. No VPN, no Kafka or RabbitMQ required.

Offline-First Mobile

Drivers work in dead zones, so every action writes to local Capacitor SQLite first and syncs later through a FIFO queue. Background Fetch flushes the queue on reconnect; conflicts resolve server-wins with user notification. Aggressive preload pulls the active request, contacts, templates, and nearby POI on launch.

Status State Machine

A single «Next step» button drives a linear status flow (Accepted → En route → Arrived → Loading → Documents → Done), with non-standard states (breakdown, accident, rest, RED CODE) layered on top as a blocking overlay. Every transition is logged with actor, timestamp, and GPS.

RED CODE Emergency

A panic button with guaranteed delivery — priority retries on poor connectivity, instant broadcast with GPS to every dispatcher, and timed escalation at 0 / 5 / 15 minutes up to management and an automated callback.

Stack & Targets

FastAPI REST + WebSocket, PostgreSQL 16, Redis 7, Celery, Yandex Object Storage, FCM/APNs. Designed for API p95 < 500 ms, chat delivery < 2 s, up to 1 000 concurrent WebSocket connections, 99.5% uptime, and 3-year data retention.

Key Highlights

  • 1C without an API — intermediate DB + LISTEN/NOTIFY for ~10–50 ms realtime, polling back to 1C
  • Offline-first — Capacitor SQLite queue with background sync and server-wins resolution
  • RED CODE — guaranteed-delivery panic button with 0 / 5 / 15-minute escalation
  • Status overlay model — standard + non-standard statuses with a full audit trail
  • GPS tracking — 5-minute ping plus on every status change, auto-clears «Rest» above 50 km/h
  • Two apps, one backend — driver mobile app + dispatcher web panel on a shared UI library
  • Delivered — system design, technical spec, normalized 3NF database schema, integration spec, and a May–Aug 2026 roadmap