GitHub - denoland/saaskit: A modern SaaS template built on Fresh. · GitHub
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert This repository was archived by the owner on Jul 28, 2026. It is now read-only. Branches Tags Open more actions menu Latest commit History 892 Commits 892 Commits Folders and files Name Name Last commit message Last commit date .github .github .vscode .vscode components components islands islands middlewares middlewares plugins plugins posts posts routes routes static static tasks tasks utils utils .dockerignore .dockerignore .example.env .example.env .gitattributes .gitattributes .gitignore .gitignore CONTRIBUTING.md CONTRIBUTING.md Dockerfile Dockerfile LICENSE LICENSE README.md README.md deno.json deno.json dev.ts dev.ts docker-compose.yml docker-compose.yml e2e_test.ts e2e_test.ts fresh.config.ts fresh.config.ts fresh.gen.ts fresh.gen.ts main.ts main.ts tailwind.config.ts tailwind.config.ts Repository files navigation ⚠️ SaaSKit is no longer actively maintained. ⚠️ Deno SaaSKit Deno SaaSKit is an open-sourced, highly performant template for building your SaaS quickly and easily.
Note: this project is in beta. Design, workflows, and user accounts are subject to change. Features Deno's built-in formatter , linter and test runner and TypeScript support Next-gen web framework with Fresh In-built data persistence with Deno KV High-level OAuth with Deno KV OAuth Modern CSS framework with Tailwind CSS Responsive, SaaS-oriented design Dashboard with users view and statistics chart Stripe integration (optional) First-class web performance REST API Blog with RSS feed and social sharing icons HTTP security headers Get Started Get Started Locally Before starting, you'll need: A GitHub account The Deno CLI and Git installed on your machine To get started: Clone this repo: git clone https://github.com/denoland/saaskit.git cd saaskit Create a new .env file.
Navigate to GitHub's New OAuth Application page . Set Application name to your desired application name. E.g. ACME, Inc . Set Homepage URL to http://localhost:8000 . Set Authorization callback URL to http://localhost:8000/callback . Click Register application . Copy the Client ID value to the .env file: GITHUB_CLIENT_ID= < GitHub OAuth application client ID > On the same web page, click Generate a new client secret . Copy the Client secret value to the .env file on a new line: GITHUB_CLIENT_SECRET= < GitHub OAuth application client secret > Start the server: deno task start Navigate to http://localhost:8000 to start playing with your new SaaS app.
Set Up Stripe (Optional) This guide will enable test Stripe payments, the pricing page, and "Premium user" functionality. Before starting, you'll need: A Stripe account The Stripe CLI installed and signed-in on your machine To get started: Navigate to the API keys page on the Developers dashboard. In the Standard keys section, click Reveal test key on the Secret key table row. Click to copy the value and paste to the .env file: STRIPE_SECRET_KEY= < Stripe secret key > Run the Stripe initialization script: deno task init:stripe Copy the Stripe "Premium Plan" price ID to the .env file: STRIPE_PREMIUM_PLAN_PRICE_ID= < Stripe " Premium Plan " price ID > Begin listening locally to Stripe events : stripe listen --forward-to localhost:8000/api/stripe-webhooks --events=customer.subscription.created,customer.subscription.deleted Copy the webhook signing secret to the .env file: STRIPE_WEBHOOK_SECRET= < Stripe webhook signing secret > Start the server: deno task start Navigate to http://localhost:8000 to start playing with your new SaaS app with Stripe enabled.
Note: You can use Stripe's test credit cards to make test payments while in Stripe's test mode. Bootstrap the Database (Optional) Use the following commands to work with your local Deno KV database: deno task db:seed - Populate the database with data from the Hacker News API . deno task db:dump > backup.json - Write all database entries to backup.json . deno task db:restore backup.json - Restore the database from backup.json . deno task db:reset - Reset the database.
This is not recoverable. Customize and Extend Global Constants The utils/constants.ts file includes global values used across various aspects of the codebase. Update these values according to your needs. Create a Blog Post Create a .md file in the /posts with the filename as the slug of the blog post URL. E.g. a file with path /posts/hello-there.md will have path /blog/hello-there . Write the Front Matter then Markdown text to define the properties and content of the blog post. --- title : This is my first blog post! publishedAt : 2022-11-04T15:00:00.000Z summary : This is an excerpt of my first blog post. --- # Heading 1 Hello, world! ``` javascript console . log ( " Hello World " ); ``` Start the server: deno task start Navigate to the URL of the newly created blog post.
E.g. http://localhost:8000/blog/hello-there . See other examples of blog post files in /posts . Themes You can customize theme options such as spacing, color, etc. By default, Deno SaaSKit comes with primary and secondary colors predefined within tailwind.config.ts . Change these values to match your desired color scheme. Cover Image To replace the cover image, replace the /static/cover.png file. If you'd like to change the filename, also be sure to change the imageUrl property in the <Head /> component.
Deploy to Production This section assumes that a local development environment is already set up. Navigate to your GitHub OAuth application settings page . Set the Homepage URL to your production URL. E.g. https://hunt.deno.land . Set the Authorization callback URL to your production URL with the /callback path. E.g. https://hunt.deno.land/callback . Copy all the environment variables in your .env file to your production environment.
Deploy to Deno Deploy Clone this repository for your SaaSKit project. Update your .github/workflows/deploy.yml file as needed. Hints are in the file. Sign into Deno Deploy with your GitHub account. Click + New Project . Select your GitHub organization or user, repository, and branch. Click Edit mode and select Build step with GitHub Actions as the build mode and main.ts as the entry point. Click Add Build Step and wait until the GitHub Actions Workflow is complete.
Once the deployment is complete, click on Settings and add the production environmental variables, then hit Save . You should now be able to visit your newly deployed SaaS website. Deploy to any VPS with Docker Docker makes it easy to deploy and run your Deno app to any virtual private server (VPS). This section will show you how to do that with AWS Lightsail and Digital Ocean. Install Docker on your machine, which should also install the docker CLI .
Create an account on Docker Hub , a registry for Docker container images. Note: the Dockerfile , .dockerignore and docker-compose.yml files come included with this repo. Grab the SHA1 commit hash by running the following command in the repo's root folder: # get the SHA1 commit hash of the current branch git rev-parse HEAD Copy the output of the above and paste it as DENO_DEPLOYMENT_ID in your .env file. This value is needed to enable caching on Fresh in a Docker deployment.
Finally, refer to these guides for using Docker to deploy Deno to specific platforms: Amazon Lightsail Digital Ocean Google Cloud Run Set Up Stripe for Production (Optional) Activate your Stripe account . Navigate to the API keys page on the Developers dashboard. In the Standard keys section, click Reveal test key on the Secret key table row. Click to copy the value and paste to your STRIPE_SECRET_KEY environment variable in your production environment.
STRIPE_SECRET_KEY= < Stripe secret key > Navigate to the Webhooks page to register your webhook endpoint. Click Add endpoint . Set Endpoint URL to your production URL
The rest of this page is on the live site.