We helped Matsmart/Motatos modernise their legacy platform and enable a small team to deliver above its weight class with an agentic AI way of working — the service architecture redesigned and the migration run in parallel with operations, with no single cutover date.
Background
Matsmart/Motatos has a mission to reduce food waste by buying in and reselling surplus stock, seasonal goods, products with print errors and other leftover food. During the engagement the e-commerce ran in six European countries, with Sweden at 5,000–8,000 orders per day and significant round-the-clock traffic on the other markets. The platform sits at the centre of the operation: ERP sync, purchasing and supplier data, order handling, stock levels, real-time integration with warehousing, shipping and product data for every SKU. Earlier decisions that were once right — a custom-built framework, hand-maintained services, faulty integrations — had started to slow the team down.
The challenge
The solution space was narrow: operations could not be paused, a big-bang rewrite was impossible for a team of this size, and continuing to patch the in-house framework would have compounded the debt. What replaced it had to come piece by piece, with no single cutover day, while the team kept delivering against internal demand.
What we did
Robert Krogh from SCG came in as architect and developer to lead the shift. A lightweight architecture showed how individual services could live outside the in-house framework, still be part of the whole, and require minimal setup. We moved from code-first to infrastructure-first so the services became fully decoupled. Messaging flows went from targeted RabbitMQ flows to managed Azure Service Bus. In parallel the team migrated from Azure DevOps to GitHub, which opened the door to redoing CI/CD and IaC in the same spirit.
Agentic AI for a small team on a large system
We laid the groundwork for team-scaled AI use where the gains spread beyond the individual. By making context explicit in the monorepo, agents could work with a broader picture than earlier ways of working allowed. A custom skill pulls pipeline data via the GitHub CLI and shows, in a prompt, what is deployed where, per service. Skills like this live in the repo, versioned together with the code — one developer's improved way of working becomes the team's.
Result
The new architecture let the team build leaner services, maintain less code, and deploy with fewer steps. Data flows could be migrated in parallel with the old solution, at the team's pace, following a safe plan. The documentation became broad and current — for both humans and AI. Through AI-maintained documentation, tooling and the ability to explore live environments from IaC and pipelines (without data or sensitive info), the team moved into a more agentic way of working, and could do meaningfully more with less.
Adaptive reuse
In architecture, *adaptive reuse* is the craft of giving an existing building a new function and modern systems while preserving the structure and character worth keeping. The Matsmart/Motatos platform got the same treatment. The domain logic, the integrations the business depends on, the flows in motion: all kept. Alongside them, modern counterparts were built — managed messaging next to the self-hosted bus, clean pipelines next to the hand-maintained ones, lightweight services next to the in-house framework. New and old ran in parallel, each new part earning its place before the old one stepped aside.
Matsmart/Motatos fights waste for a living. Stockholm Code Group helped them cut it from their platform too: less code, less infra to operate, less stale documentation, less friction between an idea and a deploy.