Saltcorn code base

Repository structure

Saltcorn is written in server side JavaScript targeting the node.js framework.

The core Saltcorn code base is located in the Saltcorn GitHub repository. This is a monorepo, meaning that it contains multiple packages, in the packages/ directory. The monorepo is managed by the lerna tool, which helps to tie together and synchronise the different packages, and the npm package manager which installs dependencies.

The most important packages are:

saltcorn-data package

This package is the core of the project and it deals with the definition of entities (tables, fields, pages etc.) and their persistence to a database.

saltcorn-markup package

This package contains utilities to help create HTML markup from JavaScript code. The base of this package is the tags module which exports functions that generate HTML.

server package

Defines the routes and the core HTTP server process, which handles both the administration and serving data to the user. The Saltcorn server is based on the express framework.

saltcorn-cli package

Code for the command line interface executable saltcorn based on the oclif commandline framework.

Design by Contract


Randomised test infrastructure