Packages

Selva is built from small, independent pieces — use the whole thing, or take only what you need: the Rhino.Compute client, the 3D viewer, the solve flow. Core libraries have no UI framework dependency.

App & UI

What you and your users actually see and click.

@selvajs/selva

The web app you deploy

Where your definition actually runs. It loads the schema you saved in the .gh file, draws the controls from it, and solves through Rhino.Compute.

Web app Docs npm
@selvajs/plugin-ui

Where you design the interface

Opens inside the Grasshopper plugin. Drag a definition parameter onto the page to turn it into a slider, dropdown, or colour picker; the layout is saved as a schema inside the .gh file itself. The preview updates live as you edit.

Part of the plugin Docs
@selvajs/ui

Buttons, inputs & theming

The component library behind both the deployed site and the layout tool: the input controls, the design tokens, and the light/dark theme runtime.

Design system Docs npm

Core libraries

The engine room: talking to Rhino, drawing the model, deciding when to recalculate. Each works on its own, in your own project.

@selvajs/compute

Type-safe Rhino.Compute client

Sends inputs to a Rhino.Compute server and unpacks the results, data trees included. Both sides are typed in TypeScript, so mismatches surface while you write the code rather than at runtime. Data only; it never draws anything.

@selvajs/visualization

The 3D viewer

Renders the geometry Rhino sends back, with camera controls, edges, a grid, and measuring. Built on Three.js and tied to no UI framework, so you can put your own interface around it.

Three.js Docs npm
@selvajs/solve

Decides when to recalculate

Owns everything between someone moving a slider and a new result appearing: solve on every change or only on a button press, throttling so a drag does not flood the server, and caching so an input the server has already seen comes back instantly.

Client & server Docs npm
@selvajs/server

Guards incoming requests

The safety layer in front of a deployment: request size limits, rate limiting to blunt abuse, an SSRF guard so a configured URL cannot be pointed at your internal network, and structured logging. Bound to no particular web framework.

Node Docs npm
@selvajs/platform

Bring your own backend

The interfaces Selva is written against for auth, data, storage, and permissions — definitions only, no implementations. Write one against your own infrastructure and run the included conformance tests to check it behaves the way Selva expects.

Interfaces Docs npm
@selvajs/schemas

Keeps both halves in step

Defines what a schema can contain — the format both halves read. One source file generates the TypeScript types the web app uses and the C# types the plugin uses, so the two stacks cannot drift apart.

Code generation Docs npm
@selvajs/notifications

What outbound mail says

Renders the invite and account emails Selva sends — pure templates, no transport. The transport interfaces a self-hoster would build against live in @selvajs/platform instead.

Templates Docs npm

Providers

Where logins, data, and uploaded files live. Sign-in, data, and storage are chosen separately, so you can mix them — Supabase accounts with files on your own disk, or a company login in front of either.

@selvajs/local-provider

Everything on one machine

Keeps accounts, files, and settings on the server’s own disk as plain JSON. No external service to sign up for — the default for getting started or running on a single box. Take all three roles or just one.

Default Docs npm
@selvajs/supabase-provider

Hosted database & logins

Puts accounts, data, and uploaded files in Supabase rather than on the server itself, with the SQL migrations to set it up. Needed when you run more than one copy of Selva at once. Usable for all three roles or only the ones you want hosted.

Hosted Docs npm
@selvajs/header-auth-provider

Use your company login

Hands sign-in to corporate SSO such as Entra, sitting behind a reverse proxy that vouches for the user. Sign-in only — it stores nothing, so it always pairs with one of the two above.

Single sign-on Docs

Tooling

Getting a site running and keeping it running.

@selvajs/cli

Sets up and runs your site

Scaffolds a deployment, prompting for the provider and secrets it needs, and gives you the commands to start it, update it, rotate keys, and diagnose a broken install.

Setup tool Docs npm
@selvajs/config

Shared build settings

The build and formatting settings every other package reuses. Purely internal plumbing — listed only so the map is complete.

Internal Docs

Not sure where to start? The Architecture page shows how these pieces fit together at runtime.