Bento Spaces docs

Bento Spaces documentation

Decision log

Locked decisions are not re-argued. If something must change, add a revision with the date and the reason, and update the doc that describes the behaviour.

Grid and layout

#DecisionWhyStatus
D1One horizontal shelf per space, grows right, no rowsRemoves 2D collision and reflow entirelyLocked
D2Shelf height = 4 boxes (one square)Matches the 16-box model; keeps patterns uniformLocked
D3Whole boxes only, minimum container 1×1A 0.5-wide sliver can never host contentRevised 2026-11-24 (was 0.5)
D4Three levels: space → container → widget. No nestingAmbiguous drag semantics otherwiseLocked
D5Free placement, no auto-packing; gaps are intentionalBento Spaces is composition, not masonryLocked
D6Deleting leaves a gap and gaps are never closed automatically or manually; unused space is intentionalNothing moves under your hand; whitespace is part of the compositionRevised 2026-11-24 (Close gap removed)
D7Inserting shifts every container at or after the seam by the pattern widthSingle-axis reflow is trivial and predictableLocked
D8Patterns are data (rect templates), not CSS grid areasTestable, exportable, filterable by fitLocked
D9Plain HTML/CSS/ES-module JS; .NET hosts itUser: "everything js based, storage is json", no BlazorLocked
D10Layout is a versioned JSON document, not DB rowsDocuments, snapshots, portabilityLocked
D11Undo/redo snapshot stack from the first milestoneRetrofitting it later touches every mutationLocked
D12Pattern/gap pickers filter by fitShowing everything explodes the UILocked
D13Zero third-party dependencieshtml/css/js/.net only; ask before any packageLocked
D15Empty space is a first-class box; its + opens a grouped "Fill this space" popup that enumerates every composition (copies, whole, rows, columns, cells, half+quarters, leave-one-empty, half, one cell, patterns on full-height seams)User wanted the empty box to be fillable, then wanted to choose what fills itLocked 2026-11-24
D16A container never leaves its own 16-box square. Enforced by the client (drag/resize clamp + validation) and the server (422) since 2026-11-24.Makes mobile stacking exact, keeps patterns predictable, and stops a board that edits locally from failing to saveRevised 2026-11-24 (was: containers may straddle)
D17A container is locked while it holds a widget: no move, resize or delete. Empty it firstLike a physical tray; prevents geometry changing under contentLocked 2026-11-24
D18Widget drag: body moves the widget between containers anywhere; illegal target dims to 50% with a red border and refuses; empty space snaps back; a filled target swaps when both fitUser's interaction model, tested against edge casesLocked 2026-11-24
D19Widget size contract: exact sizes + optional stretchDevelopers draw real layouts; no guessingLocked 2026-11-24
D20View mode by default, edit mode behind a toggle beside the account avatar, remembered per deviceThe webtop is a daily surface, not a designerLocked 2026-11-24
D21layout.json holds positions only; widget files hold type/version/props; join by container idTwo revisions per space; drags never fight settingsLocked 2026-11-24
D29Phone renders each 4×4 block as a screen, scrolled verticallyConsequence of D16; no heuristicsLocked 2026-11-24
D30Panel profile: 32:9 side rails, unit from viewport height, kiosk route, idle lock default lockThe 14.5" 2560×720 touchscreen is a target surfaceLocked 2026-11-24

Storage, accounts, sharing

#DecisionWhyStatus
D14Repo: source/Bento.Api, top-level web/, tests/, published/ (IIS), archive/ (zip rollbacks), docs/User's layout; recovery from a bad upload is one unzipRevised 2026-11-24 (was src/ + htdocs/)
D22Sharing is per space, not per person. No profiles, no credential intake.Revised after review: simpler, and the board is the thing being sharedRevised 2026-11-25 (was profiles)
D23Share links: unguessable token → one space; stored hashed, revocable, read-only session, idle lock + owner-set PINSharing without exposing accountsRevised 2026-11-25
D31Storage split: App_Data/private (accounts, secrets, sessions, tokens) never synced; App_Data/data safe to put in iCloud/Dropbox/OneDriveKeeps cloud sync from publishing hashes and tokensLocked 2026-11-24
D26Installed widgets belong to a user, usable in all their spaces, invisible to othersUser's scope choiceLocked 2026-11-24
D28Anonymous PWA first; an account adds sync and sharingLowest friction, works offline, free funnelLocked 2026-11-24

