Case study
NYS
An AI-native retail ERP for a network of eyewear stores, from stock to till, with a copilot that answers in French.


- Year
- 2026
- Services
- Technologies
- Next.js, React, TypeScript, Express, oRPC, Zod, PostgreSQL, Prisma, BullMQ, Redis, MinIO, Claude (Anthropic), Playwright
01 / Context
Overview
NYS Collection is a Moroccan eyewear brand, sold through a network of more than ten stores and online. The project started with an audit of the existing setup and a decision document, then we designed and built an AI-native retail ERP, module by module. It covers stock, transfers, counts, the till, selling rules and invoicing, and its copilot answers in French within each user's permissions, so a seller never gets what management sees.
02 / Starting point
What the project had to solve
The same frame moves between the warehouse and the stores, so every movement has to stay traceable down to the piece. The system therefore had to give exact stock figures, credit every sale to its seller even when two sellers share one till, and take on an extra store through configuration alone. Management also wanted to query its data in French, directly in the tool.
03 / Scope
Scope
We designed and built the whole system, from the back office and the store till to the background jobs and the AI copilot. It covers the catalogue and its variants, receiving by lot, barcode labels, transfers, losses and repairs, stock counts, the till and its receipts, selling rules and invoicing. A store is just a row in the data, so opening one more needs no new installation.
04 / Decisions
Decisions
Stock rests on a single ledger where every movement is added and never edited or deleted, and the database itself enforces that, not just the code. A mistake is therefore fixed with a reversing movement, and displayed stock can be rebuilt from the ledger at any time. Every piece keeps the lot it came from, amounts are stored in centimes, and permissions are checked on the server, by role and by store. When the AI reads a bank statement, it only transcribes the lines, because the arithmetic stays in the code and never in the model.
05 / Build
What we built
In the store, sellers sign in on the shared till with a personal code, and every sale line is credited to them. Voiding a sale, on the other hand, takes a manager's code. Receipts print on the till printer and labels carry a GS1 barcode. Transfers are scanned on dispatch and on arrival, and any gap stays open until it is dealt with. A stock count only touches stock after an approved reconciliation. Each role has its own dashboard, and the copilot flags stock-outs with the action to take, then sends a weekly scorecard for the network and for each store.
06 / Technology and integration
Technology and integration
The interface is built with Next.js and React, and the server with Express, with an API typed end to end through oRPC and validated with Zod. Data sits in PostgreSQL with Prisma, background jobs run on a BullMQ queue with Redis, and files sit in MinIO object storage. The copilot runs on Anthropic's Claude platform and goes through the same services as the back office, so its tools stay limited to the user's role and store. Every call is logged, and its write tools only produce drafts. The system's invariants, such as stock always equalling the sum of the ledger, are checked by automated tests that gate every release.
07 / Expected results
The expected results
Each store's stock is rebuilt from a ledger that nobody can edit.
Every sale is credited to its seller, and transfer or count gaps stay visible until they are dealt with.
Management queries its data in French, and the copilot shows each person only what their permissions allow.
Every week, a scorecard for the network and each store arrives unasked, with the stock-outs to deal with.
Related pages
Let's discuss your priorities
A comparable project in mind?
Tell us about your context, and we'll tell you how we would approach it.
