beta documentation

Overview

What is Treeline?

Treeline allows you to build the back end of a web or mobile application by combining components (aka “machines”) in a visual environment. Your app is then compiled into a Sails.js project that can be downloaded and deployed anywhere. In short, Treeline eliminates the need for specialized knowledge to create back-end apps.

What kind of things can I build with Treeline?

There are no limitations on what you can build with Treeline. For examples you can follow along on our blog or see a YouTube Playlist of screencasts.

Can I make an app on Treeline private? What does it cost?

Private apps will be available soon. During the developer preview all apps are open-source (aka “Public”). These are available for anyone to see and clone*, like public repos on Github. For an example of what a public project looks like see Pokedex. Treeline will always be free for open source apps and a reasonable monthly fee for private apps, to be determined soon. Note: to ensure security, project configuration data is never viewable or cloneable, even for public apps.

Are there any starter projects (aka templates) for me to use?

We are currently working on template apps. Please send us a request here for templates you’d like us to produce.

Can multiple users collaborate on a single Treeline app?

Treeline currently supports single developers, but support for teams/organizations is very high on our roadmap.

Treeline and Sails.js

What’s the difference between Treeline and Sails.js? Does Treeline replace Sails.js?

Treeline allows you to design and build apps in a visual interface. These apps are then compiled into full Sails.js projects, including all the code. So using Treeline doesn’t replace Sails—what it does is make it easier to create Sails apps.

Can I import an existing Sails project into Treeline?

Treeline doesn’t support importing existing backend code. However, your front-end assets and views are fully compatible with Treeline.

Developing using Treeline

How do I see the code for my app?

You can download the generated code for a Treeline app by linking it to a project on your local machine with our command-line tool. Instructions are available on the Overview page of each app you create in Treeline. While you have your local project linked to Treeline, it will automatically keep in sync with any changes you make online.

How are Treeline apps hosted? Can I host with <insert provider here>?

When you build an app with Treeline, the system generates a fully functional Sails.js app for you—code and all—that you can then download with a simple tool and deploy anywhere that supports Node apps. Additionally, Treeline provides a free preview server for your app that you can use for testing*.

Is there a front-end SDK for Treeline?

SDKs for all of your favorite front-end frameworks like Angular, Ember and Backbone are coming soon, as well as iOS and Android SDKs. In the meantime, interacting with Treeline on the front-end is as simple as making an AJAX request to any of the routes that you’ve set up in your app (for example by using $.get in jQuery or $http in Angular).

Can I use Treeline with a front-end tool?

Absolutely. A local Treeline project is a Sails app and therefore can be used to deliver front-end assets or used solely as an API.

Can I compile to another language?

Currently Treeline only compiles Node.js (Javascript) applications using the Sails.js framework.

Machines and machinepacks

What is a machine?

A machine is a small component in Treeline intended to perform a single, simple task. Machines exist for a huge range of applications—everything from compressing files, to sending a Tweet, to low-level application logic—and because Treeline is built on top of the open-source Sails.js framework, there is a huge community of developers contributing new machines every day. If a machine doesn’t exist for a particular application you need, you can build one right from within Treeline.

How do I make a machinepack?

You can create machinepacks right from withing Treeline by clicking on “Packages” in your account overview and then clicking the “New Machinepack” button. You can also create machinepacks offline and upload them to NPM—these packs are imported into Treeline hourly. Node-machine.org has a tutorial about creating your own machinepacks this way.

How do I share code / machinepacks?

All public machinepacks are made available to other users via the “Browse More” button in the circuit editor or the “Import New Machinepack” button on the Dependencies page.

Models

How do I create relationships (aka assocations) between data models?

Treeline doesn’t currently support associations between models natively—it’s high up on our road map for the full launch. In the meantime you can add the foreign keys (and “join models” for many-to-many relationships) yourself as attributes in the Treeline model builder.

Can I use string IDs for my data models?

Currently models use integer IDs, but they will work with any adapter supported by Sails.

Can I add model validations / uniqueness constraints?

Validationa are not currently supported directly in the model builder, but you can create a machine to do validations in your routes.