Back to templates

Template details

SvelteForge Admin

Production-ready admin dashboard template built with SvelteKit 2, Svelte 5, Tailwind CSS 4, Drizzle ORM, and custom session auth.

About this template

SvelteForge Admin is a free, MIT-licensed admin dashboard template built on SvelteKit 2 and Svelte 5 that ships with custom session authentication, role-based access control, and a complete suite of admin tools backed by SQLite and Drizzle ORM.

What is SvelteForge Admin?

SvelteForge Admin is a production-ready admin dashboard template published by Colorlib on GitHub as colorlibhq/svelteforge-admin. It runs on SvelteKit 2.68 with the Svelte 5 runes API, uses Tailwind CSS 4 with shadcn-svelte components, and stores data in SQLite through Drizzle ORM with the better-sqlite3 driver in WAL mode. The template takes a fresh SvelteKit project and produces a working admin app — dashboard, user management, CMS, analytics, notifications, and role management — behind a custom session auth system with zero external auth dependencies. The free repo is MIT-licensed; a commercial SvelteForge Premium variant layers a multi-tenant SaaS framework on top of the same codebase.

Key Features

  • Custom session authentication — SHA-256 hashed session tokens stored in the database while the raw token lives in an HttpOnly cookie, so a leaked database cannot recover session tokens; sessions auto-extend when less than 15 days of a 30-day lifetime remain.
  • Argon2id password hashing — industry-standard hashing with configurable memory and time cost parameters, plus a token-based password reset flow where reset tokens are hashed before storage.
  • Role-based access control — three built-in roles (Admin, Editor, Viewer) with a permission matrix; the first registered user automatically becomes admin and role changes require confirmation dialogs.
  • User management — full CRUD behind a sortable server-side data table with search, configurable pagination, bulk delete dialogs, and CSV or JSON export.
  • CMS with publishing workflow — pages with title, slug, content, and one of three templates (Default, Landing, Blog), with Draft, Published, and Archived status transitions and auto-generated editable slugs.
  • Analytics dashboards — LayerChart v2 (D3-based) area, bar, and pie charts covering user growth, content status, sessions, and notification metrics in a tabbed interface.
  • Command palette and shell polish — Cmd+K keyboard navigation with live search, page transitions via the View Transitions API, system-aware dark/light mode, auto-generated breadcrumbs, a sitemap endpoint, and OpenGraph/Twitter meta tags.
  • Testing and tooling — Vitest unit tests and Playwright E2E tests, ESLint 10 and Prettier, plus Drizzle commands for pushing schema, generating migrations, and opening Drizzle Studio.

Who is it for?

  • Svelte developers who need a production admin panel without building sessions, OAuth, and RBAC from scratch — the auth layer, seven database tables, and the route guard in (app)/+layout.server.ts are pre-wired.
  • Agencies and freelancers shipping client dashboards fast — setup is pnpm install, pnpm db:push, and optional pnpm db:seed, with seeded admin, editor, and viewer accounts all using password123.
  • Budget-conscious startups that want a free, MIT-licensed foundation — new UI pieces can be added with npx shadcn-svelte add, and the same codebase maps to a commercial Premium tier when multi-tenancy is needed.
  • Self-hosters who need a Node-based deployment — the template requires a Node.js runtime and persistent filesystem, includes a Dockerfile, and is documented for Railway, Fly.io, Render, or a VPS.

What can you do with it?

  • SaaS administrators: manage users and roles, revoke individual sessions or all other sessions, and export user data as CSV or JSON.
  • Content teams: publish, archive, and filter pages through the CMS with three templates and a draft workflow.
  • Operations staff: browse the seven database tables with row counts and schemas in the admin-only database manager, then export any table as CSV or JSON.
  • Product demo owners: turn on Demo Mode to get a reset button that wipes and re-seeds the database, while a guard stops visitors from renaming the shared demo account or changing its password.

How does it work?

Clone the repository, run pnpm install, pnpm db:push to create the SQLite database, optionally pnpm db:seed, then pnpm dev serves the app at localhost:5173. Each request is checked by session validation in hooks.server.ts, all routes in the (app) group are protected, and Google or GitHub OAuth activates only when credentials exist in the .env file.

Pricing

The free SvelteForge Admin repository is MIT-licensed and free forever. A separate SvelteForge Premium product on DashboardPack adds multi-tenant workspaces, Stripe and Polar billing, MFA, passkeys, AI chat, CRM, helpdesk, invoicing, and 30+ more modules, priced at $69, $149, and $349 tiers.

FAQ

Is SvelteForge Admin free?

Yes. The repository is MIT-licensed and free forever, and the built-in /docs route contains 16 pages of developer reference. The commercial SvelteForge Premium tier is a separate product with its own pricing.

Does SvelteForge Admin support OAuth?

Yes, optionally. Google and GitHub login are implemented with the Arctic OAuth library, and each provider only activates when its client ID and secret are set in the .env file. Without credentials, the login page shows only the username and password form and produces no errors.

What database does SvelteForge Admin use?

It uses SQLite through Drizzle ORM with the better-sqlite3 driver in WAL mode. The schema has seven tables: users, sessions, pages, notifications, password reset tokens, OAuth accounts, and app settings.

Can SvelteForge Admin run on Vercel or Cloudflare?

No. The better-sqlite3 native module requires a Node.js runtime with a persistent filesystem, so Cloudflare Pages/Workers, Vercel Edge, and AWS Lambda are not compatible. The documentation recommends Railway, Fly.io, Render, or a VPS.

How do I log in after installing?

If you run pnpm db:seed, three accounts are created — admin, editor, and viewer — all with the password password123. If you skip seeding, the first user to register automatically receives the admin role.

screenshot of SvelteForge Admin on template0.com