JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q68393F
  • License MIT

Laravel-inspired framework on top of SvelteKit 2

Package Exports

  • @beeblock/svelar
  • @beeblock/svelar/actions
  • @beeblock/svelar/api-keys
  • @beeblock/svelar/audit
  • @beeblock/svelar/auth
  • @beeblock/svelar/broadcasting
  • @beeblock/svelar/broadcasting/client
  • @beeblock/svelar/cache
  • @beeblock/svelar/cli
  • @beeblock/svelar/config
  • @beeblock/svelar/container
  • @beeblock/svelar/dashboard
  • @beeblock/svelar/database
  • @beeblock/svelar/dates
  • @beeblock/svelar/email-templates
  • @beeblock/svelar/errors
  • @beeblock/svelar/events
  • @beeblock/svelar/excel
  • @beeblock/svelar/feature-flags
  • @beeblock/svelar/forms
  • @beeblock/svelar/hashing
  • @beeblock/svelar/hooks
  • @beeblock/svelar/http
  • @beeblock/svelar/i18n
  • @beeblock/svelar/i18n/LanguageSwitcher.svelte
  • @beeblock/svelar/logging
  • @beeblock/svelar/logging/LogViewer
  • @beeblock/svelar/mail
  • @beeblock/svelar/middleware
  • @beeblock/svelar/notifications
  • @beeblock/svelar/orm
  • @beeblock/svelar/package.json
  • @beeblock/svelar/pagination
  • @beeblock/svelar/pagination/Pagination.svelte
  • @beeblock/svelar/pagination/index.ts
  • @beeblock/svelar/pdf
  • @beeblock/svelar/pdf/GeneratePdfJob
  • @beeblock/svelar/permissions
  • @beeblock/svelar/plugins
  • @beeblock/svelar/plugins/PluginInstaller
  • @beeblock/svelar/plugins/PluginPublisher
  • @beeblock/svelar/plugins/PluginRegistry
  • @beeblock/svelar/queue
  • @beeblock/svelar/queue/JobMonitor
  • @beeblock/svelar/repositories
  • @beeblock/svelar/routing
  • @beeblock/svelar/scheduler
  • @beeblock/svelar/scheduler/ScheduleMonitor
  • @beeblock/svelar/search
  • @beeblock/svelar/services
  • @beeblock/svelar/session
  • @beeblock/svelar/storage
  • @beeblock/svelar/support
  • @beeblock/svelar/teams
  • @beeblock/svelar/testing
  • @beeblock/svelar/ui
  • @beeblock/svelar/ui/Alert.svelte
  • @beeblock/svelar/ui/Avatar.svelte
  • @beeblock/svelar/ui/AvatarFallback.svelte
  • @beeblock/svelar/ui/AvatarImage.svelte
  • @beeblock/svelar/ui/Badge.svelte
  • @beeblock/svelar/ui/Button.svelte
  • @beeblock/svelar/ui/Card.svelte
  • @beeblock/svelar/ui/CardContent.svelte
  • @beeblock/svelar/ui/CardDescription.svelte
  • @beeblock/svelar/ui/CardFooter.svelte
  • @beeblock/svelar/ui/CardHeader.svelte
  • @beeblock/svelar/ui/CardTitle.svelte
  • @beeblock/svelar/ui/Icon.svelte
  • @beeblock/svelar/ui/Input.svelte
  • @beeblock/svelar/ui/Label.svelte
  • @beeblock/svelar/ui/Seo.svelte
  • @beeblock/svelar/ui/Separator.svelte
  • @beeblock/svelar/ui/Tabs.svelte
  • @beeblock/svelar/ui/TabsContent.svelte
  • @beeblock/svelar/ui/TabsList.svelte
  • @beeblock/svelar/ui/TabsTrigger.svelte
  • @beeblock/svelar/ui/Toaster.svelte
  • @beeblock/svelar/ui/index.ts
  • @beeblock/svelar/ui/toast.ts
  • @beeblock/svelar/uploads
  • @beeblock/svelar/validation
  • @beeblock/svelar/validation/valibot
  • @beeblock/svelar/webhooks

Readme

Svelar

Svelar

Laravel-inspired framework on top of SvelteKit 2. Brings the developer experience of Laravel — routing, middleware, Eloquent-style ORM, service container, auth, sessions, caching, queues, mail, broadcasting, and more — into the SvelteKit ecosystem.

Batteries included. Authentication, dashboard, admin panel, email templates, API keys, team management, file uploads, and more — all out of the box so you can focus on building your core business features.

Documentation

Full documentation is available at svelar.dev.

Quick Start

# Scaffold a new project (installs deps, shadcn-svelte, runs migrations automatically)
npx @beeblock/svelar new my-app
cd my-app
npm run dev

