How to set up a solution

A how to guide for doing the initial set up of a solution.

Prerequisites

1. Set up your Packhunt folder

  • Create a folder on your local computer to store all your Packhunt solutions. We’ll refer to this as your “Packhunt” folder.

For example C:\Users\John\Documents\packhunt\

2. Set up your solution folder

  • Your solution folder should contain all the files related to your solution including the configuration file, Rhino Grasshopper files and images used in the solution.

  • In your Packhunt folder, create a folder for your first solution. We refer to this as your “solution” folder.

For example C:\Users\John\Documents\packhunt\xyz-solution\

ℹ️ The name of your solution folder can be used to generate the name of the solution and will become part of the URL that is used to access your solution.

❗ The name must be globally unique start with a lowercase letter and may only contain lowercase alphanumerics and dashes(-).

3. Open your Packhunt folder in VSCode

To open your Packhunt folder containing your solution folder:

  • Open VSCode.
  • Go to File and select Open Folder.
  • When prompted, select your Packhunt folder.

The folder hierarchy should look like the image below.

4. Configure your solution

Configuration files are written in a YAML text file (YAML stands for “yet another markup language”). To create a configuration file:

  • In VSCode file explorer, create a new file called  solution.yaml For example C:\Users\John\Documents\packhunt\xyz-solution\solution.yaml

The solution folder should contain the solution.yaml file as shown below.

  • To configure a solution, add the following lines to your solution.yaml file.
  kind: Solution
  version: v0

💡 See the schema tips on how to use auto-complete.

5. Deploy your solution

  • Open the terminal window in VSCode. Find out more about how to open a terminal window in your OS.

  • In the terminal window, make sure that you are in your Packhunt folder.

    • If not, navigate to the parent folder where you created your solution folder.

    • On Windows (Powershell), MacOS and Linux, use the cd command. For example:

      cd C:\Users\John\Documents\packhunt\

  • To deploy your solution run the following command in the terminal.

    ph deploy solution -o <org-slug> <solution-name>

    For example, let’s say your organisation is johnsmith and your solution’s name is xyz-solution

    C:\Users\John\Documents\packhunt> ph deploy solution -o johnsmith xyz-solution

    💡 Your solution’s name is the same as your solution folder’s name.

  • If deployment succeeded, you should see the following:

    Running deployment for solution 'xyz-solution' in organisation 'johnsmith'
    
    √ Running checks
    √ Deploying template
    √ Deploying project
    
    Successfully deployed solution 'xyz-solution'
    
    🚀 Your solution is available at: https://app.packhunt.io/xyz-solution
    

6. View your web-app

  • To view your web-app, copy the solution URL that is shown in the terminal window.
    • In the example, the URL would be https://app.packhunt.io/xyz-solution.
  • Open the copied URL in one of our supported browsers.
  • You can also access the web-app via the Developer Platform.

After following the steps above, your web app should look empty, as shown in the example below.

For more explanation on solutions, see the configuring solutions fundamentals page.

Configuration

See the solution configuration docs for more information.

Next steps

Define the pages and their flow