Installations
npm install @luomus/laji-form-builder
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
20.10.0
NPM Version
10.5.2
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (95.46%)
SCSS (2.35%)
JavaScript (1.97%)
HTML (0.16%)
Dockerfile (0.07%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
luomus
Download Statistics
Total Downloads
1,316
Last Day
2
Last Week
6
Last Month
41
Last Year
732
GitHub Statistics
MIT License
688 Commits
4 Watchers
2 Branches
3 Contributors
Updated on Jun 19, 2024
Bundle Size
2.34 MB
Minified
644.91 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.8
Package Id
@luomus/laji-form-builder@1.1.8
Unpacked Size
453.45 kB
Size
92.44 kB
File Count
91
NPM Version
10.5.2
Node Version
20.10.0
Published on
Apr 26, 2024
Total Downloads
Cumulative downloads
Total Downloads
1,316
Last Day
100%
2
Compared to previous day
Last Week
100%
6
Compared to previous week
Last Month
5.1%
41
Compared to previous month
Last Year
25.3%
732
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
19
Dev Dependencies
42
laji-form-builder
This repo is responsible for two things:
- the server aka form backend which runs at https://form.laji.fi
- the client which is a React component for editing forms. Available as an npm package
laji-form-builder
.
Server API
/?{lang:fi | en | sv = fi}
UI for selecting/deleting a form/:id?{lang:fi | en | sv = fi}
UI for editing a form
REST JSON API /api
:
/api?{lang?: fi | en | sv}
list forms as JSON/api/:id?{lang?: fi | en | sv, format: json | schema | schema-with-enums = json, expand: true | false = true}
list forms as JSON/api
(POST
) Create new form entry/api/:id
(PUT
) Update form entry/api/:id
(DELETE
) Delete form entry/api/transform?{lang?: fi | en | sv}
(POST
) Transform BODY fromjson
format toschema
format/api/flush
flushes cache
Client API
For documentation, see how the server uses the Builder
component: https://github.com/luomus/laji-form-builder/blob/master/src/server/view/app.tsx
Development
Stack
- node
- TypeScript
- express
- React
- playwright (e2e tests)
- supertest (express tests)
Correct node version is selected with volta
or nvm use default
.
Install dependencies
npm ci
Configuration
Copy config.json.example
to config.json
, and fill the configuration file.
Development
Start the development server (it's the same as the production server but with hot reload enabled so code changed are reflected upon file changes):
npm start
Tests
Server
Server is tested without having to run the server. Just run:
npm run test:server
Env variables:
MOCK=true
: Field service test API requests are mocked by default.
Client
Server can be running or or not. If it's not running, it will be automatically started.
npm run test:client
Dependencies
To run the tests, you might need to install playwright dependencies:
npx playwright install
If you run into issues with browser dependencies etc, there's also a dockerized runner:
# Run all tests (builds docker image & runs it)
npm run test:docker
# Or if you want to give playwright params, run certain tests etc:
npm run test:docker -- test/client/editor.ts --project chromium
Build
Server
To build the server (compiles both static
and build
):
npm run build:server
In production, run the built server with:
npm run start:prod
npm package
To build the npm package (compiles lib
):
npm run build:client
Publishing to npm
Run npm version {patch,minor,major}
. This will run the linting & front end tests (and halt if they fail), build the client and publish to npm. We follow semantic versioning.

No vulnerabilities found.

No security vulnerabilities found.