Widgets and marketplaces

#DecisionWhyStatus
D24Federated registries; Official is the default source, any URL can be addedUsers may prefer a specific marketplaceLocked 2026-11-24
D25Hashes only (sha256 per version), no signatures or publisher vetting"I don't need to check what he is calling for his own"Locked 2026-11-24
D27Declarative widgets first; code widgets later, sandboxedRemoves the session-theft class of risk while shippingLocked 2026-11-24
D31bModule widgets run in an iframe without allow-same-origin + per-widget CSPSandbox is about not handing over the session, not about trustBuilt in P5

Chrome and orientation

#DecisionWhyStatus
D32**Orientation is per space per device**: horizontal (shelf grows right) or vertical (squares stack downwards). Device settings, keyed by space id; never stored on the serverA long panel may want vertical while a desktop wants horizontal for the same space; the vertical projection is also the phone layoutRevised 2026-11-24 (was server-side)
D33Two configurable docks, icon-only actions dock; spaces dock at top-centre / bottom-left / bottom-centre, actions at top-centre / top-right / bottom-rightUser: every button in a dock, icons instead of textSuperseded by D56 2026-11-25
D34Appearance auto / light / dark, device-local, default autoUser request; auto follows the OSLocked 2026-11-24
D35No separator lines under the top bar or above the dockUser: "lines we don't need"Locked 2026-11-24
D36Settings live in one dialog beside the docks; notifications will join it laterOne place for preferencesLocked 2026-11-24

Module widgets

#DecisionWhyStatus
D47Module widgets run in an iframe with sandbox="allow-scripts", no allow-same-originIsolation is not optional: code must never touch the sessionLocked 2026-11-25
D48The frame document is served by the host with its own CSP, authenticated by a short-lived frame tokenParent CSP blocks blob-document inline scripts, and opaque origins send no cookiesLocked 2026-11-25
D49Modules have no network access (connect-src 'none') until the proxy existsData must flow through declared permissions, not straight from the frameRevised by D59 2026-11-25

Widget data

