Variant Systems

Svelte for B2B SaaS

SaaS products live or die by their interface. Svelte compiles away the framework so your users experience your product, not your tech stack.

Variant Systems builds industry-specific software with the tools that fit the problem.

Why this combination

  • Svelte's compiled output ships no runtime framework. Your SaaS dashboard loads with only the JavaScript your features require, improving Time to Interactive for complex interfaces.
  • SvelteKit's layout system models multi-tenant SaaS architecture naturally. Shared navigation, tenant-scoped data loading, and role-based layouts compose through nested layouts.
  • Runes replace Redux, Zustand, and every other state library with built-in fine-grained reactivity that scales from simple toggles to complex multi-step workflows.
  • Form actions handle SaaS configuration flows server-side: team invitations, billing changes, API key management, and webhook setup with progressive enhancement.

No Runtime Tax on Your Product

SaaS dashboards are complex by nature. Settings pages with dozens of toggles, data tables with inline editing, multi-step workflows with conditional branching. Every feature adds JavaScript weight. With runtime frameworks, you pay a tax before your first feature even loads: the framework itself needs to boot, parse its runtime, and initialize its reactivity system. Svelte eliminates this entirely. The compiler converts your components into vanilla JavaScript that manipulates the DOM directly. Your users experience your product features, not framework overhead.

This performance gap widens as your product grows. A mature SaaS product with fifty features does not get slower because of framework bloat. Each Svelte component compiles to only the code it needs. Code splitting at the route level means your settings page does not load your analytics code. Your users interact with the dashboard they are looking at, not paying for every dashboard they might visit.

Multi-Tenant Architecture with SvelteKit

B2B SaaS products serve multiple tenants through a single codebase. Each tenant needs scoped data, role-based access controls, and customized branding. SvelteKit’s nested layout system models this naturally. A root layout handles authentication. A tenant layout resolves the current tenant, loads their configuration, and applies their branding. Feature layouts enforce role-based access. Each layer runs its own server-side load function, composing security checks hierarchically.

Data isolation is enforced at the SvelteKit server layer, not in the browser. Every load function receives the authenticated session and scopes its database queries to that tenant. There is no client-side tenant switching logic that could be manipulated. When a user navigates between features, each load function independently verifies their access. This defense-in-depth approach satisfies SOC 2 auditors because the isolation boundary exists in server code, not client-side conditionals.

Configuration Interfaces with Runes

SaaS products are configuration-heavy. Team management, notification preferences, integration settings, billing plans, API keys, and webhook endpoints. Each configuration screen has interdependent fields, validation rules, and preview states. Runes handle this without a state management library. Form fields are $state. Validation messages are $derived from field values. A preview pane shows $derived output reflecting the current configuration before the user saves.

The $effect rune handles auto-save and dirty-state tracking. When any field changes, an effect marks the form as dirty and starts a debounced auto-save timer. If the user navigates away with unsaved changes, a beforeunload handler warns them. This pattern is reusable across every settings page in your product because runes compose naturally without providers or context wrappers.

Onboarding Flows That Retain Users

First impressions determine SaaS retention. A confusing onboarding experience drives users to cancel before they see value. SvelteKit form actions build onboarding wizards where each step submits to a server endpoint, validates inputs, and advances the flow. Progress persists server-side so users can resume onboarding across sessions and devices without losing their place.

Conditional branching routes users through different onboarding paths based on their plan tier, team size, and stated use case. A startup selects a template to pre-configure their workspace. An enterprise customer connects their SSO provider and maps roles. Each branch is a SvelteKit route with its own form action and load function. The wizard state is server-side, making it auditable and recoverable. No client-side state to lose when the browser tab closes.

Compliance considerations

SOC 2 Type II access controls are enforced through SvelteKit hooks and layout load functions that verify tenant membership and role permissions on every request.
GDPR data subject requests use SvelteKit endpoints to process export and deletion requests with server-side validation and audit logging.
Multi-tenant data isolation is enforced at the SvelteKit server layer, with load functions scoping every database query to the authenticated tenant.
Content Security Policy is stricter with Svelte because the compiler produces no eval-style code, enabling tight CSP headers that satisfy security audits.

Common patterns we build

  • Multi-tenant dashboards with SvelteKit nested layouts scoping navigation, data loading, and permissions to the authenticated tenant.
  • Onboarding wizards with multi-step form actions, progress persistence, and conditional branching based on plan tier and use case.
  • Settings and configuration pages with rune-managed form state, real-time validation, and $derived preview of changes before saving.
  • Usage analytics dashboards with $derived runes computing plan limits, overage warnings, and billing projections from raw meter data.

Other technologies

Services

Building in B2B SaaS?

We understand the unique challenges. Let's talk about your project.

Get in touch