An Online Book
Select Theme
An Open Source Project Site
Select Theme
A Presentation
Select Theme
A Diagram
Coming Soon
fpm: FTD Package Manager & Static Site Generator
FPM is a command line tool written in Rust that acts as both package manager for FTD programs as well as static site generator that converts .ftd files to .html files you can ship on Github Pages, Vercel etc.
To create a “fpm package”, create a FPM.ftd file in any folder:
-- import: fpm

-- fpm.package:
We have created a package named Packages in FPM are named after the domain where they would be published. Every FPM package is a website.
Distributed Package Manager
Unlike other package managers like pypi, npm and crates, there is no central package repository in FPM. Since every FPM package is a website, that website acts as the package repository.
FPM support package dependencies. To add a dependency add it in FPM.ftd file:
-- import: fpm

-- fpm.package:

-- fpm.dependency: as ft

Here has a dependency on

We have also used “alias” feature to bind the name of this dependency to ft, so FTD files can write -- import: ft instead of having to use the full path, e.g. -- import:

Fungible Packages - Package Interface

An FPM package contains one or more “ftd modules”, and the modules export one or more “symbols”, eg records, variables, components and so on.

The set of modules and symbols exported by a package is called “package interface” of that package. FPM lets one package declare that it is “implementing” another package. All packages that implement a common package are interchangeable without chaning any code, and only updating the dependency in FPM.ftd file.

Translation Tracking
FPM has a unique translation tracking feature. An FPM package can declare it can be translated by adding a language key:
-- import: fpm

-- fpm.package:
language: English

Here we have declared that this package supports translation by adding the language key. Also we have already got one “accepted translation”,

Once you have enabled translation, you can create a new fpm package, here, and give it a FPM.ftd file:

-- import: fpm

-- fpm.package:
language: hi

This can be your entire package when you create a new translation. When you build a translated FPM package, FPM is aware it is a translation, and it builds all the files in the original, which if, so you do not have to copy any files.

FPM uses a fallback based logic, for every missing file, it builds the corresponding file from original package. So say if index.ftd is missing in Hindi translation, because it is not yet translated, FPM will pick the index.ftd from the English/original version and will be a “complete website”.

Once a file has been created in translation package, it can be in other of three states: a. file exists but has never been accepted, meaning translation has started but not yet finished, b. file is upto date with the original, and c. file was once up to date, but since then English version has changed.

In a and c we show a warning on the genrated pages so readers can see that either the translation is not complete or out of date, and we give quick option to switch to the English/original version. In case if things are out of date, we also show since how long is it out of date and what is the diff in the Enlish version from when Hindi version was last marked up to date, to current English version.

Translation Status
We also create a translation status page that shows a summary information for all languages how many documents are upto date, missing etc.

Checkout what is planned in Roadmap, and day to day updates in the Journal.

Github: Discord: #fpm on FifthTry