πŸ’ΏInstallation

Prerequisites

You will need:

  • a paid subscriptionarrow-up-right to Petal Pro (or be part of a team with a paid subscription)

  • 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

Quick install instructions

If you just want to see something running without configuring anything:

  1. Run mix setup

  2. Run mix phx.server

You can now sign in as admin:

Or a normal user:

Comprehensive install instructions

1. Download and unzip a release

We recommend downloading the latest version from a proper "Release" (either from Githubarrow-up-right or via a Project).

To download via a project you first need to go to the projects pagearrow-up-right and create one:

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.

2. Install Elixir & Erlang with asdf

If you already have Elixir and Erlang installed you can skip to the next section.

We recommend using asdfarrow-up-right to manage your Elixir and Erlang versions. It allows you to have multiple versions on your computer.

For Macs using Homebrew:

circle-exclamation

Your app module is currently called PetalPro. There is a hex package to help you rename:

This package enables you to use this command:

4. Run the setup command

In your terminal, run the command:

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 Chromedriverarrow-up-right (we utilize Wallabyarrow-up-right for e2e tests). On a Mac you can install it with:

6. Run the server

Now you can visit localhost:4000arrow-up-right from your browser.

You can now sign in as admin:

Or a normal user:

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.

8. Look over our recipes

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.

Other tools we use to help develop web apps

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.

Was this helpful?