The short npx @beeblock/svelar runs the CLI from the published core package. Generated apps install @beeblock/svelar, so project-local commands can use npx svelar ....

Or add to an existing SvelteKit project:

npm install @beeblock/svelar

Publishing

Run the monorepo release script from the repository root:

npm run smoke:ddd
npm run smoke:flat
npm run smoke:browser
npm run smoke:browser:headed
npm run smoke:prod
npm run smoke:db
npm run smoke:db:prod
npm run smoke:redis
npm run smoke:pdf
npm run smoke:search
npm run smoke:pgbouncer
npm run certify:inventory
npm run certify
npm run release:dry-run
npm run release

Run npm run certify before publishing. It prints the release certification inventory, runs the core test suite, then runs Redis, PDF, Meilisearch, S3, and PgBouncer/pg_stat_statements service smoke plus the full generated-app database and production-browser smoke gate. The smoke checks build and pack the local core package, scaffold real apps into the sibling svelar-testing-area, install UI components, run migrations and seeders, execute generated tests, verify production builds, and exercise the generated app in a real browser, including real EventSource checks for SSE public/private/presence channels. DDD smoke apps also receive an injected certification test that covers the intended route -> controller -> DTO/schema -> action -> service -> repository -> model -> resource flow, complex ORM queries, events/listeners, model observers, queues, middleware/rate limiting, sessions, SSE public/private/presence broadcasting, and Postmark/Resend/Mailtrap mail transport payloads across the configured database driver, Redis cache/session/BullMQ behavior when REDIS_URL is present, PDFKit/Gotenberg behavior when GOTENBERG_URL is present, Meilisearch Searchable indexing when MEILISEARCH_HOST is present, S3-compatible storage when S3_CERTIFICATION is present, and PostgreSQL through PgBouncer with pg_stat_statements when PGBOUNCER_CERTIFICATION is present. Use npm run smoke:browser:headed when you want to watch Chromium open and step through the browser smoke flow locally. The database, Redis, Gotenberg, Meilisearch, RustFS, and PgBouncer smoke scripts start Docker containers with random localhost ports, so they do not require 5432, 3306, 6379, 3000, 6432, 7700, or 9000 to be free. If Playwright has not downloaded Chromium locally yet, run cd ../svelar-testing-area/apps/svelar-smoke-ddd && npx playwright install chromium. The release script publishes @beeblock/svelar, which includes the svelar binary. npm blocks the unscoped svelar package name, so first-run scaffolding uses npx @beeblock/svelar new.

See the Getting Started guide for a complete walkthrough.

Features

Module Import Description
ORM @beeblock/svelar/orm Eloquent-style models with relationships, soft deletes, scopes, eager loading
Database @beeblock/svelar/database Schema builder, migrations, seeders (SQLite, PostgreSQL, MySQL)
Auth @beeblock/svelar/auth Session, JWT (with refresh tokens), API tokens, password reset, email verification, OTP login
Middleware @beeblock/svelar/middleware CORS, CSRF, rate limiting, origin validation, request signatures
Routing @beeblock/svelar/routing Controllers, form requests, API resources, response helpers
Validation @beeblock/svelar/validation Zod helpers plus FormRequest support for Zod or Valibot schemas
Session @beeblock/svelar/session Cookie, memory, Redis, and database session stores
Hashing @beeblock/svelar/hashing scrypt (zero-dep), bcrypt, argon2
Queue @beeblock/svelar/queue Job dispatching with sync, memory, and Redis (BullMQ) drivers
Scheduler @beeblock/svelar/scheduler Cron-based task scheduling with distributed locking and DB history
Events @beeblock/svelar/events Typed event dispatcher with listeners and subscribers
Broadcasting @beeblock/svelar/broadcasting Server-Sent Events and Pusher/Soketi WebSocket support
Cache @beeblock/svelar/cache Memory and Redis cache with TTL and remember pattern
Storage @beeblock/svelar/storage Local and S3-compatible file storage
Mail @beeblock/svelar/mail SMTP, Postmark, Resend, Mailtrap, log, and null transports with Mailable classes
Excel @beeblock/svelar/excel Import/export Excel files with streaming support for large datasets
Notifications @beeblock/svelar/notifications Multi-channel notifications (email, database, custom)
Logging @beeblock/svelar/logging File-based logger with levels and rotation
HTTP Client @beeblock/svelar/http Client-side CSRF fetch + server-side fluent HTTP client for third-party APIs
Permissions @beeblock/svelar/permissions Role-based access control with permissions and gates
i18n @beeblock/svelar/i18n Paraglide-js integration with language switcher
Forms @beeblock/svelar/forms SvelteKit Superforms helpers for Zod or Valibot schemas
UI Components @beeblock/svelar/ui Minimal built-in components + shadcn-svelte pre-installed
SEO @beeblock/svelar/ui <Seo> component for meta tags, Open Graph, Twitter Cards, JSON-LD structured data
Hooks @beeblock/svelar/hooks One-line SvelteKit hooks setup with sensible defaults
Container @beeblock/svelar/container IoC container with singleton/transient bindings
Plugins @beeblock/svelar/plugins Plugin discovery, publishing, and CLI management
PDF @beeblock/svelar/pdf PDF generation with PDFKit (default) and Gotenberg drivers
Feature Flags @beeblock/svelar/feature-flags Per-user, per-team, and percentage rollout feature flags
Audit @beeblock/svelar/audit Model change tracking
API Keys @beeblock/svelar/api-keys API key generation, validation, and management
Webhooks @beeblock/svelar/webhooks Webhook dispatch and signature verification
Teams @beeblock/svelar/teams Multi-tenant team management with database-backed storage
Email Templates @beeblock/svelar/email-templates Database-stored templates with variable interpolation
Uploads @beeblock/svelar/uploads File upload handling with validation (local + S3)
Dashboard @beeblock/svelar/dashboard Admin dashboard with job/scheduler monitoring and log viewer
Search @beeblock/svelar/search Meilisearch integration with auto-syncing Searchable mixin
Testing @beeblock/svelar/testing Factory, useSvelarTest(), refreshDatabase(), actingAs(), database assertions

