SvelteSaaS启动器

sveltekit-saas-starter — Svelte SaaS模板

作者 Signal-Lynx

基于 SvelteKit 的 SaaS 启动模板,集成 Supabase 认证与数据库、Stripe 订阅与一次性购买、权益校验、管理后台和数字下载交付流程,可选接入 Key Commander 许可后端。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-09-30查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

集成 Supabase Auth 与 Postgres,包含受保护路由和用户仪表盘

02

支持 Stripe 订阅与一次性购买,含结账加固、税务、条款接受和促销码

03

内置可运行的管理后台,涵盖用户管理、订阅查看、邮件发送、审计日志和收入指标

04

提供数字下载的安全链接交付模式,以及权益检查和捆绑逻辑

05

可选接入 Key Commander 许可后端,实现许可证驱动的权益解锁和邮箱分配权益

06

采用主域与 admin 子域分离的部署安全模式,便于对管理面板施加 Cloudflare 代理和 WAF

模板详细介绍

这是一个从实际生产 SaaS 实现中清理并通用化而来的启动模板,使用虚构品牌 Paradox Innovations 展示真实流程。核心包括 Supabase Auth 与受保护路由、Stripe 订阅和一次性购买、产品定义与权益检查、数字下载的安全链接交付方式,以及用户资料自助配置。账户生命周期功能已接通,涵盖密码重置与修改、邮箱变更和账户删除。管理后台提供用户与设置管理、订阅状态查看、向用户发送邮件、审计日志和基础收入指标快照。模板还包含品牌与主题替换、SEO 默认配置、结账加固(税务、条款接受、促销码)、权益后端不可用时的结账门控、Turnstile 支持、安全下载辅助、站点地图排除和可用的联系表单,以及隐私、条款、DMCA 等法律样板页。

部署方面采用主域与 admin 子域分离的模式:主域承载公开营销站和用户仪表盘,admin 子域承载管理面板,便于在保持主域兼容 Vercel 等托管的同时,对管理面板使用 Cloudflare 代理、Zero Trust、WAF 和 IP 锁定。需要将两个域名都添加到托管项目,并设置 PUBLIC_WEBSITE_BASE_URL。

Key Commander 是可选的自托管许可后端,接入后站点可感知许可证,实现基于许可证的权益解锁、按邮箱分配权益,以及受控下载和激活/机器重置等自助流程。不接入 Key Commander 时,需要自行实现许可和 Stripe 对账路径。模板使用 MIT 许可,但演示图片、字体、图标等第三方素材需单独核对许可,域名、托管、数据库、支付等外部服务可能另外收费。

SvelteSaaS启动器

适合你的项目吗?

适用场景

  • 需要快速搭建带订阅计费和用户仪表盘的 SaaS 产品前台
  • 希望以真实可运行的管理后台来运营用户、订阅和邮件通知
  • 计划销售数字产品并需要受控下载与权益校验流程
  • 希望自托管许可后端,并通过许可证控制仪表盘功能解锁
  • 需要将公开营销站与内部管理面板在域名和访问控制上分离部署

