aboutsummaryrefslogtreecommitdiff
path: root/toolkits/overview.md
blob: 93b955c223ba47ebf5928636d16983f02bf063a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

   

Toolkit Overview

back to toolkits /// home

A toolkit is a bundle of tables, permissions, endpoints and optionally scheduled tasks that extends the server for a specific use case.

Types

There are two toolkit types as of JsonDerulo API Spec v2:

Application

Route prefix: /tk/app/{toolkit}/{*path}

Application toolkits are full featured modules with their own UI or client (not intended to be handled by the JDE Server alone). Think of them as apps that use the server as a backend. A POS system, an inventory manager, a monitoring dashboard etc.

Library

Route prefix: /tk/lib/{toolkit}/{*path}

Library toolkits provide shared services or utilities. They exist to be used by application toolkits or serve as seperatable assignable permissions. Think of them as shared backend modules.

The only functional difference is the route prefix. Everything else (permissions, endpoints, config) should work basically the same way.

What a toolkit can define

  • tables: database tables it owns. with option for the jde server to manage system columns on these and enforcing permissions
  • read_only_tables: tables that reject all writes through the API (overwritable by powerlevel)
  • write_protected_columns: extra columns besides system columns that cant be written by normal users
  • endpoints: custom API routes backed by internal logic, HTTP services or executables
  • groups_table: a database table holding toolkit specific group definitions with their own permissions
  • scheduled_queries: SQL like queries that run periodically on a timer
  • auto_generation: rules for auto generating field values (UUIDs, sequential codes, random strings etc)
  • system_column_overrides: per table control over which system columns to skip

Config file structure

Toolkits are one of the few which must follow a configured in TOML files. The main toolkits.toml sets global defaults and can define inline toolkits. Most toolkits live in individual files under the toolkitd/ subdirectory (like toolkitd/beepzone.toml).

Enabling and disabling

Each toolkit has an enabled field (default true). Disabled toolkits are completely ignored, their tables arent registered, their endpoints dont exist and their permissions arent loaded.