Introduction
OmniSvelte is a batteries-included framework that transforms SvelteKit into a production-ready powerhouse — with database, auth, schema generation, realtime, jobs, and a plugin system built in.
Introduction
OmniSvelte is a drop-in enhancement layer for SvelteKit. It isn't a separate framework — it is SvelteKit, supercharged with everything a production app needs baked in.
"SvelteKit, but with superpowers." — Build production-ready applications in minutes, not months.
Why OmniSvelte?
Plain SvelteKit gives you routing, SSR, and an exceptional developer experience. But most apps need the same things on top: a database ORM, authentication, validation schemas, typed models, and more. You end up wiring the same things together on every project.
OmniSvelte solves this at the framework level. One Vite plugin. One config block. Everything generated and wired.
How it works
Add the omniSvelte() Vite plugin, define an omni block in svelte.config.js, and OmniSvelte:
- Watches your
.schema.tsfiles and generates Drizzle tables, Zod validators, and typed model classes on the fly - Injects a set of virtual modules (
$db,$auth/server,$auth/client,$models/*,$schema,$validation/*) so you never hardcode import paths - Wires Better-Auth into your SvelteKit hooks automatically
- Exposes a plugin API so the community (or you) can extend everything
Feature Status
✅ Stable
🔜 In Progress / Planned
Quick Example
// vite.config.ts
import { omniSvelte } from 'omni-svelte/vite';
import { defineConfig } from 'vite';
export default defineConfig({ plugins: [omniSvelte()] });// svelte.config.js
const config = {
kit: { adapter: adapter() },
omni: {
database: { enabled: true, connection: { url: process.env.DATABASE_URL } },
auth: { enabled: true, secret: process.env.BETTER_AUTH_SECRET }
}
};
export default config;// src/lib/posts.schema.ts
import { defineSchema, field } from 'omni-svelte/schema';
export default defineSchema('posts', {
id: field.serial().primaryKey(),
title: field.string(255).required(),
content: field.string().required(),
published: field.boolean().default(false),
userId: field.integer().required()
}, { timestamps: true });OmniSvelte watches this file and generates your Drizzle table, Zod validators, and typed Posts model class automatically.
Next Steps
- Installation — Add OmniSvelte to a new or existing project
- Quick Start — Build your first app end-to-end
- Schema — The schema-driven code generation system