Comment on page
💿
Installation
You will need:
- this guide is written from the point of view of a Mac. However, it shouldn't be hard to find the equivalents for Linux or Windows
If you just want to see something running without configuring anything:
- 1.
- 2.
- 3.Run
mix setup
- 4.Run
mix phx.server
You can now sign in as admin:
- Email:
[email protected]
- Password:
password
Or a normal user:
- Email:
[email protected]
- Password:
password
We recommend downloading the latest version from a proper "Release" (either from Github or via a Project).

Create a new Petal Pro project
Then you can download:

Download the zip file
Done!
If you're a Github member it is possible to clone from the
main
branch, but we don't recommend it because there is a higher chance of bugs. Before each release, we do comprehensive testing and ensure the docs are up to date.Our premium components are stored in a private hex package called
petal_framework
. To be able to use this private package we need to make your local hex aware of the petal
registry. Normally you use hex.pm
as a registry, but in this case we want to use petal.build/repo
. Luckily it only takes one command, but the command is unique to everyone as it involes using your license key. To see your command please see the Petal Framework installation docs.
If you already have Elixir and Erlang installed you can skip to the next section.
We recommend using asdf to manage your Elixir and Erlang versions. It allows you to have multiple versions on your computer.
For Macs using Homebrew:
brew install coreutils curl git gnupg gnupg2
brew install asdf
# Add executable to your terminal setup file.
# Bash users:
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.bash_profile
# zsh users
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc
# Reload your terminal
asdf plugin add erlang
asdf plugin add elixir
# Navigate to the root of your Petal Pro folder
# Check the file .tool-versions - these are the version we will use.
asdf install
Warning: if you plan to merge in future Petal Pro commits (eg. if you're waiting for an upcoming feature like payment handling), then perhaps hold off renaming as it makes merging harder.
Your app module is currently called
PetalPro
. There is a hex package to help you rename:# mix.exs
{:rename_project, "~> 0.1.0", only: :dev, runtime: false}
This package enables you to use this command:
mix rename PetalPro YourNewName
In your terminal, run the command:
mix setup
This will fetch dependencies, create and migrate your database, and run the seeds script (creates and admin user and some dummy users).
In order for tests to work, you will need to install Chromedriver (we utilize Wallaby for e2e tests). On a Mac you can install it with:
brew install --cask chromedriver
# You may also need to run this (if it says something like "Unable to open chromedriver"):
xattr -d com.apple.quarantine $(which chromedriver)
mix phx.server
# Or, if you want IEX running at the same time:
iex -S mix phx.server
You can now sign in as admin:
- Email:
[email protected]
- Password:
password
Or a normal user:
- Email:
[email protected]
- Password:
password
We have added comments throughout the codebase providing instructions on how to add in your app details and branding. Simply do a global find in your code editor for the text "SETUP_TODO" and follow the instructions.
We have some recipes to cover common use cases that aren't part of the normal setup. For example, UUID's instead of ordinary IDs. You can git cherry pick them into your codebase. Check them out here.
- Dash for near instantaneous documentation. Useful when you keep looking up Elixir functions like
String.match?
.
Petal Pro is a paid product but we welcome PR's if you find small bugs / typos / improvements. Let us know if you want to contribute in a more significant way and we can offer unlimited membership in return.
Last modified 4mo ago