适合人群

  • 熟悉 SvelteKit 并希望以现有 SaaS 流程为起点的开发者
  • 需要 Supabase 认证和 Stripe 计费基础结构的独立开发者或小团队
  • 准备接入或自建许可与权益系统的 SaaS 项目
  • 愿意自行配置 Supabase、Stripe 及托管平台的用户

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    需要 Node.js 18+、Git、Supabase 账号、Stripe 账号,并通过 npx 使用 Supabase CLI

  2. 2

    克隆仓库后执行 npm install,使用 npx supabase login、link、db push 关联并推送数据库结构

  3. 3

    复制 .env.example 为 .env,填入 Supabase 的公开 URL、匿名密钥、私有 URL 和服务角色密钥,再补充 Stripe 密钥与 webhook 密钥

  4. 4

    Stripe 订阅状态依赖已配置并接收事件的 webhook 端点;接入 Key Commander 时需设置 PRIVATE_LICENSE_MANAGER_URL 和 PRIVATE_LICENSE_MANAGER_API_KEY,并确保产品 ID 与 Key Commander 配置匹配

  5. 5

    部署时需将主域和 admin 子域都添加到托管项目,并设置 PUBLIC_WEBSITE_BASE_URL;若使用机器人防护,需注意 Basic Bot Fight Mode 可能阻断站点与 Key Commander 之间的服务器间调用

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 模板可独立免费使用,但若选择不接入 Key Commander,则需自行实现许可与 Stripe 对账逻辑,这部分功能不包含在模板内。
  • 许可证密钥与基于许可证的权益解锁功能依赖可选的 Key Commander 后端,需自行配置 PRIVATE_LICENSE_MANAGER_URL 和 PRIVATE_LICENSE_MANAGER_API_KEY 等环境变量。
  • 计费流程需要自行提供 Stripe 密钥与 webhook 密钥;Turnstile、R2、邮件、分析等额外功能也需自行配置对应外部服务。
  • 使用模板需要自行注册 Supabase 和 Stripe 账号,相关外部服务可能产生费用。
  • 若启用 Cloudflare 或 Vercel 的基础 Bot Fight Mode,可能阻断站点与 Key Commander 之间的服务器间调用,需改用支持允许列表的防护层级或关闭该功能。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Community note: You can absolutely run this template without Key Commander. We’re releasing it free because we want builders to ship faster. If you go standalone, you’ll implement your own licensing and Stripe reconciliation path.

README 原文

If you want license keys and license-based entitlements in the user dashboard using Key Commander, add these to your `.env`:

README 原文

Then add your Stripe keys and webhook secret for billing flows, plus any extras (Turnstile, R2, email, analytics).

README 原文

Supabase account Stripe account

README 原文

Bot protection note: “Basic Bot Fight Mode” (Cloudflare or Vercel) can break server-to-server calls between this site and Key Commander.

README 原文
https://github.com/Signal-Lynx/sveltekit-saas-starter/blob/main/LICENSEhttps://github.com/Signal-Lynx/sveltekit-saas-starter/blob/main/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-01。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 88 / 100
技术栈
Svelte
网站类型
SaaS · 启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-09-26
截图检查日期
2026-10-01

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Svelte。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: 14c8385a2f87f684657618d110ab882721507801c28e3376f85008dc38639d41

2026-10-01T15:06:47.498Z

来源文件 / 仓库
# SvelteKit SaaS Starter (Key Commander-ready)

A production-ready SvelteKit SaaS starter with Supabase Auth + Postgres, Stripe billing, entitlement-based access, an admin suite you can actually run, and secure delivery workflows for free and paid assets

The template ships with a fictional brand (“Paradox Innovations”) so you can see real flows, and better understand this website template. Allowing you to quickly “de-Paradox” the template, and make it your own.

Links
• Template repo: https://github.com/Signal-Lynx/sveltekit-saas-starter  
• Signal Lynx: https://signallynx.com  
• Key Commander: https://www.signallynx.com/key-commander  
• Key Commander ReadMe (PDF): https://www.signallynx.com/docs

---

## Why we built this template

This template is meant to be your launchpad. A real, working foundation for the Night Shift Nation. Building after hours (while highly caffeinated) and needing something complete and reliable. With this template (and optional Key Commander integration), a viable storefront and dashboard can be stood up in a weekend. The backend mechanics are already here. Bring your product, voice, and branding.

---

## Template Origin

This template is derived from a production SaaS implementation. It’s a cleaned, generalized version of real flows that were built to run under load, handle billing state correctly, and support real customer ops.

---

## What you get

### Core product flows

1. Supabase Auth, protected routes, dashboards
2. Stripe subscriptions and one-time purchases
3. Product definitions, entitlement checks, and bundling logic
4. Digital-download delivery pattern (secure link approach)
5. User profile self-configuration

### Account lifecycle (working)

Password reset and change, email change, and account deletion flows are wired and working.

### Admin suite (working)

Admin pages are included so you can operate without duct tape:

