Cross-platform · TV, tablet, phone, web

CalBard

One React codebase running the household information board on a 4K TV, a Fire tablet, a phone, and the browser — weather, calendars, sports schedules, clock, and to-dos, with no server and no account.

Role
Architect & sole developer
Stack
React · TypeScript · Kotlin
Status
v1.1.0 · Play closed testing
Platform
Android TV · Fire tablet · phone · web
CalBard wordmark and app icon on a dark background
CalBard TV layout on a 1080p screen showing the clock, a weather panel with the seven-day forecast, an agenda calendar, a sports schedule, and a to-do list
The TV layout — clock, weather, agenda, sports, and to-dos on one always-on surface, sized to be read from a couch.
7 device classes, one codebase
228 tests across 25 files
0 servers to run
5 of six sections shipping

One codebase, every screen

CalBard merges two earlier dashboards — Calboard, a native Kotlin/Compose TV app, and FireTablet7, a WebView-based tablet dashboard — into a single product. The same content and the same settings follow you from the living-room TV to the tablet on the kitchen counter to the phone in your pocket, with the layout tuned to each screen rather than stretched to fit.

The architecture is deliberately lopsided. The React app is the single source of truth for UI and business logic; the Android shell contributes only platform capabilities — secure storage, OAuth, background sync, and D-pad key handling — exposed through a narrow, typed bridge. On the web, a browser adapter satisfies the same bridge interface. That keeps the two builds from drifting: there is one implementation of every feature, and the shell is replaceable.

CalBard large-tablet layout showing the clock, a weather panel with the seven-day forecast, an agenda calendar with sports games mixed in, a sports schedule, and a to-do list
The large-tablet layout — the width goes to more sections side by side instead of one column down the middle.

Sections you switch on

Every section can be enabled, disabled, and reordered independently. The order is shared across device classes — put weather first and it leads everywhere — while each layout decides how to arrange that order rather than what it is. Nothing is hard-coded into a screen.

SectionSub-modesNotes
WeatherCurrent · 24-hour chart · 7-day forecastLocation by ZIP/postal code or coordinates, resolved to a city name; NWS severe-weather alerts surfaced inline
CalendarsAgenda · Day · Week · MonthAny ICS/webcal feed, several at once; a busy day can scroll, truncate, or collapse to a count
SportsSchedule onlyNine sports across five groups, with favourite-team filtering; works on Android, needs a relay in the browser
Clock12h / 24h, optional secondsTimezone aware
To-DoLocal checklistOn-device only
Weather RadarDrill-in viewAnimated precipitation — built and tested, compiled out
CalBard phone layout showing the clock, a weather panel with the hourly temperature and UV chart and a seven-day forecast, an agenda calendar with sports games mixed in, a to-do list, and a sports schedule stacked vertically
The phone layout — the same sections, stacked into a single scrolling column with scroll-snap between them.

Layouts built for the screen

Four layout components cover seven device classes. The class is auto-detected from viewport size, touch capability, and user-agent hints — plus a hint from the Android host, which knows a TV reporting 1920×1080 is not a desktop monitor — and every device gets a manual override in Settings, because auto-detection is a guess and the person holding the remote knows better.

ClassDetectionLayout characteristics
TV 720p / 1080p / 4K / 8K1280×720 up to 3840×2160, no touch10-foot UI, oversized type, D-pad focus rings, safe margins, OLED burn-in protection
Tablet large≥ 900dp3-column grid, touch-first with optional D-pad
Tablet small600–899dp2-column grid, tighter type
Phone< 600dpSingle column, scroll-snap between sections, pager dots

The weather panel is the one section that re-arranges itself rather than just scaling: it measures its own width and picks one of four tiers — a fixed TV strip, a stacked compact column, a standard split, or a wide layout with the chart beside the current conditions. Container queries would be the clean CSS answer, but the WebView on the minimum supported Android version predates them, so the tier is resolved from a measured attribute instead.

