Build a surface

A surface is a screen: a web component that reads your local data and draws charts, tables, timelines, anything visual. It ships as a Python wheel, like a source.

  1. Make the componentA Lit custom element extending LitElement. When it connects, it asks your local database for its data over Arrow IPC.
  2. Register the entry pointAdd a shenas.surfaces entry point to pyproject.toml, pointing at a Python class that gives the component’s name, its title and the path to its bundled JavaScript.
  3. Bundle and packageBundle the component with esbuild or Vite, include the bundle in the package’s data files, and build the wheel with uv build.
  4. Install and open itInstall the wheel with shenasctl source add --local ./dist/<wheel>; the surface appears in the app on the next page load.

How a surface works

DataA surface queries your local database through the Arrow IPC endpoint shenas serves, so the data never leaves your device.Arrow IPC, DuckDB
The shell loads itEach surface is a custom element that registers itself through its entry point; shenas loads it into the app.Lit, Python entry points
DrawingA surface lays itself out and brings its own charting library, bundled into the wheel.Observable Plot, Chart.js, D3

Working examples are under plugins/surfaces/ in the repository: shenas-org/shenas Public mirror (shenas-org/shenas): Last updated 2026-05-23. Treat it as frozen; do not rely on it for current releases.

Other kinds

SourcesBring data in from a service or a local file.dlt
TransformsTurn what came in into shared measures, or write a kind of your own.SQL, geofence, geocode, regex extract, LLM categorize
DatasetsThe shared tables transforms write into, such as daily HRV, transactions or events.Python dataclasses
FrontendThe shell around everything is a plugin too: write your own or extend the default.
ThemeStyles everything at once: a stylesheet and a small class.CSS custom properties
AnalysisWays of testing a hypothesis: the operations it may use and how it chooses them.operation vocabulary, recipe strategy
v0.22.0