Demo & Homepage • Quick Start Guide • Issues
git clone
to deployment.Everything you need to get started for a SaaS company:
User Authentication: Sign up, sign out, forgot password, email verification, and oAuth. Powered by Supabase Auth. GDPR cookie warning for European users.
Marketing Page with SEO optimization and Sitemap
Blog engine with rich formatting, RSS and SEO optimization.
User Dashboard with user profile, user settings, update email/password, and more
Emails: send emails to users, including template support
Search: lightning fast site search, without a backend
Contact-us form
Onboarding flow after signup: collect user data
Style toolkit: theming and UI components
Responsive: designed for mobile and desktop.
Extensible: all the tools you need to make additional marketing pages, UI components, admin portals, database backends, API endpoints, and more.
The selected tech stack creates lightning fast websites.
To get started, create your own copy of the project for development. There are two options:
The repo includes CI scripts designed for GitHub Actions. These confirm you don’t break your build, you use proper code formatting, code linting and typechecking passes, and even spell checking.
Github disables CI on new forks by default, so be sure to go into the Github Actions page for your repo and enable workflows.
To manually run all these tools run the following script. You can view it's contents for individual commands.
# first time only: chmod +x ./checks.sh
./checks.sh
Installing extensions in your editor can automatically format-on-save, show linting/type issues inline, and run your test cases:
To catch build, formatting, linting and test issues before you commit changes, we suggest the following local git hook. It will run before you commit, stop you from breaking the build, and show any issues that are found. Add the lines below to an executable git hook script at the location .git/hooks/pre-commit
.
#!/bin/sh
# Run standard checks before committing
cd "$(dirname "$0")"
sh ../../checks.sh
If you find build, formatting or linting rules too tedious, you can disable enforcement by deleting the CI files (.github/workflows/*
) and removing the git hook (.git/hooks/pre-commit
).
Create a Supabase account
Create a new Supabase project in the console
Wait for the database to launch
Set up your database schema:
database_migration.sql
to create the initial schema.supabase/migrations
directory:Enable user signups in the Supabase console: sometimes new signups are disabled by default in Supabase projects
Go to the API Settings page in the Dashboard. Find your Project-URL (PUBLIC_SUPABASE_URL), anon (PUBLIC_SUPABASE_ANON_KEY) and service_role (PRIVATE_SUPABASE_SERVICE_ROLE).
.env.local
file:PUBLIC_SUPABASE_URL=https://your-project.supabase.co
PUBLIC_SUPABASE_ANON_KEY=your-anon-key
PRIVATE_SUPABASE_SERVICE_ROLE=your service_role secret
Auth Callback
https://saasstarter.work/auth/callback
. Also add that same URL to the the “allowed redirect URL” list in the Supabase auth console further down the page.https://saasstarter.work/auth/callback?*
http://localhost:5173/auth/callback
and http://localhost:5173/auth/callback?*
.yourdomain.com/auth/callback
. If they link to the base URL or another page, double check you have the config above set correctly.OAuth Logins
Account Permissions > Email Address > Read Only Access
oauthProviders
list in /src/routes/(marketing)/login/login_config.ts
with the list of providers you chose. If you don’t want any OAuth options, make this an empty array.Auth Email SMTP
Test authentication
/login
page in your browser, and ensure you can sign up, confirm email, log in, and edit your account.We have two documented options for deploying SaaS Starter: Cloudflare Pages and Vercel. However, it can be hosted anywhere you can host a SvelteKit app.
Our official demo is hosted on Cloudflare Pages, and deployed each time the main branch is updated.
Cloudflare Pages and Workers is one of the most popular options for deploying SvelteKit and we recommend it. Follow Cloudflare’s instructions to deploy in a few clicks. Be sure to select “SvelteKit” as framework, and the rest of the defaults will work.
When prompted: add environment variables for your production environment (PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_ANON_KEY, and PRIVATE_SUPABASE_SERVICE_ROLE).
Optional: enable Cloudflare Analytics for usage metrics.
Deploy using Vercel's deploy button:
Here is a demo of of Saas Starter hosted on Vercel: vercel.saasstarter.work
If you prefer another host you can explore alternatives:
SaaS Starter includes email capabilities for sending emails to users and admins.
These are optional and disabled by default. See email docs for details on how to enable and customize them.
After the steps above, you’ll have a working version like the demo page. However, it’s not branded, and doesn’t have your content. The following checklist helps you customize the template to make a SaaS homepage for your company.
src/config.ts:
. These values are used for SEO.src/routes/(marketing)/blog/posts.ts
, and replace the post pages under src/routes/(marketing)/blog/posts
to align to the urls from posts.ts
.src/routes/(marketing)/+layout.svelte
).prerender = false
in the appropriate +page.ts
file. These are currently pre-rendered and served as static assets for performance reasons, but that will break if you add server side rendering requirements.src/config.ts
), but the more specific these are the better.posts.ts
metadataapp.css
). DaisyUI can automatically use a dark mode theme on systems with dark mode enabled (disabled by default) -- to enable if remove themes: false;
and specify a dark mode theme. Docs: https://daisyui.com/docs/themes/src/routes/(marketing)/+layout.svelte
: customize design, delete unwanted pages from header and footer/static/
directorysrc/routes/(marketing)/login/login_config.ts
(see Auth UI for options).excludePaths
in src/lib/build_index.ts
./src/routes/(admin)/account/+page.svelte
).