One of our clients managed a supply chain spanning 47 suppliers, 12 warehouses, and tens of thousands of SKUs. Planning and reporting were entirely manual — a weekly Excel export followed by hours spent reconciling data.

Our task: automate, accelerate, give managers real-time data access. We chose Java 21 + Spring Boot 3.2 as the backend — a proven stack for enterprise-grade systems.

The system grew to over 300 REST endpoints. Each module — procurement, warehousing, delivery, forecasting — had its own API. Integration with the client’s ERP required handling six different data formats.

The key innovation was the Text2SQL module. Managers could type questions in natural language: “How many units of product X were ordered from supplier Y last quarter?” — the system translated this into SQL and returned the answer in seconds. We built it on a language model fine-tuned on the client’s database schema.

The second AI component is RAG (Retrieval-Augmented Generation) for documentation. The system had access to hundreds of supplier contracts, product specifications, and internal procedures. Staff could ask questions about specific contract terms — e.g. “What is the warranty period for refrigerated products from supplier Z?” — and receive precise answers with the exact source document quoted.

Results after 6 months: weekly report preparation time dropped from 8 hours to 20 minutes. Order error rate fell by 34%. Managers have real-time dashboard access instead of a weekly snapshot.

Want to learn more about how we build enterprise systems with AI? Reach out: development@mi-code.pl

Frequently asked questions

How large was the supply chain that was automated?
The client managed a supply chain spanning 47 suppliers, 12 warehouses, and tens of thousands of SKUs. Planning and reporting were entirely manual — a weekly Excel export followed by hours spent reconciling data.
What technology stack was used to build the backend?
The backend was built on Java 21 and Spring Boot 3.2, a proven stack for enterprise-grade systems. The system grew to over 300 REST endpoints, and integrating with the client's ERP required handling six different data formats.
What is the Text2SQL module and how does it work?
The Text2SQL module lets managers type questions in natural language, such as how many units of a product were ordered from a supplier last quarter, and the system translates them into SQL and returns the answer in seconds. It was built on a language model fine-tuned on the client's database schema.
What does the RAG component do in this system?
The RAG component gives staff access to hundreds of supplier contracts, product specifications, and internal procedures, so they can ask questions about specific contract terms. The system returns precise answers with the exact source document quoted.
What results did the system deliver after 6 months?
After 6 months, weekly report preparation time dropped from 8 hours to 20 minutes and the order error rate fell by 34%. Managers gained real-time dashboard access instead of a weekly snapshot.