Soliddeploy

Put your numbers on a screen next to your laptop

A standalone AMOLED mini screen costing a few tens of euros that shows your bol.com revenue, your Shopify revenue, your ad spend and your Claude Code usage. Claude Code builds it; you paste the prompts.

Written by Founder of SolidDeploy ·

What you get here
  • The complete starter prompt Claude Code uses to build the firmware and the service on your Mac
  • Separate prompts for your Claude usage, your bol.com figures and your Shopify figures, with a period selector
  • Seven pitfalls that give no error message, and what to do about them
  • The pattern for adding your own app in a single conversation

A standalone AMOLED mini screen costing a few tens of euros, next to your laptop, that shows your bol.com revenue, your Shopify revenue, your ad spend and your Claude Code usage. You don't write a line of code: Claude Code builds the firmware and the integrations, you paste the prompts and say what should go on it.

This document is the complete playbook. The prompts are included word for word, along with the pitfalls that would otherwise cost you an evening.

What ends up on your desk: a small screen with a menu of apps that refreshes every minute. Four to start with.

  • Claude, with your usage for the five-hour window and the weekly window
  • bol.com, with revenue, ad spend, TACOS and ROAS per period
  • Shopify, with the same figures from your own webshop
  • One you come up with yourself, using the pattern in this document

Where to buy it

Two routes to the same little screen. The first is faster; the second isn't tied to your desk.

WhereWhat you getPriceDelivery time
AmazonThe board itself. It connects to your Mac by USB cable, which also powers itaround 40 eurosa few days
AliExpressThe version with a battery included, so you can place it without a cable. It does need chargingaround 50 eurostwo to three weeks

What to check when ordering: the size must be 2.16 and it should say Touch. Waveshare makes this series in several sizes, with and without a touchscreen; the smaller ones use a different driver, so the prompts below no longer fit.

If you do end up with the version without a touchscreen, this playbook still works. The starter prompt requires that you can move through every screen with the two buttons, precisely in case touch falters. You only miss out on tapping.

The Amazon link is an affiliate link: if you buy the screen through it, we receive a small fee from Amazon. The price stays the same for you, and we recommend the device because we use it ourselves.

What it shows

It is a Waveshare ESP32-S3-Touch-AMOLED-2.16: a complete little device with the screen, touch glass, Wi-Fi, Bluetooth and a battery connector already on board. No soldering, no loose parts.

ComponentWhat it is
Screen2.16 inch AMOLED. Black really is black here, which is why a dark interface reads so calmly
Touch layerCST9220. You tap and scroll just like on a phone
Bluetooth LEThe connection to your Mac. No Wi-Fi network, no server, no cloud
ButtonsTwo of them, always the fallback if touch falters. Deliberately kept

Also needed:

  • A USB-C cable that carries data. A cheap charging cable that only provides power is the most common mistake: your computer simply won't see the device.
  • A Mac with Claude Code. This playbook assumes macOS, because the Bluetooth connection and reading your Claude usage rely on it. It also works on Linux, but the step for your Claude usage is different.
  • A battery is optional. The AliExpress version comes with one; if you buy the bare board, you can plug a small LiPo battery onto it later. On a USB charger it works just as well away from your Mac, since the data goes over Bluetooth.

Preparation

Two things need to be in place before Claude Code can get to work: a location for the project, and a build environment for the screen. The latter needs its own Python, because the toolchain for this chip doesn't run on the Python that comes with your Mac.

mkdir -p ~/projects/bureaumonitor && cd ~/projects/bureaumonitor

brew install python@3.12
python3.12 -m venv ~/.pio-venv312
~/.pio-venv312/bin/pip install platformio

node -v   # 20 of hoger; anders: brew install node

Connect the screen with the USB cable and check that your Mac sees it. If nothing appears, try a different cable before you continue.

ls /dev/cu.usbmodem*
/dev/cu.usbmodem21101

Then start Claude Code in that folder with claude.

The starter prompt

This is the most important step. The prompt below describes the device, the architecture and the pitfalls. Paste it into Claude Code and let it run. It builds the firmware, the background service on your Mac and the Bluetooth connection between them.

Ik heb een Waveshare ESP32-S3-Touch-AMOLED-2.16 op USB aangesloten. Bouw hiervoor
een bureaumonitor: een schermpje met een menu van apps, gevoed door een klein
Node-programma op deze Mac dat elke minuut data over Bluetooth LE stuurt.

Hardware (staat in de Waveshare-documentatie, verifieer het daar):
- CO5300 AMOLED 480x480 via QSPI, touch CST9220 op I2C, twee knoppen.
- Gebruik alleen Waveshare's eigen documentatie en voorbeelden voor de pinout en
  de drivers. Zoek de juiste GPIO-nummers daar op, gok ze niet.