1. Manage users and user settings
2. Review and manage subscription state
3. Send emails to users from the admin suite
4. Admin audit log for accountability
5. Basic revenue metrics (MRR/ARR style snapshots)

### Production extras

This template includes the boring but critical stuff so you don’t ship a fragile demo.

1. Branding and theme templating (easy color swaps)
2. SEO-ready defaults (metadata patterns, crawl controls)
3. Checkout hardening (tax handling, Terms acceptance, promo codes)
4. Fail-safe checkout gating when the entitlement backend is down
5. Turnstile support, secure download helpers, sitemap exclusions, and a working contact form
6. Legal boilerplate pages (Privacy, Terms, DMCA, and more) with crawl safeguards

---

## Key Commander integration (recommended)

If you want the plug and play path, pair this template with Signal Lynx Key Commander.

Key Commander is the self-hosted backend engine that keeps your business state correct. Stripe events, paid status, trials, entitlements, license issuance, delivery, and ongoing reconciliation are handled by a single system you control. This template becomes the storefront and dashboard on top.

### What Key Commander gives you (beyond this website)

1. Revenue Ops (“Robotic Accountant”)  
   Subscriptions, trials, one-time sales, and reconciliation to keep billing state accurate.

2. Application Intel (“Comms Relay”)  
   Targeted announcements plus detailed audit logs so your stack is not a black box.

3. System Armor  
   Backups, integrity checks, and anti-piracy tooling designed to run on autopilot.

4. Flight Recorder  
   Website and client apps can send logs to your server so you can diagnose issues fast.

### What pairing Key Commander with this template adds

When Key Commander is connected, this site becomes license aware:

1. License-backed entitlements so dashboards unlock based on live license and billing status
2. Email-based entitlement assignment for promo and dev workflows  
   Assign a license to an email in Key Commander, and the site auto-entitles that user on signup or next login.
3. Customer self-service patterns for gated downloads and activation or machine reset workflows (where enabled)

### Key Commander connection (env)

If you want license keys and license-based entitlements in the user dashboard using Key Commander, add these to your `.env`:

```env
PRIVATE_LICENSE_MANAGER_URL="YOUR_LICENSE_MANAGER_URL"
PRIVATE_LICENSE_MANAGER_API_KEY="YOUR_LICENSE_MANAGER_API_KEY"

# Optional: If your Key Commander backend is protected by Cloudflare Access
PRIVATE_CF_ACCESS_CLIENT_ID="your-cf-access-client-id"
PRIVATE_CF_ACCESS_CLIENT_SECRET="your-cf-access-client-secret"
```

Then ensure your product IDs in `src/lib/data/products.ts` match the product IDs configured for your Key Commander Alias, and your custom/shipable software.

### Security templates included

Key Commander includes deployment guardrails and templates so you don’t wing it:

1. Cloudflare Tunnel configuration templates with explicit hostname and path routing
2. Default-deny edge posture with allowlisted routes
3. Practical WAF and rate-limit recipes for sensitive endpoints

Bot protection note: “Basic Bot Fight Mode” (Cloudflare or Vercel) can break server-to-server calls between this site and Key Commander. If you want bot protection, use a tier that supports allowlists, or leave bot fight off and rely on WAF rules, rate limits, and Turnstile.

Community note: You can absolutely run this template without Key Commander. We’re releasing it free because we want builders to ship faster. If you go standalone, you’ll implement your own licensing and Stripe reconciliation path. Either way, we’ll help where we can. We want to see what the Night Shift Nation builds.

---

## Tech stack

Framework: SvelteKit 5  
Styling: Tailwind CSS + DaisyUI  
Auth + DB: Supabase (Postgres + Auth)  
Payments: Stripe  
Licensing backend (optional): Signal Lynx Key Commander  
Testing: Vitest + Playwright  
Deploy: Cloudflare Pages, Vercel, or any Node.js host

---

## Deployment Architecture (Important)

This template uses a **Domain Split** security pattern in production:

1.  **Main Domain** (`www.yourdomain.com`): Hosting the public marketing site and user dashboard.
2.  **Admin Domain** (`admin.yourdomain.com`): Hosting the internal admin panel.

