Scoperly
One platform for a distributor’s whole working day: sales, stock across warehouses, delivery runs, debts and cash, plus a storefront and a marketplace for their customers.
Live
- What it is
- Our own product, live
- Portals
- Buyers, suppliers, administration, partners, developers
- Interface
- 10 languages
- Runs on
- Google Cloud
Screens of a demo company. The data is invented.
The task
A distributor sells to shops, restaurants and procurement teams, and every sale moves stock, a delivery, a debt or cash. The task was to put the selling and all of that work into one system, and to give the customers one place to see the catalog and order.
What we built
-
Stock across warehouses and vans
On-hand stock per warehouse and per van, reservations for orders, purchases, returns and counts. Every stock change goes through one service and locks its rows, so the totals add up.
-
Debts and cash
Who owes how much and for how long, by document. Debts are a journal where entries are only added, with cash desks, expenses and profit reports next to them.
-
Delivery runs
Orders are grouped into a run for one vehicle. The load sheet adds up everything to put on board and prints as one file, with a page for each order.
-
Reports
Sales, margin, retention, money and goods movement, with one period across them all.
-
The Connect API
A public API for other systems: catalog, stock, orders and webhooks, an OpenAPI contract and documentation for developers.
Everything it does
Catalog and orders
- A catalog and a storefront.
- Price lists, customer groups and discounts.
- Ordering.
- A marketplace.
Distributor operations
- Sales and returns.
- Stock across several warehouses.
- Van sales and direct sales.
- Delivery runs with a loading sheet.
Money and documents
- Customer debts on an append-only ledger.
- Cash desks and expenses.
- Reports.
- Printed documents (PDF) and exports.
Platform
- Portals for buyers, suppliers, administration, partners and developers.
- An interface in 10 languages.
- Subscriptions through a merchant of record (Paddle).
- The Connect API, with public documentation for developers.
- An AI assistant that works with the customer’s own key, built in; the keys are encrypted with AES-256-GCM.
How it is put together
Parts
- Portals: Buyers, Suppliers, Administration, Partners, Developers
- API
- Data: PostgreSQL, Redis, Object storage
- External services: Payments, Email, Bot protection
- Connect API
- Other systems
- Scoperly Studio
Connections
- The five portals work through the API.
- The API keeps its data in PostgreSQL.
- The API uses Redis.
- The API keeps files in object storage.
- The API works with an external payment service for subscriptions.
- The API sends email through an external email service.
- The API uses an external bot protection service.
- The Connect API is the platform’s API for other systems.
- Other systems exchange data with the platform through the Connect API.
- Scoperly Studio syncs with the platform through the Connect API.
Engineering decisions
-
One writer for stock
All on-hand changes go through a single service, and the total always equals the sum of the warehouses.
-
Row locks where money and stock move
Checkout, order transitions and credit balances take row locks, so two people cannot sell the same last box.
-
Journals that only grow
Debts and cash movements are never updated or deleted. A trigger in the database refuses it, and a correction is a reversing entry.
-
Isolation between companies
Every query is scoped to the company. All tenants share one global instance without seeing each other.
-
Keyset pagination
Long lists page by the last row seen, never by offset, so they stay fast as they grow.
-
Customers’ AI keys, encrypted
The assistant works with the customer’s own provider key, stored encrypted with AES-256-GCM.
Technologies
PostgreSQL with versioned migrations. It runs on Google Cloud: a virtual machine with containers, a managed database, object storage, a load balancer and WAF rules.
By direction
- AI and machine learning An AI assistant that works with the customer’s own key, built into the platform; the keys are encrypted with AES-256-GCM.
- Web platforms A multi-tenant platform: several portals, an interface in 10 languages, subscriptions.
- Security An audit and its fixes, rate limiting, firewall rules, bot protection, tenant isolation.
- Data and databases Versioned schema migrations, keyset pagination, row locks for stock operations.
- DevOps and cloud Production on Google Cloud: a virtual machine with containers, a managed database, a load balancer; CI/CD.
- Integrations and automation The Scoperly Connect API, with public documentation for developers.
The other product
Scoperly Studio
A desktop business system for distributors: an office server and desktop clients for Windows.
How it is built : Scoperly StudioTell us about your task
A few lines are enough. We will read them and reply with our questions.