Most first-party facades are also available from the root package, for example import { PDF, ApiKeys, Teams } from '@beeblock/svelar'. Subpath imports remain supported when you want a narrower import.

Official Plugins

Package Description
@beeblock/svelar-datatable DataTable with sorting, searching, pagination, inline editing, export, virtual scroll
@beeblock/svelar-media File attachments with image conversions, collections, S3/local storage
@beeblock/svelar-social-auth OAuth providers (Google, GitHub, Facebook, Twitter, Discord)
@beeblock/svelar-two-factor TOTP two-factor authentication with QR setup and recovery codes
@beeblock/svelar-settings Typed settings with database persistence and per-user/per-team scoping
@beeblock/svelar-comments Threaded comments with moderation, voting, and HasComments mixin
@beeblock/svelar-activity-log Audit trail with LogsActivity mixin and causer tracking
@beeblock/svelar-backup Database backup with local/S3 destinations and cleanup policies
@beeblock/svelar-charts SVG chart components (line, bar, pie, doughnut, area)
@beeblock/svelar-stripe Stripe billing with polymorphic Billable mixin, subscriptions, one-time payments, checkout, invoices, webhooks
@beeblock/svelar-tags Tagging with HasTags mixin, tag types, slugs, and tag input UI
@beeblock/svelar-impersonate User impersonation with session guards and banner UI
@beeblock/svelar-sitemap XML sitemap generation with scheduling and model discovery

CLI

npx @beeblock/svelar new my-app                  # scaffold with shadcn-svelte + all components
npx svelar update                      # update scaffold files without overwriting
npx svelar make:entity Invoice --module billing --fields "title:string,total:number" --crud
npx svelar make:model Post -m -c       # model + migration + controller
npx svelar make:service PaymentService # service class
npx svelar make:job SendEmail          # queue job
npx svelar make:task CleanupTokens     # scheduled task
npx svelar make:test Auth --feature    # feature test
npx svelar make:factory User --model User  # model factory
npx svelar migrate                     # run migrations
npx svelar schedule:run                # start the scheduler
npx svelar queue:work                  # process queue jobs
npx svelar tinker                      # interactive REPL
npx svelar plugin:install @beeblock/svelar-tags  # install + publish

# Deployment
npx svelar make:deploy                 # scaffold Docker + CI/CD + infra
npx svelar make:docker                 # Dockerfile, compose files, health endpoint
npx svelar make:ci                     # GitHub Actions workflow
npx svelar make:infra                  # droplet setup script + env template
npx svelar infra:setup                 # provision droplet + copy files via SSH
npx svelar dev:up                      # start dev containers (hot-reload)
npx svelar dev:logs                    # follow dev container logs
npx svelar prod:deploy                 # pull latest image + restart prod

Generated apps include npm run ui:install for manual --no-install setup. Use that instead of calling shadcn-svelte directly so Shadcn runtime packages stay in production dependencies for adapter-node builds.

54 commands available. Run npx svelar to see all commands.

Database Support

# SQLite (recommended for development)
npm install better-sqlite3

# PostgreSQL
npm install postgres

# MySQL
npm install mysql2

Requirements

  • Node.js >= 20
  • SvelteKit >= 2.0

License

MIT