**Why?**
This allows you to keep your main domain compatible with hosts like Vercel (which prefer "DNS Only" / Grey Cloud), while routing your sensitive Admin panel through Cloudflare's Proxy (Orange Cloud) to enable Zero Trust, strict WAF rules, and IP locking without breaking your public site.

**Configuration Requirements:**

1.  **Hosting:** Add **both** `www.yourdomain.com` and `admin.yourdomain.com` as custom domains in your hosting project (Vercel/Netlify/Cloudflare Pages).
2.  **DNS:**
    - `www`: DNS Only (Grey Cloud) recommended for Vercel.
    - `admin`: Proxied (Orange Cloud) recommended for security.
3.  **Environment:** Set `PUBLIC_WEBSITE_BASE_URL` to your main URL (e.g., `https://www.yourdomain.com`). The app will automatically derive the admin domain (`admin.yourdomain.com`) from this.

---

## Quick start (local dev)

### Prereqs

Node.js 18+  
Git  
Supabase account  
Stripe account  
Supabase CLI (via npx)

### 1) Clone and install

```bash
git clone https://github.com/Signal-Lynx/sveltekit-saas-starter.git
cd sveltekit-saas-starter
npm install
```

### 2) Link Supabase and push schema

```bash
npx supabase login
npx supabase link
npx supabase db push
```

### 3) Configure environment

```bash
cp .env.example .env
```

Minimum required Supabase values (Supabase Dashboard → Project Settings → API):

```env
PUBLIC_SUPABASE_URL="YOUR_SUPABASE_PROJECT_URL"
PUBLIC_SUPABASE_ANON_KEY="YOUR_SUPABASE_ANON_KEY"

PRIVATE_SUPABASE_URL="YOUR_SUPABASE_PROJECT_URL"
PRIVATE_SUPABASE_SERVICE_ROLE="YOUR_SUPABASE_SERVICE_ROLE_KEY"
```

Then add your Stripe keys and webhook secret for billing flows, plus any extras (Turnstile, R2, email, analytics).

Stripe note: subscription state only stays accurate if your Stripe webhook endpoint is configured and receiving events.

### 4) Run dev server

```bash
npm run dev -- --open
```

---

## Customization

### Rename your company

Edit `src/config.ts` and update your site name, legal name, and contact emails.

### Change theme colors

Edit `src/lib/theme.ts` and update the primary and secondary hex values. DaisyUI updates the UI system-wide.

### Define your products

Edit `src/lib/data/products.ts`:

1. Remove the example products
2. Add your real products
3. Update Stripe price IDs to match your Stripe setup

### Update marketing content

Edit:
• Home page: `src/routes/(marketing)/+page.svelte`  
• FAQs: `src/lib/data/faqData.ts`  
• Features: `src/lib/data/homepageFeatures.ts`

For deeper guidance, see `CUSTOMIZATION.md`.

---

## Scripts

```bash
npm run dev        # Start the local dev server
npm run build      # Build for production
npm run preview    # Preview production build

npm run check      # Svelte type-check
npm run lint       # Lint
npm run format     # Prettier format
npm run test       # Vitest watch mode
npm run test:run   # Vitest once
npm run test:e2e   # Playwright e2e

./checks.sh        # Format + lint + check + tests
```

---

## Documentation (extras)

Email setup: `email_docs.md`  
Analytics setup: `analytics_docs.md`

---

## License

MIT. See `LICENSE`.

---

## Maintained by

Signal Lynx, builders of self-hosted automation and licensing tools.  
Company site: https://www.signallynx.com

---

## Search terms (for discoverability)

SvelteKit SaaS starter, Supabase Auth, Stripe subscriptions, Stripe webhooks, one-time purchases, entitlements, admin dashboard, Cloudflare Turnstile, Cloudflare R2 downloads, Cloudflare Pages deploy, SaaS template, boilerplate, Signal Lynx, SignalLynx, Signal-Lynx, KeyCommander, Key Commander, Key-Commander, NightShiftNation.
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。