Skip to content

scott-williams-2002/saasFactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SaasFactory

SaasFactory is a powerful CLI tool that allows you to spin up VM instances (primarily on Linode) and automatically configure Coolify for seamless deployment workflows. With minimal UI interactions, you can provision infrastructure, install Coolify, and manage your entire deployment pipeline through the command line.

Author: Scott Williams

Vision

The main vision of this project is to build a tool that can quickly build SaaS web apps systematically using AI and spin up repeatable frameworks for web development, ensuring that vibe coding is guaranteed to work. This tool aims to streamline the entire process from infrastructure provisioning to application deployment, making it easier than ever to build and deploy SaaS applications.

Installation

Install SaasFactory directly from GitHub:

pip install git+https://github.com/scott-williams-2002/saasFactory.git

Or install in development mode:

pip install -e git+https://github.com/scott-williams-2002/saasFactory.git#egg=saasFactory

After installation, you can use the sfy command from anywhere in your terminal.

Prerequisites

  • Linode API Key: You'll need a Linode API token to create and manage VPS instances. You can generate one from your Linode account settings.
  • Python 3.10 or higher

Project Configuration

Each time you use the CLI tool in a new directory, a configuration file (sf_config.yaml) is automatically created to store important project settings, VPS configurations, and Coolify connection details. This ensures your project state is preserved and can be easily managed.

Quick Start

  1. Initialize a new project:

    sfy init --name my-project
  2. Navigate to your project directory:

    cd my-project_sfy_project
  3. Configure and create a VPS instance:

    sfy vps synth --provider linode --api_token YOUR_LINODE_API_TOKEN
    sfy vps up
  4. Install Coolify on your VPS:

    sfy coolify install
  5. Configure Coolify connection:

    sfy coolify synth --api_token YOUR_COOLIFY_API_TOKEN

Commands Reference

Project Management

sfy init

Initialize a new saasFactory project.

Usage:

sfy init [--name PROJECT_NAME] [--path PATH]

Options:

  • --name: Name of the project (defaults to current directory name)
  • --path: Path where the project should be created (defaults to current directory)

Description: Creates a new project directory with configuration files (sf_config.yaml and .env). This is the first step in setting up a new project.


VPS Commands

sfy vps synth

Synthesize a new VPS instance configuration.

Usage:

sfy vps synth --provider PROVIDER [--api_token TOKEN]

Options:

  • --provider: Cloud provider for the VPS instance (currently supports linode)
  • --api_token: VPS Provider API Token (optional, will prompt if not provided)

Description: Configures the VPS instance settings for your project. You can use default configurations or customize them. The API token is stored in your project's .env file.

sfy vps up

Start up the VPS instance.

Usage:

sfy vps up

Description: Creates and starts the VPS instance based on your configuration. Must be run from within the project root directory.

sfy vps down

Deactivate/destroy the VPS instance.

Usage:

sfy vps down

Description: Stops and destroys the VPS instance. This will permanently delete the instance and all associated resources.

sfy vps status

Check the status of the VPS instance.

Usage:

sfy vps status

Description: Displays the current status of your VPS instance (running, stopped, etc.).


Coolify Commands

sfy coolify install

Install Coolify on a VPS instance.

Usage:

sfy coolify install

Description: Installs Coolify on your running VPS instance via SSH. This command will:

  • Update the system packages
  • Upgrade the system
  • Install Coolify using the official installation script

Note: Your VPS instance must be running before executing this command.

sfy coolify synth

Synthesize a new Coolify instance configuration.

Usage:

sfy coolify synth [--api_token TOKEN] [--domain] [--https]

Options:

  • --api_token: Coolify API Token (optional, will prompt if not provided)
  • --domain: Flag to indicate if a domain should be used for the Coolify instance connection
  • --https: Flag to indicate if HTTPS should be used for the Coolify instance connection

Description: Configures the connection settings for your Coolify instance. You can connect via IP address or domain name, and choose between HTTP and HTTPS protocols.

sfy coolify project_create

Create a Coolify project.

Usage:

sfy coolify project_create [--name PROJECT_NAME] [--description DESCRIPTION]

Options:

  • --name: Name of the project (optional)
  • --description: Description of the project (optional)

Description: Creates a new project in your Coolify instance. Projects are used to organize your applications and services.

sfy coolify github_connect

Connect a GitHub repository to a Coolify project.

Usage:

sfy coolify github_connect [--access_token TOKEN]

Options:

  • --access_token: GitHub Access Token (optional, will prompt if not provided)

Description: Connects your GitHub account to Coolify, allowing you to deploy applications directly from your repositories.

sfy coolify service_create

Create a resource/service for a Coolify project.

Usage:

sfy coolify service_create [--product PRODUCT_NAME]

Options:

  • --product: Name of the service/product (e.g., convex, supabase, n8n, pocketbase)

Description: Creates a new service or resource in your Coolify project. Supported products include:

  • convex
  • supabase
  • n8n
  • pocketbase

Typical Workflow

  1. Initialize Project:

    sfy init --name my-saas-app
    cd my-saas-app_sfy_project
  2. Set Up VPS:

    sfy vps synth --provider linode
    sfy vps up
    sfy vps status  # Verify it's running
  3. Install Coolify:

    sfy coolify install
  4. Configure Coolify:

    sfy coolify synth
  5. Create Project and Services:

    sfy coolify project_create --name my-app
    sfy coolify github_connect
    sfy coolify service_create --product supabase

Future Work

We're actively working on exciting new features:

  • Starter Next.js Project Template: Future versions will allow you to create a fully hosted Next.js starter project from a template that will be automatically deployed to your Coolify instance. This will enable rapid prototyping and development of SaaS applications.

  • AI-Powered Development: Integration with AI tools to assist in building SaaS applications systematically.

  • Additional VPS Providers: Support for more cloud providers beyond Linode.

  • Enhanced Automation: Further automation of the deployment pipeline to reduce manual steps.

Contributing

We're looking for contributors to help build this tool! The vision is ambitious, and we welcome anyone interested in:

  • Adding support for additional VPS providers
  • Improving the CLI interface and user experience
  • Building the Next.js starter template functionality
  • Enhancing automation and deployment workflows
  • Documentation improvements
  • Bug fixes and feature enhancements

If you're interested in contributing, please feel free to open issues, submit pull requests, or reach out to discuss how you'd like to help!

License

This project is licensed under the Apache Software License 2.0.

Links

  • Linode - Cloud hosting provider
  • Coolify - Self-hosted PaaS platform

Support

For issues, questions, or contributions, please visit the GitHub repository.


Created by Scott Williams | Making SaaS development faster and more accessible.

About

This repo will store code that lets me automatically spin up/down infrastructure on a VPS using Coolify with minimal UI actions needed

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages