The best way to get started fast with SaQle is to install the accompanying starter project hosted on github.
It is important that you install this project via composer
Inside the directory where you want to create a new application, run the following command in your terminal to download the starter project. Replace project_name with a name of your choosing
composer create-project mrogwang/saqle-project project_name
Once the installation is complete, open the project_dir/env/development/.env file and update your environment variables to reflect your setup
project_dir/env/development/.env
APP_NAME="Your Application Name"
COOKIE_DOMAIN=your-domain.local
ROOT_DOMAIN=your-domain.local
DB_HOST=localhost
DB_USER_NAME=your-db-user
DB_PASSWORD=your-db-password
DB_NAME=your-db-name
EMAIL_USER_NAME=your-email-user
EMAIL_PASSWORD=your-email-password
EMAIL_HOST=your-email-host
EMAIL_PORT=your-email-port
EMAIL_SENDER_ADDRESS=your-email-address
DISPLAY_ERRORS=1
DISPLAY_STARTUP_ERRORS=1
JWT_KEY=your-jwt-key
JWT_TTL=3600
MEDIA_ENCRYPT_KEY=your-media-encryption-key
MEDIA_ENCRYPT_SALT=your-media-encryption-salt
Cd into project root and run the following command
php saqle make:migrations -n=Initial
Your project's initial migrations are created in: project_dir/databases/migrations
Your project's initial database snapshots are created in: project_dir/databases/snapshots
We will discuss these much more later
Cd into project root and run the following command
php saqle migrate
If the migration runs successfully, you should have a database with your project's name and some tables that come with the starter project created in it
SaQle comes with an in built administrator panel that can help you start managing data immediately.
To log into this panel, you will need to create a super user account
Cd into project root and run the following command
php saqle make:superuser
This command runs interactively. Provide all the information required.
Once the command runs, you should have a super user account created with the user name and password
you provided. You can log into the admin panel at: your-root-domain/saqle/signin
We will discuss the admin panels further in later sections
If the steps above completed without any problems, your application will be available at: http://your-domain
Example: http://localhost
Congratulations! You have created your first application with SaQle