#DecisionWhyStatus
D59Widget data goes through a host proxy: installed manifest, declared origins, GET only, no cookies, no redirects, 8 s, 256 KB, public addresses onlyA frame must never hold the session or reach arbitrary hosts, and a display must not leak its IP everywhereLocked 2026-11-25
D60The registry index is the consent: a manifest may narrow the advertised network/action permissions, never widen themOtherwise a malicious registry could show a harmless prompt and ship a broader manifestLocked 2026-11-25
D61Declarative data uses a dot path and {{data}} / {{data:path}} / {{var:name}}; no JSONPath, headers or POST yetKeeps the format reviewable and the proxy surface smallLocked 2026-11-25
D62Module bridge gains request, open, refresh and gated setProps; open stays inside the declared originsModules need a capability surface, not raw network accessLocked 2026-11-25
D63self may read static assets but never /api/*Same-origin data should be the app's sample files, not an unauthenticated API surfaceLocked 2026-11-25
D84A declarative action requires permissions.connector, is refused at install without it, and posts through the connector proxy (path + JSON body only)A dashboard should gain buttons without gaining a scripting surface; the consent list must name the capability before the installLocked 2026-11-30
D85OAuth is a provider config block, not per-provider code: authorization code + PKCE, single-use state, access/refresh tokens in the SecretStore, refresh inside the proxy before expiryOne flow for Google, Spotify and the mock; the client secret never leaves the server and a lapsed refresh is a visible oauth_reconnectLocked 2026-11-30
D86Declarative data.mode: "connector" reads through the connector proxy and needs the same permissions.connector as an actionReading a device is as sensitive as switching it; one permission covers both, and the widget still cannot name a URL or a headerLocked 2026-11-30

Widget registries

#DecisionWhyStatus
D42Installable widgets are declarative JSON interpreted by one runtime; no code executesSafe by construction and reviewable in ten linesLocked 2026-11-24
D43Installs are hash-pinned and verified server-side; the index is fetched by the hostHashes pin bytes without gatekeeping (D25); no CORS requirement on registriesLocked 2026-11-24
D44A bundled example registry ships with the appLets the whole flow be tried and tested without hosting anythingLocked 2026-11-24

Space sharing

#DecisionWhyStatus
D37A link shares one space, read-only, with no viewer accountsUser: "not profile sharing but Space sharing"Revised 2026-11-25
D38The owner sets the optional PIN when creating the link; there is no connect flowNothing to collect from other peopleRevised 2026-11-25
D39A link exchanges its token for a 12 h read-only session cookie; reads one space, never writesForwardable without exposing the accountLocked 2026-11-24
D40Idle lock removes widgets from the DOM; PIN unlock is throttledOpacity is not privacyLocked 2026-11-24
D45No guide-grid toggle. Edit mode draws a dashed outline per 4-box square with a round move handle (below in horizontal, left in vertical) that drags the square to reorder itUser: guides not needed; squares visible and movableRevised 2026-11-25
D46Undo/redo hide outside edit mode, and their shortcuts are ignored thereEditing tools leave with editingLocked 2026-11-25

Surfaces

#DecisionWhyStatus
D50The unit is the smaller of a density cap (clamp(80, width/18, 160)) and the viewport fill size, floored at 56A laptop keeps the 80 px design size; a short 32:9 panel fills its height; a phone fits its widthRevised 2026-11-25
D51A narrow viewport (<720 px) stacks squares by default; an explicit per-device orientation still winsThe phone is the vertical case; no extra switchLocked 2026-11-25
D52A display pairing is a read-only shared view with Display = true at /display/{token}: no PIN, no idle lock, rails instead of top chromeA kiosk must boot into content and never show a lock screenLocked 2026-11-25
D53Export is generated client-side as one HTML file with no JavaScript; module widgets become placeholdersA snapshot should be openable forever, not a second appLocked 2026-11-25

Chrome and docks

#DecisionWhyStatus
D56Two top docks split by ownership: the space's name and controls top-centre, settings and account top-rightEditing was hidden behind generic icons; space actions belong to the spaceLocked 2026-11-25
D57In view the space dock is name-only, expanding on hover, keyboard focus or a tap; edit mode pins it openKeeps the viewing layout quiet without hiding the controls on touchLocked 2026-11-25
D58The space name moves out of the brand row into the space dock; pencil opens space details, grid/✓ toggles editContext and actions live together, and the name does not appear twiceLocked 2026-11-25

Modes

#DecisionWhyStatus
D67A fresh browser opens in view; the last mode is remembered per device (bento.mode.v1)Refreshing should not drop people into dashed outlines; editing is an explicit choiceLocked 2026-11-25

Connectors

#DecisionWhyStatus
D68Connectors are account-scoped base URL + write-only bearer token; widgets reference a connector and a pathOne place for URL/auth, no secrets in widgets or sharesLocked 2026-11-25
D69Tokens use AES-256-GCM with the master key outside App_Data when configuredReversible encryption is needed by the proxy, unlike hashed share tokensLocked 2026-11-25
D70The connector proxy allows only GET/POST, relative paths on the connector origin, no cookies or redirects, and refuses link-local/metadataA user-configured URL must not become an SSRF surfaceLocked 2026-11-25
D71The first IoT widget is a built-in Gree AC using a connector, not a marketplace moduleThe bridge is local and needs the account sessionLocked 2026-11-25

Bridge

#DecisionWhyStatus
D72The multi-device bridge is a supervisor over one gree-ac child per AC, not a second Gree protocol implementationReuses the proven AES-ECB/GCM worker and keeps protocol risk lowLocked 2026-11-25
D73One public bridge bearer token; each child has an internal token and no published portBento Spaces only needs one URL; the LAN surface stays one endpointLocked 2026-11-25
D74The Gree widget reads /api/devices, stores deviceId, and falls back to /api/state for a legacy single bridgeOne widget supports both bridge shapes without a migrationLocked 2026-11-25
D75Automations run as a server-side tick in Bento.Api, not in a widget or browser timerA thermostat has to work with no tab open and the phone asleepLocked 2026-11-25 · built 2026-11-26
D76A climate rule uses min/max hysteresis plus cooldown, never a single setpointWithout the gap and cooldown the AC short-cycles the compressorLocked 2026-11-25 · built 2026-11-26
D77A manual change pauses the rule for an hour; the rule never instantly undoes the userBeing overridden by your own house is worse than being warmLocked 2026-11-25 · built 2026-11-26
D78Thresholds live in a profile, and rules select a profile; weather brackets are ordered, first match wins, with a fallbackNumbers stay in one place and the weather can pick behaviour without duplicating rulesLocked 2026-11-25 · built 2026-11-26
D79A profile switch never sends a command; the next tick evaluates the new profile and cooldown still appliesA weather change is not a reason to toggle a compressorLocked 2026-11-25 · built 2026-11-26
D80v1 brackets use the AC's own outdoorTemp; an external forecast is opt-in later and needs a key in the secret storeNo new provider, no key, no dependency until it is actually wantedLocked 2026-11-25 · built 2026-11-26
D81Built-ins are library entries: users may remove and reinstall them, and /manage sets the defaults for new accounts; existing accounts keep every built-inNo widget is permanent clutter, while nobody's board changes on upgradeLocked 2026-11-26 · built 2026-11-26
D82Publishers have a permanent handle and widgets have their own handle; install ids are publisher--widget. Releases are immutable and auto-publish after validation, with the publisher tier shown but not gating publishingSeparate namespaces let two developers own weather; versioned releases keep updates honestLocked 2026-11-28 · built 2026-11-28

Live widgets

#DecisionWhyStatus
D81Secret-free widgets may fetch directly from a small CSP allowlist (Open-Meteo, CoinGecko, Frankfurter)A proxy for every poll adds load and latency for no security gain when the data is publicLocked 2026-11-25
D82Feeds go through one API-hosted proxy (/api/live/feed), account-only, public hosts onlyFeeds have no CORS; an arbitrary URL from a widget is an SSRF surface, so it needs a guard, not a browser fetchLocked 2026-11-25
D83Tier A widgets are shareable and exportable; connectors stay privateThe split is data-based, not widget-based, so users can predict what a share link showsLocked 2026-11-25

Space actions

#DecisionWhyStatus
D64Share and export are space actions in the space dock, not Settings; export opens a popupThey act on one space; Settings is for the device/appLocked 2026-11-25
D65The export popup is the home for future export/viewer permissionsA static file is read-only today, but the place to choose who can open it should be beside the downloadLocked 2026-11-25
D66Share, export and space details are view-only; edit mode hides themEditing should only show editing actions; the view row is for the composed spaceLocked 2026-11-25

Zoom

#DecisionWhyStatus
D54Zoom lives in the space dock (magnifier-minus · level · magnifier-plus), 60–160% in 10% steps, per space and per device in localStoragePeople want to tune one busy space without changing every screen; it must be discoverable while composing and viewingRevised 2026-11-25
D55Zoom scales unit and gap together, applies in view mode and export, and hides outside editProportions stay designed; the tuned board is what visitors and exports seeLocked 2026-11-25

Commercial

#DecisionWhyStatus
C1Free = 3 spaces, presets, local onlyEnough to spread, small enough to upgradeLocked 2026-11-24
C2Plus = €10/year incl. VAT: unlimited spaces, sync, wallpapers, push, share linksCheap enough to be an impulse; user's choiceRevised 2026-11-25
C3€5/year per profile — removed with profiles; share capacity pricing to be decided with billingRevised 2026-11-25
C4Publisher = €50/year, unlimited widgets + pushOne decision for a serious developerLocked 2026-11-24
C5No enterprise tier (no SSO, no admin, no SLAs)Keeps the product small and supportableLocked 2026-11-24
C6Merchant of record for paymentsVAT/invoices handled; ~5% + €0.50 is worth itLocked 2026-11-24
C7Grandfathering: existing subscribers keep their priceCosts only go upLocked 2026-11-24
C8Licence: AGPL core + commercial hosted extrasPrevents a closed SaaS fork without contributingProposed — not locked

Things we tried and undid

ThingWhy it went
0.5-box gridSlivers under 1×1 could never host content (D3)
Containers crossing the 4-box lineBroke mobile stacking and made patterns unpredictable (D16)
Per-container + buttons on hoverUser: pluses at the start and end of everything only (D15)
Gap + duplicating the neighbour immediatelyReplaced by "Fill this space", which lists every composition (D15)
Resize while a widget is insideReplaced by the lock rule (D17)
EF Core / SQLite in M1JSON files fit the reference host and cost no package (D10, D13)
Team tier at €15/displayReplaced by share links; no enterprise surface (C5)
Per-person profiles and connect linksRemoved: sharing is per space (D22 revised)
Publisher fee per widgetPunished the developer with five widgets; €50 flat instead (C4)
Publisher signatures / key pinningHashes pin bytes; vouching for people was not wanted (D25)
Close gapRemoved: the user wants unused space to stay as part of the bento (D6 revised)