Feed-point sales with costs the staff cannot see
Owners see cost and profit; hired sellers see only what they need to sell. Both work offline.
- Yemchi
- Agriculture, year 2026
- Status
- Backend in production; distributed as a Telegram Mini App
- roles with separated visibility
- 2
- roles with separated visibility
- of the day works offline
- 100%
- of the day works offline
Problem
A feed seller with several points needed stock, cost and debt tracking — but hired sellers must not see purchase costs or profit, and the points have unreliable internet.
What we did
- Split the app by role at the token level: sellers get masked costs, read-only stock and no reports — enforced by the API, not the UI.
- Computed true weighted-average cost per product across arrivals, so profit is real, not estimated.
- Synced offline work with last-write-wins per record, so a day without internet reconciles cleanly in the evening.
Result
The owner sees profit per point and per product; sellers sell without seeing margins. Cash and credit sales, debts and stock stay correct through offline days.
Modules
- Warehouses and productsSeveral selling points under one account; ready catalogue in six categories; separate purchase and sale units.
- Sales and debtsCash or credit; profit frozen at sale time; partial payments against credit sales.
- Seller role, server-enforcedSeller resolved by phone from the owner's employee list; JWT claims restrict pushes, the server sets cost at sale, decrements stock idempotently and masks cost fields to zero.
- ReportsPeriod × warehouse: turnover, cost, profit, debts with payment capture, per-product breakdown.
- Telegram Mini AppIn-memory SQL + localStorage layer, native Back button, keyboard-aware tab bar.
Technology
React Native, Expo, SQLite, NestJS, PostgreSQL
All workFree call: 30 minutes and a written summary
We talk about your business. No obligation on your side.