Firmware:
- PlatformIO met het pioarduino-platform (arduino-esp32 core 3.x). Dat vereist
  Python >= 3.10, dus gebruik ~/.pio-venv312/bin/pio. Zoek de actuele
  platform-release op en zet die in platformio.ini.
- Arduino_GFX voor het scherm, LVGL 9 voor de interface.
- Een BLE GATT-peripheral met een eigen service-UUID en een schrijfbare
  characteristic die platte JSON ontvangt.
- Een startscherm met app-iconen (rooster van tegels, label eronder, home-balk
  onderin), en per app een eigen scherm met een titelbalk en een terugknop.
  Tikken opent een app; de home-balk en de BOOT-knop gaan terug; de andere knop
  stapt door naar het volgende scherm. Navigatie moet altijd ook zonder
  aanraakscherm werken.
- Donkere interface: zwarte achtergrond, inhoud in afgeronde kaarten, per rij
  label links en waarde rechts. Bak een eigen lettertype in via lv_font_conv;
  de ingebouwde LVGL-fonts kennen geen euroteken.

Node-service op de Mac:
- TypeScript, draait onder pm2, pusht elke 60 seconden.
- Bluetooth via @abandonware/noble. macOS vraagt eenmalig toestemming voor
  Bluetooth; leg in de README uit waar je die aanzet.
- Elke databron is een eigen module met een simpele functie die getallen
  teruggeeft. Faalt een bron, dan stuur je -1, nooit 0.

Vier dingen die je moet respecteren, ze zijn duur betaald:
1. Een BLE write-without-response wordt op macOS rond 182 bytes STIL afgekapt.
   Splits de data daarom in meerdere kleine frames en parse in de firmware per
   sleutel, zodat elk frame op zichzelf geldig is. Een scherm erbij = een frame
   erbij, nooit een frame groter maken.
2. Zet de BLE-init in setup() VOOR de LVGL-init. LVGL's geheugenpool is
   statisch; is die te groot of te vroeg, dan start de radio niet meer op
   ("nimble host init failed") terwijl al het andere normaal lijkt. Houd de pool
   klein (rond 72 kB) en bouw maar EEN scherm tegelijk: bouw een scherm bij het
   openen en gooi het vorige weg.
3. Gebruik geen clip_corner en geen transform of opacity op een container.
   LVGL rendert die dan via een tussenlaag die hier niet in het geheugen past;
   het scherm blijft dan stil hangen. Zet LV_USE_LOG op warn zodat zulke
   fouten zichtbaar zijn.
4. Het paneel adresseert kolommen per twee. Snap elk te hertekenen gebied naar
   de volle schermbreedte en een even hoogte, anders staat de tekst scheef en
   trilt hij bij elke update.

Bouw daarnaast twee hulpmiddelen:
- Seriële commando's over USB (115200) om te navigeren en te testen: home, next,
  app <n>, info. Een regel met JSON wordt als datapakket verwerkt.
- Een "shot"-commando dat het scherm als base64 over serieel dumpt, plus een
  Python-scriptje dat daar een PNG van maakt. Het paneel is niet uit te lezen,
  dus dit is de enige manier om te controleren hoe het er echt uitziet.

Begin met een leeg scherm dat "hallo" toont en flash dat eerst, zodat we weten
dat de toolchain klopt. Daarna pas de rest.

What you have afterwards

A screen with an empty menu and a service on your Mac that doesn't send anything useful yet. The next three steps fill that in. Every app consists of the same three parts: a source that fetches numbers, a frame that sends them, and a screen that displays them.

Your Claude usage on the screen

Claude Code works with two windows: one of five hours and one of seven days. How full they are isn't shown in a dashboard, but in the response headers of an ordinary API call. One minimal call per minute is enough to know where you stand.

This only works with the token from your own Claude Code installation. It is stored in your macOS keychain and refreshed by Claude Code itself. With a separate API key you will see different limits, not those of your subscription.
Voeg een Claude-app toe aan de bureaumonitor.

De data: doe elke minuut de kleinst mogelijke /v1/messages-aanroep (max_tokens 1)
en lees het verbruik uit de ANTWOORD-HEADERS, niet uit de body. De headers
beginnen met anthropic-ratelimit-unified-: er zit een 5-uurs en een 7-daagse
benutting in, plus wanneer elk venster reset. Dump eerst eenmalig alle headers
van een echte aanroep en laat me zien welke je gaat gebruiken - namen kunnen
veranderen, dus baseer je op wat er echt terugkomt.

