πŸ’Ώ
Installation

Quick install instructions

If you just want to see something running without configuring anything:
  1. 1.
    Download the latest release​
  2. 2.
    Run mix setup
  3. 3.
    Run mix phx.server

Comprehensive install instructions

1. Download and unzip a release

We recommend downloading the latest version from a "Release" (either from Github or our downloads page).
It is possible to clone from the main branch - there is a slightly higher chance of bugs (although we will endeavour to keep the main branch as stable as possible).

2. Install Elixir & Erlang with asdf

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:
1
brew install coreutils curl git gnupg gnupg2
2
brew install asdf
3
​
4
# Add executable to your terminal setup file.
5
# Bash users:
6
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.bash_profile
7
​
8
# zsh users
9
echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc
10
​
11
# Reload your terminal
12
asdf plugin add erlang
13
asdf plugin add elixir
14
​
15
# Navigate to the root of your Petal Pro folder
16
# Check the file .tool-versions - these are the version we will use.
17
asdf install
Copied!

3. Rename your project

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 script file included that will rename your project to anything you like in one go. Open the file rename_phoenix_project.sh and read the instructions at the top.

4. Run the setup command

In your terminal, run the command:
1
mix setup
Copied!
This will fetch dependencies, create and migrate your database, and run the seeds script (creates and admin user and some dummy users).

5. Install chromedriver

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:
1
brew install --cask chromedriver
2
​
3
# You may also need to run this (if it says something like "Unable to open chromedriver"):
4
xattr -d com.apple.quarantine $(which chromedriver)
Copied!

6. Run the server

1
mix phx.server
2
​
3
# Or, if you want IEX running at the same time:
4
iex -S mix phx.server
Copied!
Now you can visit localhost:4000 from your browser.

7. Add in your branding and details (can be done later)

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.

Other tools we use to help develop web apps

  • ​iTerm2 to replace Mac terminal
  • ​Fig to enhance your terminal
  • ​ZSH Prezto to replace BASH with zsh within the terminal
  • Database GUI - pick one based on your budget:
  • ​SourceTree to help use git
  • ​Dash for near instantaneous documentation. Useful when you keep looking up Elixir functions like String.match?.
  • ​Linear for issue tracking
  • ​Figma for design
  • ​Raycast to replace spotlight

Contributing

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.