Challenge¶
The client, a state-owned enterprise providing universal postal services to 10.5 million inhabitants of the Czech Republic, has been undergoing extensive transformation since 2023. With a 40% decline in traditional letter volumes over the past decade and a simultaneous 180% increase in parcel shipments (accelerated by the e-commerce boom), it became clear that the existing infrastructure and processes no longer met the demands of the modern logistics market.
The client’s sorting centers — key nodes in the distribution network — operated with a high proportion of manual processes. At the main sorting center in Prague-Malešice, which processes over 300,000 shipments daily, 60% of sorting operations were performed manually. Paper waybills, manual scanning, and the absence of real-time shipment visibility in the system led to an error rate of 3.2% and an average processing time of 4.7 hours per shipment.
Delivery routes were planned statically — each courier had a fixed district and route that changed at most seasonally. There was no dynamic optimization accounting for current shipment volumes, traffic conditions, delivery priorities, or vehicle capacity constraints. Average vehicle capacity utilization stood at just 61%.
The client issued a public tender for a comprehensive solution for sorting center automation and logistics optimization. CORE SYSTEMS won the tender and became the primary vendor of the platform named PostFlow.
Solution¶
CORE SYSTEMS designed the PostFlow platform as a modular system covering three main areas of the client’s operations:
Sorting Module (PostFlow Sort): Digitization and automation of processes in sorting centers. The system replaces paper waybills with electronic records, integrates with automatic sorting lines (sorters), and provides real-time visibility into the processing status of each shipment. A key component is the OCR/ML engine for automatic address recognition on shipments — including handwritten addresses, which account for 15% of volume.
Routing Module (PostFlow Route): Dynamic optimization of delivery routes based on current shipment volumes, geographic distribution of recipients, delivery time windows, vehicle capacity, and real-time traffic conditions. Every morning, the system generates optimal routes for 4,500 couriers across the Czech Republic and continuously updates them based on changes throughout the day.
Control Module (PostFlow Control): A central management dashboard for sorting center and logistics management — KPI monitoring, capacity planning, reporting for the regulator (ČTÚ), and analytics for strategic decision-making. The module includes shipment volume prediction based on historical data, seasonal patterns, and external factors (e-commerce events, public holidays).
Implementation proceeded in an agile fashion with two-week sprints, with a pilot deployment at the Prague-Malešice sorting center and a gradual rollout to 7 additional regional sorting centers.
Architecture¶
The PostFlow architecture is designed as an on-premise solution running in the client’s data centers (a requirement of the state enterprise for data sovereignty). The system is fully containerized and deployed on Docker Swarm clusters.
The application layer is built on a microservices architecture with a total of 24 services communicating via RabbitMQ (asynchronous messaging) and REST API (synchronous calls). The main services include:
- Ingestion Service — receives data from scanners, sorters, and scales on sorting lines via industrial protocols (OPC-UA, Modbus TCP) and converts them into standardized events.
- OCR Service — processes images of shipments from cameras on sorting lines. It uses a custom TensorFlow model trained on 2.3 million samples of Czech addresses (including handwritten ones) with a recognition accuracy of 96.8%.
- Routing Engine — implements a variant of the VRPTW (Vehicle Routing Problem with Time Windows) algorithm combining metaheuristics (adaptive large neighborhood search) with local search. For distance and travel time calculation, it uses OpenRouteService with a custom OSM data instance for the Czech Republic.
- Prediction Service — an LSTM model predicting daily shipment volumes for each sorting center with a 7-day horizon and MAPE accuracy of 8.3%.
- Tracking Service — real-time shipment tracking with an event sourcing architecture — every change in shipment status is recorded as an immutable event.
The data layer uses PostgreSQL 16 as the primary database with logical replication between sorting centers. Redis serves as a cache layer for session management, real-time shipment statuses, and geospatial indexes for nearest-branch lookups. The TimescaleDB extension stores telemetry data from sorting lines for performance monitoring and predictive maintenance of sorters.
The frontend is built on Angular 17 with a responsive design — the management dashboard for sorting center management runs on large-format screens in the dispatch room, while couriers use a mobile PWA application for navigation and delivery confirmation.
The integration layer connects PostFlow with the client’s existing systems — SAP ERP (billing, warehouses), APOST (postal operations system), a customer-facing Track & Trace portal, and systems of contractual partners (e-shops, marketplace platforms).
Monitoring of the entire platform is provided by a Prometheus + Grafana stack with alerting to an on-call rotation via PagerDuty.
Results¶
PostFlow was deployed in a pilot operation at the Prague-Malešice sorting center in March 2025 and into full operation across all 8 regional sorting centers in September 2025. Measurable results after the first full quarter of operation:
Sorting efficiency: Average processing time per shipment at sorting centers dropped from 4.7 hours to 2.9 hours (a 38% decrease). Automatic address recognition eliminated manual entry for 85% of shipments. The sorting error rate fell from 3.2% to 0.8%.
Route optimization: Dynamic route planning reduced the average distance driven per courier by 17%. This translated directly into fuel savings of CZK 12M annually. Average vehicle capacity utilization increased from 61% to 82%. The number of shipments delivered on the first attempt increased by 11% thanks to better delivery timing.
Visibility and tracking: 100% of shipments are now tracked in real time with an average of 8 scanning points per shipment (compared to the previous 3). Customers receive accurate information on estimated delivery time within ±30 minutes.
Digitization: 94% of internal sorting center processes were digitized — paper waybills, manual records, and printed delivery lists for couriers were replaced by electronic systems. Annual savings on printing and paper amount to CZK 2.1M.
Volume prediction: Accurate shipment volume prediction enables proactive capacity planning — sorting centers can adjust the number of shifts and temporary workers a day in advance based on expected load. During the 2025 Christmas peak, the system predicted daily volumes with a deviation of under 6%, and sorting centers handled the peak for the first time without extraordinary measures.
Regulatory reporting: Automated generation of reports for the Czech Telecommunication Office (ČTÚ) on compliance with universal service quality indicators — a previously manual process taking 3 person-days per month is now fully automated.
Technology¶
The PostFlow stack was selected with the requirements of the state enterprise in mind — preference for open-source, on-premise deployment, and long-term maintainability:
- Python (FastAPI) — backend microservices, ML pipeline, integration adapters
- Angular 17 — frontend application, management dashboards, courier PWA
- PostgreSQL 16 — primary database, logical replication between centers
- Redis — cache, session store, geospatial indexes, real-time statuses
- RabbitMQ — asynchronous messaging between microservices
- TensorFlow — OCR model for address recognition, LSTM volume prediction
- OpenRouteService — routing engine with a custom OSM instance for the Czech Republic
- Docker Swarm — container orchestration in an on-premise environment
- Prometheus + Grafana — monitoring, alerting, operational dashboards
- GitLab CI/CD — automated build, testing, and deployment pipeline
CORE SYSTEMS provides support and further development of the PostFlow platform under a four-year service contract. Planned extensions include integration with autonomous delivery robots for urban areas and the deployment of computer vision for automated damage inspection of shipments on sorting lines.