Voor de authenticatie: lees het OAuth-token uit de macOS-sleutelhanger
(het item dat Claude Code zelf aanmaakt) en lees het elke ronde opnieuw, zodat
een verversing vanzelf meekomt. Zet het token nergens in een bestand.
Is het token verlopen, log dan een duidelijke melding en sla die ronde over -
de andere apps moeten gewoon door blijven lopen.

Op het scherm: het percentage van beide vensters met een balk eronder, en hoe
lang het nog duurt tot elk venster reset. Daaronder het tempo: hoeveel procent
per uur je er nu doorheen gaat en hoe lang je op dat tempo nog hebt. Bereken dat
uit een klein rollend geheugen van de laatste twintig minuten; daalt het
percentage, dan is het venster gereset en begin je opnieuw.

bol.com revenue and ad spend, by period

bol has two separate integrations: one for your sales and one for your advertising. You create the keys in your seller account, under the API settings. You need two: one for the Retailer API (orders) and one for the Advertiser API (costs and attributed revenue).

FigureWhat it isWhere it comes from
RevenueWhat you sold in the periodRetailer API, summing orders
Ad spendWhat you spent in the same periodAdvertiser API, costs per day
TACOSSpend divided by your total revenue. Shows how much of everything you sold went on advertisingCalculation
ROASRevenue attributed to advertising, divided by the spendCalculation

Send all three periods. The screen cannot ask your Mac for anything; it only receives. If you want to switch between today, this week and this month, send all three sets in separate frames. The little screen stores them and switches instantly with a tap, without waiting for the next round.

Voeg een bol.com-app toe aan de bureaumonitor, met een periodekiezer.

Databron 1 - Retailer API (bestellingen): som van de verkopen per periode.
Databron 2 - Advertiser API (advertenties): kosten en toegeschreven omzet per dag.
Ik zet de client id en secret van beide in ~/.bureaumonitor/bol.json. Lees ze
daaruit, nooit uit de code. Haal eerst de officiële documentatie van beide API's
op, laat me zien welke endpoints je gaat gebruiken, en doe pas daarna een echte
aanroep waarvan je de ruwe uitvoer aan mij laat zien. Verzin geen veldnamen.

Bereken per periode (vandaag / 7 dagen / 30 dagen):
- omzet in hele euro's
- advertentiekosten in hele euro's
- TACOS = kosten / omzet, in tienden van een procent
- ROAS = toegeschreven omzet / kosten, in tienden. Reken die ALTIJD over
  afgeronde dagen (dus zonder vandaag), want bol schrijft verkopen pas dagen
  later aan een advertentie toe. Zet op het scherm bij welke periode het hoort.
- de verandering ten opzichte van dezelfde periode ervoor, in hele procenten.
  Vergelijk vandaag met gisteren tot HETZELFDE tijdstip, anders staat de hele
  ochtend in het rood zonder dat dat iets zegt.

Stuur elke periode als een eigen frame (denk aan de bytegrens per write).
Op het scherm: bovenaan de omzet groot met een gekleurd label voor de
verandering, daaronder drie rijen: advertentiekosten, TACOS, ROAS. Bovenin de
app een keuze tussen Vandaag / 7 dagen / 30 dagen; die wisselt lokaal tussen de
al ontvangen frames, dus zonder te wachten op de volgende ronde.

Lukt een aanroep niet, stuur dan -1 en toon een streepje. Een storing mag er
nooit uitzien als een omzet van nul.

Shopify revenue and ad spend, by period

Shopify is simpler than bol: you create a custom app in your own store admin, give it read access to orders, and get a token. That is all you need.

  1. In your Shopify admin, go to Settings, Apps and sales channels, Develop apps.
  2. Create an app and give it permission to read orders.
  3. Install it in your own store and copy the access token.
  4. Put that token in a file outside your project, for example ~/.bureaumonitor/shopify.json.

Shopify knows nothing about ad spend, so there are two workable routes. The Meta Marketing API or Google Ads API is the most work, but then runs on its own and is exact per day. One line in a small file with your daily budget is surprisingly good enough as long as your budget is stable, and sorted in five minutes.

Voeg een Shopify-app toe aan de bureaumonitor, met dezelfde periodekiezer als
bol.com (vandaag / 7 dagen / 30 dagen).

Omzet: via de Shopify Admin API, bestellingen per periode optellen. Shop-domein
en token staan in ~/.bureaumonitor/shopify.json; lees ze daaruit. Let op de
paginering van de API - haal alle pagina's op, niet alleen de eerste, anders
klopt de omzet stilletjes niet op een drukke dag.

