← notes

Designing the type first and building the whole dashboard against mocks

Mar 10, 2026

An operator dashboard for a trading bot that reads and never acts.

Positions, candidates, performance, risk management, account status. The README is still the unmodified create-next-app default, which is a fair signal of how much attention it got relative to the bot it watches.

The decision worth keeping is that src/types/dashboard.ts came first and src/data/mockData.ts second. The whole UI was built against mock data shaped by that type file, so the dashboard never blocked on the bot being in a working state, and the type file became the interface between two repos that share nothing else. That is an integration contract without building an API layer either side wanted.

The cost is that the mock is always tidier than reality: real position data has nulls, partial fills and states the type file did not anticipate, and a UI developed entirely against clean fixtures meets those in production.

Read-only throughout, no kill switch, no manual close, which keeps it a thing you can leave open on a second monitor rather than something needing auth and an audit trail.