Skip to content

Quick Start Guide

Brayden edited this page Dec 19, 2022 · 41 revisions

Overview

This guide will have get FML engine running and setup to process user requests from all devices / platforms. We will walk through configuring the backend and then you can test it out using any/all of your favorite platforms. Afterwards you will be able to create your first template using FML on the application frontend.

Table of Contents

A few precursory notes:

If you want to try FML without using a backend server you can download our Offline Desktop Application to use with templates stored locally.

This guide will cover the basics of getting an FML application running from scratch using a pre-compiled version. If you are looking to modify and compile your own version complete that first and then proceed through this guide.

Download the FML Server

The FML Server is already pre-compiled for simplicity, move the contents to the root directory of the web server.

Download FML Server

This contains the web backend engine and some crucial files used for all of our platforms.

Configure the Backend for FML

For this guide there are a few basic requirements to get a functioning backend for FML applications.

Create a file at the root called config.xml (all lowercase), the config file provides all (except offline desktop) application platforms with the initial values they need to operate. The config.xml must have read access permissions and be served at the root, ex: https://fml.dev/config.xml.

Open the config.xml file you created and paste in the following:

<FML>
    <CONFIG>
        <APP_ICON               value="logo.png"/>
        <APPLICATION_NAME       value="Flutter Markup Language"/>
        <BRIGHTNESS             value="light"/>
        <COLOR_SCHEME           value="lightblue"/>
        <!-- <FONT                   value=""/> -->
        <HOME_PAGE              value="assets/templates/home.xml"/>
        <!-- <LOGIN_PAGE             value=""/> -->
        <!-- <UNAUTHORIZED_PAGE      value=""/> -->
        <!-- <MIRROR_API             value=""/> -->
        <REFRESH                value="true"/>
        <!-- <FIREBASE_API_KEY       value=""/> -->
        <!-- <FIREBASE_AUTH_DOMAIN   value=""/> -->
    </CONFIG>
</FML>

We're going to modify the HOME_PAGE value, to learn more about the other configuration values click here.

For fml.dev our home page template is called home.xml and it sits under assets/templates, so our configured HOME_PAGE is set to value="assets/templates/home.xml". This must be a relative path from the root of the server (root>assets>templates>home.xml).

When a user first connects to your application the HOME_PAGE is the template file they will be served, you can place the template file anywhere within the root, but, as before, ensure it has read access permissions. Alternatively you can create an api to serve it from an end-point you choose.

You could also change the APPLICATION_NAME while you have the config open :)

If you want more information about the configuration file click here

Running the Application

Web

Enter the address of your web server, it will run the application in the browser on any device.

Mobile

Connect from mobile

Android

You can download the apk from our website here or download our Android application from the Play Store and from the portal you can input the backend server address.

iOS

Without compiling the code the only option for iOS devices is to download our iOS application from the App Store and then from the portal you can input the backend server address.

Desktop

Windows

You can download the .exe from our website here

MacOS

You can download the .dmg from our website here

Offline Desktop Application

Currently only supported on Windows, download here

The offline application runs from a template stored on the local system and can exclusively use local templates or a hybrid of offline and templates from a web url.

The config.xml is stored locally within data > flutter_assets > assets and is pre-configured to retrieve the HOME_PAGE from value="file://templates/localtemplate.xml" (assets/templates).

Notice that when referencing local templates within the Offline Desktop Application file:// is prepended onto the url.

Offline Application Assets

Conclusion

You now have everything setup to host and serve FML templates across all platforms. We recommend using the links below which explain using Flutter Markup Language to build applications from templates.

Whats next?

Clone this wiki locally