Advertentiekosten: die kent Shopify niet. Maak er een aparte bron van met
dezelfde vorm als de andere, en lees hem uit ~/.bureaumonitor/adspend.json
(bedrag per dag). Staat dat bestand er niet, stuur dan -1 en laat TACOS en ROAS
een streepje zijn met de tekst "geen advertentiebron gekoppeld". Bouw het zo dat
ik die bron later kan vervangen door de Meta- of Google-Ads-API zonder de app of
het scherm aan te passen.

Hergebruik alles wat de bol-app al heeft: dezelfde berekeningen, dezelfde
schermopbouw, dezelfde omgang met ontbrekende data. Als er code te delen valt
tussen de twee verkoopkanalen, deel die dan echt in plaats van te kopiëren.

Adding your own idea

This is where it gets fun. Every app is the same three steps, and they are so small that you go from idea to screen in a single conversation.

StepWhat it isWhat you say
SourceA function on your Mac that returns numbers. An API, a database, a file, a script"Fetch X from Y"
FrameA small JSON packet of its own with short keys, sent over Bluetooth"Send them in a separate frame"
AppA screen with an icon in the menu that shows those numbers"Show it like this..."

Ideas that work well on a small screen like this:

  • Outstanding invoices and who is late paying.
  • Stock that runs out this week.
  • Reviews or tickets still waiting for your reply.
  • Your monthly revenue target as a bar.
  • Who your next appointment is with, and how many minutes away it is.
  • The number of visitors on your site right now.

The rule of thumb: numbers you act on, not numbers you just like looking at. A screen you no longer glance at after a week has the wrong things on it.

Voeg een nieuwe app toe aan de bureaumonitor.

Naam: [bijvoorbeeld: Facturen]
Wat ik wil zien: [bijvoorbeeld: hoeveel er openstaat, hoeveel daarvan te laat
is, en het aantal facturen dat wacht]
Waar het vandaan komt: [bijvoorbeeld: de API van mijn boekhoudpakket / een CSV
in map X / een SQLite-database]
Het belangrijkste getal, dat groot bovenaan moet: [bijvoorbeeld: bedrag te laat]

Volg exact het patroon van de bestaande apps: een aparte bronmodule, een eigen
frame met korte sleutels binnen de bytegrens, en een app-bestand met een build-
en een tick-functie. Gebruik de bestaande bouwstenen voor kaarten en rijen, zodat
het scherm bij de rest past. Maak een icoon in dezelfde stijl als de andere.

Bij een storing -1 sturen en een streepje tonen, nooit een nul.
Laat me na het flashen een screenshot van het nieuwe scherm zien.

Seven pitfalls that cost time

These are also in the starter prompt, but it helps if you recognise them when things go wrong. What they all have in common is that there is no error message.

SymptomWhat is going on
Half of your data does not arrive, or the screen shows nonsenseYour packet is too big. macOS silently truncates a Bluetooth write at around 182 bytes. Split it into smaller frames
Bluetooth does not start, everything else works fineThe interface library grabbed the memory the radio needed. Use a smaller memory pool, and start the radio first
The display freezes halfway through drawing a new screenThere is rounded clipping or a transform on a container. The graphics layer then tries to allocate an intermediate buffer that does not fit
Text is skewed and jitters on every updateThis panel addresses columns in pairs. Every area to be redrawn must start and end on an even pixel
Individual characters show up as empty boxesThe font on the device only knows the characters you bake into it. A euro sign has to be included explicitly
Everything works, but no data ever arrivesBluetooth permission in your Mac's system settings. You see no sign of it; it simply stays silent
Your Mac does not see the device over USBNine times out of ten, a charging cable without data wires

Keeping it running

The service on your Mac has to keep running, even after a restart. That is what pm2 is for: it restarts the service if it crashes and after your Mac boots.

npm install -g pm2
pm2 start ecosystem.config.cjs
pm2 save
pm2 startup            # volg de regel die hij teruggeeft

pm2 logs bureaumonitor   # meekijken

Two things to know for later. If your Mac has disk encryption turned on without automatic login, nothing runs after a restart until someone logs in; the little screen will then show "waiting for host". And if you change anything in the interface later, always have Claude Code take a screenshot after flashing. It is the cheapest way to check that it is right.

What it ends up being

Not a dashboard you have to open, and not a notification that interrupts you. A little clock that happens to show your business. You glance at it when you look up anyway, and the rest of the day it just sits there.

Stuck, or want to do this with your own systems instead of the four above? Book a call and we will take a look with you.

What is the first thing we should tackle?

Tell us about a process that takes too long, an agent you have in mind or an opportunity you have not got round to yet. We show you what it delivers and how it fits your business.