EasyFM

JavaScript ❤️ FileMaker

Introducing EasyFM: Your gateway to effortless FileMaker web integration!

EasyFM allows you to connect your NodeJS applications to FileMaker seamlessly! And at no cost!

No more tedious programming or long hours searching through documentation!

No nonsense!

EasyFM handles all the FileMaker connection nonsense for you! You won’t have to worry about API tokens, which endpoints are available, or validating the data returned.

Install via npm

npm install @jd-data-limited/easy-fm

Stream data, seamlessly!

De-mystify your processes!

Developers often waste time learning new Application Programming Interfaces (APIs), frequently needing to learn brand-new and complex concepts. Even for the simplest APIs, developers can spend hours, if not days, figuring out how they work — wasting time and money. This is why developers often strive to find libraries that handle this for them so that they don’t need to learn the complexities of how the APIs communicate.

This is what EasyFM does with FileMaker. EasyFM acts as a thin data layer between FileMaker and NodeJS, hiding all of the nasty ‘session management’ and ‘cookie handling’ so that all you need to worry about is your data. EasyFM handles all the connection nonsense for you, so you don’t have to worry about it.

With EasyFM…

…you have the power! ⚡️

/* Fetch data from your database */
const layout = database.layout("MyLayout")
let query = layout.records.list({portals: []})
let records = await query.fetch()

We’re always looking for feedback and new ideas. If you have any, you can contact us via our contact page, or post your idea/feedback as an issue in our GitHub repository!

Imagine the possibilities

We handle the nasties of FileMaker web integration

EasyFM handles the nasties of integrating FileMaker, making life for you as a developer, easier. Imagine this for example! EasyFM calculates the database requests required, sanitises your query, and heaps in-between! All you need to do is tell it what you want, and off it goes!

Just this...

let query = layout.records.list({portals: {}})
let records = await query.fetch()

…gives you all of this!

First Name Last Name Email
James Dowery
Alice Eddison
Tom Rails

Why EasyFM?

Even portals and relationships work smoothly!

let query = layout.records.list({
    portals: {
        "Classes": {offset: 0, limit: 100}
    }
})
query.addRequest({"FirstName": q`=James`})
query.addRequest({"FirstName": q`=Alice`})
let records = await query.fetch()
First Name Last Name Classes
James Dowery
Name
Maths
English
Alice Eddison
Name
Science

TypeScript ❤️ JavaScript

EasyFM is built with full TypeScript support. This helps ensure that you get the data outputs you expect and makes our codebase self-documenting.

Open-Source

EasyFM fills a void currently left in the FileMaker platform, and is an essential tool moving forward. This is why we’ve open-sourced EasyFM. This will allow the FileMaker platform to advance and the community to grow. EasyFM’s code base is fully available from this GitHub repository: https://github.com/JD-Data-Limited/easy-fm.

MIT License

EasyFM is published under an MIT License. You agree to the terms specified within this license by using the provided software. The entire license agreement is available here: https://github.com/JD-Data-Limited/easy-fm/blob/main/LICENSE.

Getting Started

Getting started with EasyFM is super simple! Just follow these steps to configure your environment and get going!

Prerequisites

FileMaker isn’t like most databases and requires understanding concepts that differ significantly from other databases. We’ve tried our best to make this as easily understandable as possible, but you’ll need a basic understanding of how FileMaker works.

1. First, we need to enable the FileMaker Data API. EasyFM will use this to access your database’s information.

Log in to your FileMaker server’s admin console, then navigate to Connectors > FileMaker Data API.

Tutorial Screenshot

2. To access your database, EasyFM needs a user account. This login requires special extended privileges so that it EasyFM can access it. It is recommended that you give this account a strong password, and limit what resources it can access.

First, open your database with an administrative (Full-Access) account in FileMaker Pro, then navigate to File > Manage > Security.

Tutorial Screenshot

3. We must create a new user account from the security dialogue. Click the ‘+ New’ button in the bottom left-hand corner of the dialogue to create a new account, and assign the new account a name and password.

 

Tutorial Screenshot

4. Next, we need to configure the user account’s privilege set. Under the privilege set dropdown, select ‘New Privilege Set…’.

 

Tutorial Screenshot

5. From the privilege set popup, set a name and permissions for your new privilege set. Ensure the ‘Access via FileMaker Data API (fmrest)’ extended privilege is enabled. EasyFM cannot access the user account if this is not enabled.

 

Tutorial Screenshot

6. Click ‘OK’ to save and close all changes made. At this point, you can now close FileMaker Pro

7. From within your JavaScript project, run the below command to install EasyFM

npm install @jd-data-limited/easy-fm

8. Now, you can set up your project to connect to FileMaker! You can use the below snippet to do that!

import {FMHost} from "@jd-data-limited/easy-fm"

const HOST = new FMHost("https://your-server-here.com/")
const DATABASE = HOST.database({
	database: 'YourDatabase.fmp12',
	credentials: {
		method: 'filemaker', // Use FileMaker's default credentials login method
		username: 'nodejs', // The account name you configured
		password: 'password' // The account password you configured
	},
	externalSources: []
})
DONE!