Frames
A Frame is a real-time display surface — a smart display, e-ink screen, TV or tablet — that shows live glucose data via GridStack. Each frame has multiple pages that rotate automatically.
Concepts
- Frame (
frametable:id,userId,name,settings JSON) — owned per user, paired via short code (framePairingCode) shown at/frames→ QR or/frame/register/:code(POST /api/v1/frame/register/:codecreates the frame + an initialshared_screen_link). - Pages (
Page { id, name, blocks: Block[] }) —pagesRotationInterval(3–60s,Slider) controls auto-rotation. - Blocks (
Block { id, type, x,y,w,h, config }) — 14 types (w_glucose,w_tir,w_chart_line,w_weather,w_stat,w_bus_stop,w_time, …), each withtheme: default|dark|glassmorphism|metroandpatients[]+rotateSecs. - Layout — persisted as
frame.settings.layout { pages, gridColumns, gridRows, canvasW/H, isLandscape }viaPUT /api/v1/frame/:id/layout. GridStack (gridstack@12.5.0) handles drag/resize withcellHeight = max(40, canvasH/rows). - Device presets —
Libre,iPhone 16 Pro (393×852),Galaxy S24,iPad Air/Pro,Desktop 1080pplus customW×HandLandscapeswitch.
Editor
/frame/edit/:id (ScreenEditor.vue, 3000+ lines) is shadcn-based: header Button/Input/Select/Switch, right panels are Card/ScrollArea (frame settings w-80 and block settings w-72), Popover for grid config (fixes z-index vs right sidebar), Slider for grid/brightness.
Sharing
A frame’s layout can be shared publicly via Screen Shared Link (/ss/:token, see Shared Links concept). The link reuses the same frameId and shared_screen_link.token (32-char).
Limits
frames: 2 for Free, ∞ for Pro/Clinic/Founder (PLAN_LIMITS). Enforced at registerFrameForCode (402 LIMIT_REACHED + PremiumUpsellModal).
Public API (API key)
Frames can be listed, created, renamed and deleted with an API key (owner-scoped, read for GET, write otherwise): GET/POST /api/v1/public/frames, PUT/DELETE /api/v1/public/frames/:id — see the API reference.