Inspiration
Small shopkeepers across Cameroon run their businesses on paper ledgers or memory — most have no real visibility into their actual profit margins, and inventory apps built for them assume a level of form-filling patience that doesn't match a real workday at the counter, mid-transaction, with a customer waiting.
StockDesk already provided inventory management, sales tracking, reporting, and multi-tenant business management. During OpenAI Build Week, we asked a simple question: what if managing inventory was as easy as talking to your assistant?
That idea became StockDesk Copilot — an AI agent that lets shopkeepers interact with their business using natural language instead of forms.
What it does
- "sold 3 crates Fanta to Ngwa for 1,500 francs" → records the sale immediately, no menus
- "how much profit today?" / "what's my best-selling product this week?" → owner-only, real answers pulled from live data
The agent is connected directly to StockDesk's existing backend and performs real actions that immediately update the dashboard, not a detached chatbot. It also respects StockDesk's existing permission system — workers can log sales through it, but can never access cost price or profit, regardless of how they phrase a request.
How we built it
Before the hackathon, StockDesk already included multi-tenant business registration, inventory management, sales tracking, worker invitations, role-based permissions, profit reporting, and Cloudflare Workers deployment.
During OpenAI Build Week, using Codex and GPT-5.6, we built two new agent flows on top of the existing backend:
- A natural-language sale-logging agent that parses free text into
structured sale items and routes them through the existing
create_sale_orderRPC — the same code path manual entry uses - An owner-only reports agent that answers natural-language business questions by querying the existing owner-scoped report views, with a deterministic fallback when no API key is configured
Both flows reuse the existing authorization layer instead of duplicating business logic, so the security model wasn't rebuilt — it was extended.
Challenges we ran into
- Enforcing the same cost-hiding rule through the agent as through the UI, regardless of how a request is phrased
- Reliably parsing natural-language quantities and prices into structured data
- Working within a tight build window meant prioritizing a fully correct core flow over covering every possible phrasing
- Getting a funded OpenAI API key in time to demo the full live experience, given payment access constraints — the reports flow's deterministic fallback became an important safety net
Accomplishments that we're proud of
- Built an AI interaction layer without rewriting an existing production system
- Preserved all existing security and permission rules while adding an entirely new interaction layer on top of them
What we learned
Building reliable AI systems is about far more than the language model itself — the hard part is connecting AI safely to real software while respecting permissions and existing infrastructure.
What's next for StockDesk Copilot
- Multi-language input — Pidgin and French, not just English
- Proactive alerts — the agent flagging low stock or unusual sales patterns on its own
- Offline-first command queuing for unstable connectivity
Built With
- cloudflare-workers
- codex
- gpt-5.6
- node.js
- postgresql
- react
- supabase
- tanstack
- typescript
- vite
Log in or sign up for Devpost to join the conversation.