Case study
Command Centre: one portal for a whole company
Separate sales, marketing and operations tools brought into one portal, with an AI assistant and a management dashboard on top.
- My role
- Sole engineer: requirements, design, build, deployment and production support
- When
- 2026 – present
- Status
- In production, used daily
- Stack
- React, TypeScript, Tailwind, Supabase, Vercel, Claude API, n8n
50+
tools the internal AI assistant can use
14
kinds of action that wait for a person's OK
1
dashboard from ad spend to signed deal
The problem
The company ran on traditional methods: spreadsheets and WhatsApp, with light use of a mobile CRM. Nobody could see, in one place, what an advert had cost against the qualified leads it produced.
My first attempt at fixing coordination was a Telegram bot. It barely got used, because everyone already lives in WhatsApp. The lesson was that a tool has to earn its place: it needs to sit where the work happens and do far more than a chat bot can. So I built a full portal, and brought WhatsApp into it rather than competing with it.
What I built
One portal the whole company works in, under one login, with access set by role and department and enforced in the database rather than the interface. It connects:
- the WhatsApp Cloud API and the shared inbox, with the AI sales agent's conversations
- Meta lead forms and daily ad spend
- email and WhatsApp campaigns, with delivery, read and reply tracking
- project control with a critical path, ISO 9001 quality records, Word documents with approvals and e-signing
- a product master that generates the flyers, brochures and price lists, and pricing built up from cost
- the company's ERP, read-only: purchase orders, receipts and a finance view of cash and amounts due
- recruitment, onboarding, tasks, approvals, and calls between colleagues
- live yard cameras over a private network, and analytics from the product websites
An assistant that can act, safely
Staff ask the built-in assistant questions in plain language and get answers from live company data through more than 50 tools: the CRM, projects, quality records, campaigns, documents, the knowledge base, Google Drive, the yard cameras and the web. It reads images and PDFs, and each request goes to a cheaper or stronger model depending on the task, with prompt caching and per-user limits on cost.
It can also act: draft a quotation priced by the quote builder's rules, create a task, a non-conformance report or a material request, update pricing. Every action appears as a card that a person confirms before anything is saved. Role-specific versions, such as an ISO audit agent and a production agent, have their own instructions and tools.
Production and quality
The same portal runs the yard: each boat's build, from the plan and critical path to materials and handover, and the ISO 9001 quality system with a readiness check against the standard. That side has its own write-up, Running production.
The management dashboard
Company KPIs with period-on-period changes and trends, campaign results and website traffic, all on one screen. The figure that matters most for advertising is cost per qualified lead, by country and product. Ads Manager can't produce it, because it doesn't know which leads were qualified; the portal joins daily ad spend to the AI agent's qualification of each lead.
Market research where the model can't make up the numbers
A market page where the assistant researches competitors, customer segments, organisations worth approaching, shipping and import rules per country, and whether a boat would pay for itself in a given country and use, all with sources and a history of every run.
Two rules keep it honest. The model researches the inputs (rates, occupancy, running costs), but revenue, profit and payback are worked out in code, against the real list price, and a missing input stays empty instead of counting as zero. When it rewrites a research card as a brief for a client, a section is only accepted if every number in it survives the rewrite; otherwise the original wording is used. Segments are scored against the CRM's real deals, counted in code.
Connected to the ERP, without the risk
Purchasing and accounting live in the company's ERP (Odoo). The portal reads it through a connection that is read-only by construction: only the ERP's read methods are allowed in code, whatever rights the account has. A sync every 15 minutes links each purchase request in a project to the ERP's order lines, so what was ordered and received comes from the ERP rather than being typed twice, and a finance page shows cash, amounts due and commitments.
How I keep it reliable
Every push runs lint, type checks, a database security suite and a build in CI. Before each release, 255 unit tests and 33 browser journeys run, and the journeys fail on any browser error or accessibility problem. Changes are written to an audit log, deletes go to a recycle bin with a 30-day restore, errors go to Sentry, and an hourly watchdog flags problems to the team so failures aren't silent. Plans and feature docs live in the repo next to the code.
The hard part
Some customers received the same WhatsApp broadcast twice. The cause was a race: the live send and a scheduled drain job were both working through the same queue, and each could pick up a row before the other marked it. I moved the queue to atomic row claims, so a recipient can only ever be taken by one worker, and the drain resumes safely after a crash without resending.
Limits, and what's next
I'm the only engineer on it, so automated checks gate every deploy but there's no second human reviewer. CI runs lint, type checks, the database security suite and a build on every push, but the unit tests and browser journeys run on my machine before each release; adding them to CI is next.