Manual Setup
The quickest way to create a new Saasfly site is using create saasfly
as shown in the Installation guide.
System Requirements
- Node.js - 18.17 or later.
- Bun - 1.0 or later.
- OS - macOS, Windows (including WSL), and Linux are supported.
By the way, we recommend using NVM (Node Version Manager) to run different versions of Node.js.
1. Manual Installation
To manually create a new Saasfly app, just need a few steps:
Fork & Clone Repository From GitHub
Please open https://github.com/saasfly/saasfly , and fork this repository.
A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
Clone the forked repository (please replace <your_username>
to your account name of GitHub) :
You will see the procedure of cloning:
Install The Dependencies
For better experience, please use Bun ( How to install Bun ) , instead of npm or yarn.
Using bun
to install the dependencies:
It may cost several minutes, and then you will see:
Generate Prisma Types
Please ensure your in saasfly folder, then using bun to generate Prisma types:
Output:
2. Start Saasfly
You should do below lists to run the server.
Set Up The Environment Variables
Enter the saasfly folder, duplicate the .env.example
file, rename it to .env.local
, and enter your variables.
Make sure you have a Postgres DB (If you don’t have a Postgres, click here) and have created a new database.
POSTGRES_URL
must in your .env.local
file:
Then, use bun
to create database tables:
Output:
If something went wrong, you can talk to us on Discord , we are glad to answer anything about Saasfly.
Run Build First
Because some basic components are compile-time needed, you should run build
first.
Run The Development Server
Use bun run
to start your web server:
If all goes well, Saasfly should now be serving your project on http://localhost:3000, and you can see the result:
Congratulations! Now you can start coding to build your SaaS.
If you’re new to Saasfly, see the project structure docs for an overview of all the possible files and folders in your application.
Run With Stripe
Please read the article Stripe. And then use bun dev
to run with Stripe: