LogoLogo
  • Introduction
    • 👋Overview
    • 🤷Target Audience
    • ✨Features
  • Getting started
    • 🖥️System Requirements
    • 📦Installation
    • ⚙️Configuration
    • 🔧Setup Routine
  • Fundementals
    • 🎎Roles
    • 🌏Countries and time zones
    • ♻️Scheduletask concept
    • 💰Payment Service Provider
    • ✏️Administration
      • 🔵Sales
        • 👥Customers
        • 📥Invoices
        • 📋Plans
        • 🧊Modules
      • 🟢System
        • 🎛️System settings
        • ⛓️API Settings
        • 🌐Languages
        • 🪙Currencies
        • 🏳️Countries
        • 📂Mappings
        • 💬Translations
        • 🪧Widgets
    • 🖱️User guide
      • 🔐Customer rights
      • 🔗Customer Navigation
      • 📃Edit profile
      • 🔑Reset password
      • 🏨Edit company
      • ⚡Manage users
      • 👔Manage tenants
      • 📨View invoices
      • 💸Add payment method
      • 🪧Manage plans
      • 📦Manage modules
      • 🔔Notifications
  • Development
    • 🛠️Local development
    • 📂Folder structure
      • 🗄️Application.cfc
    • 💡Develop with saaster
      • 🎇General services
        • 💼Mappings and rigths management
        • ↩️Redirects
        • 👤Customer specific sessions
        • 〽️Global variable "getCustomerData"
      • 🌐Global functions
        • ⚙️getTrans()
        • ⚙️getAlert()
        • ⚙️logWrite()
        • ⚙️getTime()
      • 🧊Developing the main application
      • 📦Developing modules
  • API
    • ⚒️API: Get started
    • 📂Resources
      • 📄authenticate
      • 📄getCurrentModules
      • 📄getCurrentPlan
      • 📄getPlanFeatureSetting
Powered by GitBook
On this page
  • Prerequisites
  • Setup
  • Clone the repository
  • Config files
  • Start the application
  • Seeding MySQL files
  • Rebuild database
  • Mockdata
  1. Development

Local development

Get a local saaster development environment running

PreviousNotificationsNextFolder structure

Last updated 1 year ago

Whether you're looking to contribute to saaster or build your own SaaS application, you'll need a development environment. We recommend using the dockerized development environment provided by saaster. The following guide will take you through the steps to set up your development environment and get you ready to start building.

Prerequisites

Windows:

  • with any Distrobution for example: In Docker Desktop enable WSL Integration with the distro you choosed.

  • make (Install in WSL2 distro)

Linux:

  • Docker

  • Docker Compose

  • make

MacOS:

  • make (Install over xcode)

Setup

Clone the repository

git clone https://github.com/PAWECOGmbH/saaster

Config files

You can find some example config files in the "configs" folder of the repository. Copy them to the root directory of the application and rename them as followed:

config/example.cfconfig.json   ->   /.cfconfig.json
config/example.env             ->   /.env
config/example.server.json     ->   /server.json
config/example.config.cfm      ->   /config.cfm

These files should work out of the box. You can obviously change the values of these configs to your liking.

Start the application

Now you can start the application. Open any console* in the root application directory and execute the following commands:

*On Windows you need to use the WSL distro to use make. The filesystem of Windows is normally mounted under /mnt on your WSL system.

make

This will output all possible commands:

Makefile commands:
dev                     -> creates the local development environment      
reinit                  -> reinites the database
seed                    -> seeds certain sql files
clean                   -> removes full application with all containers
url                     -> outputs all importent URL's of the application

Now enter make dev and let the application build. If everything worked out, then it should display the URL's:

------------------------------------------------------
Saaster: http://localhost/login
Mailslurper: http://localhost:9000
Lucee Admin: http://localhost/lucee/admin/server.cfm
------------------------------------------------------

Seeding MySQL files

In the directory db/dev you find some SQL files. These files provide you with example data and basic configuration for saaster.

To execute these files, use the following make command:

make seed

Then enter the number of the sql file you would like to seed.

[1] create-plans.sql   
[2] create-widgets.sql 
[3] create-sysadmin.sql
[4] create-modules.sql 
Choose a number: 3

We recommend using this scripts in your local development environment. The create-sysadmin scripts adds an account with following credentials:

User

admin@saaster.io

Password

testtest

Rebuild database

To completly rebuild the database, you can use the make target reinit. This command rebuilds the complete MySQL container and executes all the scripts in the db/init directory.

make reinit

Mockdata

If you need some customers or invoices while developing, you can make use of the mockdata generator we implementet.

You can access it under /setup/mockdata/index.cfm

🛠️
Docker Desktop
WSL2
Ubuntu
Docker Desktop