CalBard small-tablet layout showing the clock, a weather panel with the hourly chart and seven-day forecast, an agenda calendar with sports games mixed in, a to-do list, and a sports schedule
Small tablet — two columns, tighter type, same sections.
CalBard phone layout with the calendar switched to week view, showing a seven-day column grid with events and sports games
Week view on the phone — the calendar's four views work at every size.

Data sources, no backend

CalBard is client-side only. There is no server to run, no account to create, and no subscription — credentials and preferences live on the device. Every source sits behind a service adapter, so any one of them can be swapped without touching UI code.

DomainSourceAuthCost
WeatherOpen-MeteoNoneFree, no key
Weather alertsNOAA / NWSNoneFree, US only
GeocodingOpen-Meteo GeocodingNoneFree
SportsAllGameTimes ICS feedsNoneFree (unofficial)
CalendarICS / webcal feedsNoneFree
CalendarGoogle Calendar API v3OAuth 2.0Free — blocked
RadarRainViewer tilesNoneFree, non-commercial — gated off
The honest caveat

Google's limited-input device flow — the only OAuth flow that works on a TV without a redirect URI — does not permit Calendar scopes. Rather than ship a button that always fails, the Google connect UI is compiled out of v1.1.0; ICS and webcal feeds are the working calendar path, and a PKCE flow with a redirect URI is the fix. Sports has a different problem: the provider sends no CORS headers and answers OPTIONS with 405, so the browser build needs a relay that is not deployed. The section is functional in the Android app and not in the browser.

The Android shell

The native side is intentionally thin. It hosts the WebView and supplies the handful of things a browser cannot do:

  • A typed JS↔Kotlin bridge — one narrow interface, satisfied by a browser adapter on the web.
  • The bundle is served over HTTPS through WebViewAssetLoader, not file:// — a real secure context for crypto.subtle and persistent localStorage, without enabling cleartext traffic.
  • Secure storage — credentials in EncryptedSharedPreferences backed by the Android Keystore.
  • A Room cache and a WorkManager worker that keeps it warm in the background, skipping the refresh while the dashboard is already on screen.
  • Boot receiver — kiosk autostart, so a wall-mounted tablet comes back up on its own after a power cut. Off by default and behind an explicit toggle.
  • D-pad key handling — a focus manager with visible focus rings, tested against a real remote.

Offline is a data-level cache, not a service worker. Every section keeps its last good response with a timestamp, and a failed refresh renders stale data with an Offline · N min ago label rather than an empty card. On Android the bundle ships inside the APK, so the app starts offline; on the web a reload while offline fails.

Where it stands

CalBard is a working product, not a sketch. v1.1.0 (versionCode 5, com.calbard) is in Play closed testing: the web app, the Android shell, the TV navigation, release signing, and the signed AAB are all done, and the suite is 228 tests across 25 files. What is left is the last mile of release engineering and the parts of the OAuth story Google's device flow rules out.

AreaStatus
Web app, four layouts, settings, offline cacheComplete
Android shell, bridge, encrypted storage, background syncComplete
TV / D-pad navigation, burn-in protectionComplete
Release signing, signed AAB, Play listing assetsComplete
Test suite228 tests across 25 files
Sports sectionShipping in v1.1.0
Google Calendar sign-inBlocked — the device flow cannot request Calendar scopes
Radar sectionBuilt, flag off
On-device verification (real TV, tablet, phone)Not yet performed
12-tester / 14-day closed testNot started

Next: replace the device flow with PKCE so Google Calendar can work, deploy a sports relay so the browser build can reach the schedule provider, settle the RainViewer licensing question or drop the radar section, and verify D-pad focus, burn-in, and WebView performance on real hardware.

CalBard TV banner artwork with the app icon and wordmark on a black background
The TV banner asset — the launcher entry on Android TV.
CalBard app icon: a blue outlined calendar glyph on a black background
The app icon, generated from a single source and scaled to every density.

Related projects