ApiLogicServer 14.4.0__py3-none-any.whl → 14.5.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. api_logic_server_cli/add_cust/add_cust.py +269 -0
  2. api_logic_server_cli/api_logic_server.py +18 -238
  3. api_logic_server_cli/api_logic_server_info.yaml +3 -3
  4. api_logic_server_cli/cli.py +38 -28
  5. api_logic_server_cli/create_from_model/__pycache__/api_logic_server_utils.cpython-312.pyc +0 -0
  6. api_logic_server_cli/create_from_model/__pycache__/dbml.cpython-312.pyc +0 -0
  7. api_logic_server_cli/create_from_model/__pycache__/ont_build.cpython-312.pyc +0 -0
  8. api_logic_server_cli/create_from_model/__pycache__/ont_create.cpython-312.pyc +0 -0
  9. api_logic_server_cli/create_from_model/api_logic_server_utils.py +47 -0
  10. api_logic_server_cli/create_from_model/dbml.py +113 -58
  11. api_logic_server_cli/create_from_model/ont_build.py +83 -60
  12. api_logic_server_cli/create_from_model/ont_create.py +2 -1
  13. api_logic_server_cli/database/basic_demo.sqlite +0 -0
  14. api_logic_server_cli/database/basic_demo.txt +1 -0
  15. api_logic_server_cli/database/basic_demo_wg.sqlite +0 -0
  16. api_logic_server_cli/manager.py +3 -2
  17. api_logic_server_cli/prototypes/base/.vscode/launch.json +3 -2
  18. api_logic_server_cli/prototypes/base/config/config.py +66 -11
  19. api_logic_server_cli/prototypes/base/config/default.env +7 -1
  20. api_logic_server_cli/prototypes/base/database/test_data/readme.md +2 -1
  21. api_logic_server_cli/prototypes/base/integration/kafka/kafka_producer.py +5 -2
  22. api_logic_server_cli/prototypes/base/integration/n8n/n8n_producer.py +68 -21
  23. api_logic_server_cli/prototypes/base/integration/n8n/n8n_readme.md +19 -0
  24. api_logic_server_cli/prototypes/base/test/basic/server_test.py +1 -1
  25. api_logic_server_cli/prototypes/basic_demo/README.md +29 -52
  26. api_logic_server_cli/prototypes/basic_demo/customizations/api/.DS_Store +0 -0
  27. api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/mcp_discovery.py +139 -0
  28. api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/openapi.py +92 -0
  29. api_logic_server_cli/prototypes/basic_demo/customizations/config/default.env +13 -0
  30. api_logic_server_cli/prototypes/basic_demo/customizations/config/server_setup.py +388 -0
  31. api_logic_server_cli/prototypes/basic_demo/customizations/database/db.sqlite +0 -0
  32. api_logic_server_cli/prototypes/basic_demo/customizations/database/models.py +131 -0
  33. api_logic_server_cli/prototypes/basic_demo/customizations/database/system/SAFRSBaseX.py +136 -0
  34. api_logic_server_cli/prototypes/basic_demo/customizations/integration/.DS_Store +0 -0
  35. api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/.DS_Store +0 -0
  36. api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/README_mcp.md +15 -0
  37. api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_client_executor.py +350 -0
  38. api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_schema.txt +47 -0
  39. api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_server_discovery.json +9 -0
  40. api_logic_server_cli/prototypes/{nw_no_cust/integration/mcp → basic_demo/customizations/integration/openai_function}/3_executor_test_agent.py +20 -6
  41. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/README_functon.md +201 -0
  42. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/ai_plugin.json +17 -0
  43. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/nw-swagger_3.json +1731 -0
  44. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/snippets.txt +5 -0
  45. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3 genai_demo_with_get.json +1731 -0
  46. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3.json +1782 -0
  47. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3_genai_demo.json +264 -0
  48. api_logic_server_cli/prototypes/basic_demo/customizations/integration/openai_function/swagger_3_genai_demo_with_update.json +1782 -0
  49. api_logic_server_cli/prototypes/basic_demo/customizations/logic/declare_logic.py +79 -41
  50. api_logic_server_cli/prototypes/basic_demo/customizations/security/declare_security.py +11 -12
  51. api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/admin.yaml +166 -0
  52. api_logic_server_cli/prototypes/basic_demo/iteration/api/{customize_api.py → api_discovery/order_b2b.py} +17 -23
  53. api_logic_server_cli/prototypes/basic_demo/iteration/database/db.sqlite +0 -0
  54. api_logic_server_cli/prototypes/basic_demo/iteration/integration/row_dict_maps/OrderB2B.py +6 -5
  55. api_logic_server_cli/prototypes/basic_demo/iteration/integration/row_dict_maps/OrderShipping.py +4 -4
  56. api_logic_server_cli/prototypes/basic_demo/iteration/logic/declare_logic.py +69 -43
  57. api_logic_server_cli/prototypes/basic_demo/iteration/ui/admin/admin.yaml +125 -50
  58. api_logic_server_cli/prototypes/manager/README.md +4 -0
  59. api_logic_server_cli/prototypes/nw/logic/declare_logic.py +2 -2
  60. api_logic_server_cli/prototypes/nw_no_cust/.obsidian/app.json +1 -0
  61. api_logic_server_cli/prototypes/nw_no_cust/.obsidian/appearance.json +1 -0
  62. api_logic_server_cli/prototypes/nw_no_cust/.obsidian/core-plugins.json +31 -0
  63. api_logic_server_cli/prototypes/nw_no_cust/.obsidian/workspace.json +166 -0
  64. api_logic_server_cli/prototypes/nw_no_cust/Tutorial.md +45 -26
  65. api_logic_server_cli/prototypes/nw_no_cust/api/api_discovery/openapi.py +130 -0
  66. api_logic_server_cli/prototypes/nw_no_cust/api/api_discovery/proper_update_def.json +71 -0
  67. api_logic_server_cli/prototypes/nw_no_cust/config/default.env +13 -0
  68. api_logic_server_cli/prototypes/ont_app/ontimize_seed/package-lock.json +9725 -1180
  69. api_logic_server_cli/prototypes/ont_app/ontimize_seed/package.json +3 -6
  70. api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/app/shared/app.services.config.ts +1 -1
  71. api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/assets/css/app.scss +4 -0
  72. api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/assets/i18n/en.json +1 -1
  73. api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/assets/i18n/es.json +14 -12
  74. api_logic_server_cli/prototypes/ont_app/templates/app_config.jinja +1 -1
  75. api_logic_server_cli/prototypes/ont_app/templates/date_template.html +1 -1
  76. api_logic_server_cli/prototypes/ont_app/templates/textarea_template.html +1 -1
  77. api_logic_server_cli/prototypes/ont_app/templates/timestamp_template.html +1 -1
  78. api_logic_server_cli/prototypes/sample_ai/logic/declare_logic.py +30 -13
  79. apilogicserver-14.5.3.dist-info/METADATA +168 -0
  80. {apilogicserver-14.4.0.dist-info → apilogicserver-14.5.3.dist-info}/RECORD +84 -61
  81. {apilogicserver-14.4.0.dist-info → apilogicserver-14.5.3.dist-info}/WHEEL +1 -1
  82. api_logic_server_cli/prototypes/basic_demo/apply_customizations.ps1 +0 -17
  83. api_logic_server_cli/prototypes/basic_demo/apply_customizations.sh +0 -14
  84. api_logic_server_cli/prototypes/basic_demo/apply_iteration.ps1 +0 -20
  85. api_logic_server_cli/prototypes/basic_demo/apply_iteration.sh +0 -15
  86. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/1_langchain_loader.py +0 -19
  87. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/2_gpt_mcp_prompt.txt +0 -19
  88. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/README.md +0 -17
  89. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/curl.txt +0 -4
  90. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/nw_swagger_3.yaml +0 -16660
  91. api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/run_executor.py +0 -23
  92. apilogicserver-14.4.0.dist-info/METADATA +0 -76
  93. {apilogicserver-14.4.0.dist-info → apilogicserver-14.5.3.dist-info}/entry_points.txt +0 -0
  94. {apilogicserver-14.4.0.dist-info → apilogicserver-14.5.3.dist-info}/licenses/LICENSE +0 -0
  95. {apilogicserver-14.4.0.dist-info → apilogicserver-14.5.3.dist-info}/top_level.txt +0 -0
@@ -1,105 +1,180 @@
1
1
  about:
2
- date: November 07, 2023 19:47:04
2
+ date: May 13, 2025 20:12:31
3
3
  merged:
4
- at: November 07, 2023 19:48:02
5
- new_attributes: 'Product.CarbonNeutral '
6
- new_resources: ''
7
- new_tab_groups: ''
4
+ at: May 13, 2025 20:15:21
5
+ new_attributes: 'Customer.email Order.CreatedOn '
6
+ new_resources: 'Email '
7
+ new_tab_groups: 'Customer.EmailList '
8
8
  recent_changes: works with modified safrs-react-admin
9
9
  version: 0.0.0
10
10
  api_root: '{http_type}://{swagger_host}:{port}/{api}'
11
- authentication:
12
- endpoint: '{http_type}://{swagger_host}:{port}/api/auth/login'
11
+ authentication: '{system-default}'
13
12
  info:
14
- number_relationships: 3
15
- number_tables: 4
13
+ number_relationships: 4
14
+ number_tables: 5
15
+ info_toggle_checked: true
16
16
  resources:
17
17
  Customer:
18
18
  attributes:
19
- - label: ' Name*'
20
- name: Name
21
- required: true
19
+ - label: ' name*'
20
+ name: name
22
21
  search: true
23
22
  sort: true
24
- - name: Balance
25
- - name: CreditLimit
26
- - name: Region
27
- - name: ContactName
28
- - name: CustomerID
23
+ - name: balance
24
+ type: DECIMAL
25
+ - name: credit_limit
26
+ type: DECIMAL
27
+ - name: id
28
+ - name: email
29
+ - name: email_opt_out
30
+ type: BOOLEAN
31
+ description: Defines the Customer entity with a unique name, balance, and credit
32
+ limit.
33
+ info_list: Defines the Customer entity with a unique name, balance, and credit
34
+ limit.
29
35
  tab_groups:
30
36
  - direction: tomany
31
37
  fks:
32
- - CustomerID
38
+ - customer_id
33
39
  name: OrderList
34
40
  resource: Order
41
+ - direction: tomany
42
+ fks:
43
+ - customer_id
44
+ name: EmailList
45
+ resource: Email
35
46
  type: Customer
36
- user_key: Name
47
+ user_key: name
48
+ Email:
49
+ attributes:
50
+ - label: ' id*'
51
+ name: id
52
+ search: true
53
+ sort: true
54
+ - name: customer_id
55
+ required: true
56
+ - name: message
57
+ - name: CreatedOn
58
+ type: DATE
59
+ tab_groups:
60
+ - direction: toone
61
+ fks:
62
+ - customer_id
63
+ name: customer
64
+ resource: Customer
65
+ type: Email
66
+ user_key: id
37
67
  Item:
38
68
  attributes:
39
- - label: ' Item I D*'
40
- name: ItemID
69
+ - label: ' id*'
70
+ name: id
41
71
  search: true
42
72
  sort: true
43
- - name: OrderID
44
- - name: ProductID
45
- - name: Quantity
46
- - name: Amount
47
- - name: UnitPrice
73
+ - name: order_id
74
+ - name: product_id
75
+ required: true
76
+ - name: quantity
77
+ required: true
78
+ - name: amount
79
+ type: DECIMAL
80
+ - name: unit_price
81
+ type: DECIMAL
82
+ description: Defines the Item entity with quantity, amounts, and unit price details.
83
+ info_list: Defines the Item entity with quantity, amounts, and unit price details.
48
84
  tab_groups:
49
85
  - direction: toone
50
86
  fks:
51
- - OrderID
52
- name: Order
87
+ - order_id
88
+ name: order
53
89
  resource: Order
54
90
  - direction: toone
55
91
  fks:
56
- - ProductID
57
- name: Product
92
+ - product_id
93
+ name: product
58
94
  resource: Product
59
95
  type: Item
60
- user_key: ItemID
96
+ user_key: id
61
97
  Order:
62
98
  attributes:
63
- - label: ' Order I D*'
64
- name: OrderID
99
+ - label: ' id*'
100
+ name: id
65
101
  search: true
66
102
  sort: true
67
- - name: CustomerID
68
- - name: AmountTotal
69
- - name: ShipDate
103
+ - name: customer_id
104
+ required: true
105
+ - name: notes
106
+ - name: amount_total
107
+ type: DECIMAL
108
+ - name: date_shipped
70
109
  type: DATE
71
- - name: Notes
110
+ - name: CreatedOn
111
+ type: DATE
112
+ description: Defines the Order entity which belongs to a customer. Includes notes
113
+ and amount total.
114
+ info_list: Defines the Order entity which belongs to a customer. Includes notes
115
+ and amount total.
72
116
  tab_groups:
73
117
  - direction: tomany
74
118
  fks:
75
- - OrderID
119
+ - order_id
76
120
  name: ItemList
77
121
  resource: Item
78
122
  - direction: toone
79
123
  fks:
80
- - CustomerID
81
- name: Customer
124
+ - customer_id
125
+ name: customer
82
126
  resource: Customer
83
127
  type: Order
84
- user_key: OrderID
128
+ user_key: id
85
129
  Product:
86
130
  attributes:
87
- - label: ' Name*'
88
- name: Name
89
- required: true
131
+ - label: ' name*'
132
+ name: name
90
133
  search: true
91
134
  sort: true
92
- - name: UnitPrice
93
- - name: ProductID
94
- - name: CarbonNeutral
135
+ - name: unit_price
136
+ type: DECIMAL
137
+ - name: carbon_neutral
138
+ type: BOOLEAN
139
+ - name: id
140
+ description: Defines the Product entity with a unique name and unit price.
141
+ info_list: Defines the Product entity with a unique name and unit price.
95
142
  tab_groups:
96
143
  - direction: tomany
97
144
  fks:
98
- - ProductID
145
+ - product_id
99
146
  name: ItemList
100
147
  resource: Item
101
148
  type: Product
102
- user_key: Name
149
+ user_key: name
103
150
  settings:
104
- HomeJS: http://localhost:5656/admin-app/home.js
151
+ HomeJS: /admin-app/home.js
105
152
  max_list_columns: 8
153
+ style_guide:
154
+ applicationLocales:
155
+ - en
156
+ - es
157
+ currency_symbol: $
158
+ currency_symbol_position: left
159
+ date_format: LL
160
+ decimal_max: '1000000000'
161
+ decimal_min: '2'
162
+ decimal_separator: .
163
+ detail_mode: tab
164
+ edit_on_mode: dblclick
165
+ exclude_listpicker: false
166
+ include_translation: 'false'
167
+ keycloak_client_id: alsclient
168
+ keycloak_realm: kcals
169
+ keycloak_url: http://localhost:8080
170
+ locale: en
171
+ max_decimal_digits: '4'
172
+ min_decimal_digits: '2'
173
+ new_mode: dialog
174
+ pick_style: list
175
+ row_height: small,
176
+ serviceType: JSONAPI
177
+ startSessionPath: /auth/login
178
+ style: light
179
+ thousand_separator: ','
180
+ use_keycloak: 'false'
@@ -79,6 +79,10 @@ Created projects use standard Flask and SQLAlchemy; automation is provided by Lo
79
79
  als create --project-name=basic_demo --db-url=basic_demo
80
80
  ```
81
81
 
82
+ <br>The self-demo provides:
83
+ 1. A quick look at logic, security and integration
84
+ 2. Integration includes Kafka and MCP (**[Model Context Protocol](https://apilogicserver.github.io/Docs/Integration-MCP/)**)
85
+
82
86
  <br>To create a larger project, try the pre-installed [**northwind database**](https://apilogicserver.github.io/Docs/Tutorial/) (imagine your own database here):
83
87
 
84
88
  ```
@@ -148,8 +148,8 @@ def declare_logic():
148
148
  "Order Date": row.OrderDate,
149
149
  #"items": [row.OrderDetailList]
150
150
  },
151
- ins_upd_dlt="upd", wh_entity="Order",
152
- msg="1. /Webhook integration.py: n8n, sending ready Order payload")
151
+ ins_upd_dlt="upd", wh_entity="Order",
152
+ msg="1. /Webhook integration.py: n8n, sending ready Order payload")
153
153
 
154
154
  logic_row.log("send_order_to_shipping - sent order to shipping and N8N/sendgrid") # see in log
155
155
 
@@ -0,0 +1,31 @@
1
+ {
2
+ "file-explorer": true,
3
+ "global-search": true,
4
+ "switcher": true,
5
+ "graph": true,
6
+ "backlink": true,
7
+ "canvas": true,
8
+ "outgoing-link": true,
9
+ "tag-pane": true,
10
+ "properties": false,
11
+ "page-preview": true,
12
+ "daily-notes": true,
13
+ "templates": true,
14
+ "note-composer": true,
15
+ "command-palette": true,
16
+ "slash-command": false,
17
+ "editor-status": true,
18
+ "bookmarks": true,
19
+ "markdown-importer": false,
20
+ "zk-prefixer": false,
21
+ "random-note": false,
22
+ "outline": true,
23
+ "word-count": true,
24
+ "slides": false,
25
+ "audio-recorder": false,
26
+ "workspaces": false,
27
+ "file-recovery": true,
28
+ "publish": false,
29
+ "sync": true,
30
+ "webviewer": false
31
+ }
@@ -0,0 +1,166 @@
1
+ {
2
+ "main": {
3
+ "id": "286a834d839adefc",
4
+ "type": "split",
5
+ "children": [
6
+ {
7
+ "id": "dd6d74d8e8e2033a",
8
+ "type": "tabs",
9
+ "children": [
10
+ {
11
+ "id": "27459de4487926a5",
12
+ "type": "leaf",
13
+ "state": {
14
+ "type": "empty",
15
+ "state": {},
16
+ "icon": "lucide-file",
17
+ "title": "New tab"
18
+ }
19
+ }
20
+ ]
21
+ }
22
+ ],
23
+ "direction": "vertical"
24
+ },
25
+ "left": {
26
+ "id": "46df2b3e60483310",
27
+ "type": "split",
28
+ "children": [
29
+ {
30
+ "id": "b1e255effaa8b3c7",
31
+ "type": "tabs",
32
+ "children": [
33
+ {
34
+ "id": "5d955bc80fce9623",
35
+ "type": "leaf",
36
+ "state": {
37
+ "type": "file-explorer",
38
+ "state": {
39
+ "sortOrder": "alphabetical",
40
+ "autoReveal": false
41
+ },
42
+ "icon": "lucide-folder-closed",
43
+ "title": "Files"
44
+ }
45
+ },
46
+ {
47
+ "id": "28074419fd6a8eda",
48
+ "type": "leaf",
49
+ "state": {
50
+ "type": "search",
51
+ "state": {
52
+ "query": "",
53
+ "matchingCase": false,
54
+ "explainSearch": false,
55
+ "collapseAll": false,
56
+ "extraContext": false,
57
+ "sortOrder": "alphabetical"
58
+ },
59
+ "icon": "lucide-search",
60
+ "title": "Search"
61
+ }
62
+ },
63
+ {
64
+ "id": "17e52ebf5918c581",
65
+ "type": "leaf",
66
+ "state": {
67
+ "type": "bookmarks",
68
+ "state": {},
69
+ "icon": "lucide-bookmark",
70
+ "title": "Bookmarks"
71
+ }
72
+ }
73
+ ]
74
+ }
75
+ ],
76
+ "direction": "horizontal",
77
+ "width": 300
78
+ },
79
+ "right": {
80
+ "id": "4089a9f1f65dc943",
81
+ "type": "split",
82
+ "children": [
83
+ {
84
+ "id": "55c5ab028d9835b4",
85
+ "type": "tabs",
86
+ "children": [
87
+ {
88
+ "id": "4b91ab7bf798a851",
89
+ "type": "leaf",
90
+ "state": {
91
+ "type": "backlink",
92
+ "state": {
93
+ "collapseAll": false,
94
+ "extraContext": false,
95
+ "sortOrder": "alphabetical",
96
+ "showSearch": false,
97
+ "searchQuery": "",
98
+ "backlinkCollapsed": false,
99
+ "unlinkedCollapsed": true
100
+ },
101
+ "icon": "links-coming-in",
102
+ "title": "Backlinks"
103
+ }
104
+ },
105
+ {
106
+ "id": "990860d64994582e",
107
+ "type": "leaf",
108
+ "state": {
109
+ "type": "outgoing-link",
110
+ "state": {
111
+ "linksCollapsed": false,
112
+ "unlinkedCollapsed": true
113
+ },
114
+ "icon": "links-going-out",
115
+ "title": "Outgoing links"
116
+ }
117
+ },
118
+ {
119
+ "id": "320704f56a6b4c3e",
120
+ "type": "leaf",
121
+ "state": {
122
+ "type": "tag",
123
+ "state": {
124
+ "sortOrder": "frequency",
125
+ "useHierarchy": true,
126
+ "showSearch": false,
127
+ "searchQuery": ""
128
+ },
129
+ "icon": "lucide-tags",
130
+ "title": "Tags"
131
+ }
132
+ },
133
+ {
134
+ "id": "2abbfb3e874500e0",
135
+ "type": "leaf",
136
+ "state": {
137
+ "type": "outline",
138
+ "state": {
139
+ "followCursor": false,
140
+ "showSearch": false,
141
+ "searchQuery": ""
142
+ },
143
+ "icon": "lucide-list",
144
+ "title": "Outline"
145
+ }
146
+ }
147
+ ]
148
+ }
149
+ ],
150
+ "direction": "horizontal",
151
+ "width": 300,
152
+ "collapsed": true
153
+ },
154
+ "left-ribbon": {
155
+ "hiddenItems": {
156
+ "switcher:Open quick switcher": false,
157
+ "graph:Open graph view": false,
158
+ "canvas:Create new canvas": false,
159
+ "daily-notes:Open today's daily note": false,
160
+ "templates:Insert template": false,
161
+ "command-palette:Open command palette": false
162
+ }
163
+ },
164
+ "active": "27459de4487926a5",
165
+ "lastOpenFiles": []
166
+ }
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  title: Sample Application Tutorial
3
3
  Description: Create, Run and Customize the pre-installed sqlite Northwind database
4
- Version: 1.0 [proto]
4
+ Version: 1.02 dev
5
5
  ---
6
6
  # API Logic Server Sample Tutorial
7
7
 
@@ -11,11 +11,11 @@ This is the sample app. It was created from the pre-installed sqlite [Northwind
11
11
 
12
12
  In this tutorial, we will explore:
13
13
 
14
- * **create** - we will briefly review what actually happened during the create process.
14
+ 1. **Create** - we will briefly review what actually happened during the create process.
15
15
 
16
- * **run** - we will first run the Admin App and the JSON:API. These will illustrate how automation creates an app and API from a database. Use this to infer what you'd get for one of your databases.
16
+ 2. **Run** - we will first run the Admin App and the JSON:API. These will illustrate how automation creates an app and API from a database. Use this to infer what you'd get for one of your databases.
17
17
 
18
- * **customize** - we will then explore customizing and debugging the project.
18
+ 3. **Customize** - we will then explore customizing and debugging the project.
19
19
 
20
20
  &nbsp;
21
21
 
@@ -23,10 +23,13 @@ In this tutorial, we will explore:
23
23
  This tutorial illustrates some key concepts:
24
24
 
25
25
  #### _Declarative Models_, not code
26
- Observe that the files for the Admin App and API are models that describe _what, not how_. This is much easier to understand than large amounts of generated code.
26
+ Observe that the files for the Admin App and API are models that describe _what, not how_. This level of abstratction is much easier to understand than large amounts of generated code.
27
+
28
+ ##### Automated Automation
29
+ Not only do models automate functionality, the *models themselves* are automated, created instantly when you create a project. That means you have instant Working Software.
27
30
 
28
31
  #### Customize - using standard tools
29
- The system is designed for you to customize the UI, Logic, Security and API, using standard tools - your IDE for code editing/debugging, git, etc.
32
+ The system is designed for you to customize the UI, Logic, Security and API, using standard tools - your IDE for code editing / debugging, git, etc.
30
33
 
31
34
  #### Iterate - Preserve Customizations
32
35
  The system is designed to enable `rebuild`, so you can iterate the data model - _without losing your customizations._ In general, such customizations are kept in separate files from the model files. So, the model files can be rebuilt without affecting customization files.
@@ -38,7 +41,7 @@ A unique feature of API Logic Server is provision for spreadsheet-like rules, cu
38
41
 
39
42
  # Development Overview
40
43
 
41
- [![Using VS Code](https://github.com/valhuber/apilogicserver/wiki/images//creates-and-runs-video.jpg?raw=true?raw=true)](https://youtu.be/tOojjEAct4M "Using VS Code with the ApiLogicServer container - click for video")
44
+ [![Using VS Code](images/creates-and-runs-video.png)](https://youtu.be/tOojjEAct4M "Using VS Code with the ApiLogicServer container - click for video")
42
45
 
43
46
  The diagram above summarizes the create / run / customize process.
44
47
 
@@ -48,7 +51,9 @@ The diagram above summarizes the create / run / customize process.
48
51
 
49
52
  ## 1. Create: Instant Project
50
53
 
51
- The CLI command below creates an `ApiLogicProject` by reading your schema. Note: the `db_url` value is [an abbreviation](https://apilogicserver.github.io/Docs/Data-Model-Examples/); you would normally supply a SQLAlchemy URL.
54
+ The CLI command below creates an `ApiLogicProject` by reading your schema.
55
+
56
+ Note: the `db_url` value is defaulted to the pre-installed sample project; you would normally supply a SQLAlchemy URL.
52
57
 
53
58
  ```bash
54
59
  $ ApiLogicServer create --project_name= --db_url= # create ApiLogicProject
@@ -70,11 +75,11 @@ The system has created an API and an Admin App. Let's explore them.
70
75
 
71
76
  ### 2.a Self-Serve API: Ad hoc Integration
72
77
 
73
- The system creates an API with end points for each table, providing filtering, sorting, pagination, optimistic locking and related data access.
78
+ The system creates a JSON:API with end points for each table, providing filtering, sorting, pagination, optimistic locking and related data access.
74
79
 
75
80
  The API is [**self-serve**](https://apilogicserver.github.io/Docs/API-Self-Serve/): consumers can select their own attributes and related data, eliminating reliance on custom API development. Our self-serve API meets requirements for Ad Hoc Application Integration, and Custom UI Dev.
76
81
 
77
- <img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/api-swagger.jpeg?raw=true">
82
+ ![api-swagger](images/integration/api-swagger.png)
78
83
 
79
84
  ### 2.b Admin App: Multi-Page, Multi-Table, Automatic Joins
80
85
 
@@ -85,7 +90,7 @@ After starting the server and browser, explore the Admin App in your browser:
85
90
  1. Navigate to `Customer`
86
91
  * Depending on your screen size, you may need to hit the "hamburger menu" (top left) to see the left menu<br/><br/>
87
92
  2. Click the first Customer row to see Customer Details
88
- 3. Observe the `ORDERLIST` tab at the bottom
93
+ 3. Click the `ORDERLIST` tab at the bottom
89
94
  4. Click the first Order row
90
95
  5. Observe the `ORDERDETAILLIST` tab at the bottom
91
96
  6. Observe the elements shown in the diagram
@@ -94,10 +99,9 @@ After starting the server and browser, explore the Admin App in your browser:
94
99
  * Multi-Table - database relationships (typically from foreign keys) used to build master/detail pages
95
100
  * Automatic Joins - the Order Detail table contains `ProductId`, but the system has joined in the `Product Name`. You can edit the `admin.yaml` file to control such behavior.
96
101
 
102
+ ![run-admin-app](images/ui-admin/run-admin-app.png)
97
103
 
98
- <figure><img src="https://github.com/valhuber/apilogicserver/wiki/images/ui-admin/run-admin-app.png?raw=true"></figure>
99
-
100
- > **Key Takeaway: API/UI *Automation***<br>With 1 command, we have created an executable project with a self-serve API, for ad hoc application integration and custom UI development. Our Admin App can be used for agile business user collaboration.
104
+ > **Key Takeaway: *Microservice Automation***<br>With **1 command**, we have created an executable project with a **self-serve API**, for ad hoc application integration and custom UI development. Our **Admin App** can be used for agile business user collaboration.
101
105
 
102
106
  &nbsp;
103
107
 
@@ -132,6 +136,7 @@ To apply customizations, in a terminal window for your project:
132
136
 
133
137
  ```bash
134
138
  ApiLogicServer add-cust
139
+ ApiLogicServer add-auth --db_url=auth # version 10.3.14 or greater
135
140
  ```
136
141
 
137
142
  **3. Restart the server, login as `admin`**
@@ -149,7 +154,7 @@ In the sections below, we will explore:
149
154
 
150
155
  ### 3.a Customize UI: Declare UI Behavior
151
156
 
152
- The admin app is not built with complex html and javascript. Instead, it is configured with the `ui/admin/admin.yml`, automatically created from your data model by `ApiLogicServer create`.
157
+ The admin app is not built with complex html and javascript. Instead, it is *configured* with `ui/admin/admin.yml`, automatically created from your data model by `ApiLogicServer create`.
153
158
 
154
159
  You can customize this file in your IDE to control which fields are shown (including joins), hide/show conditions, help text etc. The `add-cust` process above has simulated such customizations.
155
160
 
@@ -175,7 +180,7 @@ To see customized Admin app in action, with the restarted server:
175
180
 
176
181
  One customization has been to hide several Order fields (search `ui/admin/admin.yml` for `show_when: isInserting == false`). This makes it convenient to use the Admin App to enter an Order and OrderDetails:
177
182
 
178
- <img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/order-entry-ui.jpg?raw=true">
183
+ ![order-entry-ui](images/integration/order-entry-ui.png)
179
184
 
180
185
  &nbsp;
181
186
 
@@ -198,7 +203,7 @@ Rules are declared in Python, simplified with IDE code completion. The `add-cus
198
203
 
199
204
  Observe rules can be debugged using standard logging and the debugger:
200
205
 
201
- <img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/logic-chaining.jpeg?raw=true">
206
+ ![logic-chaining](images/integration/logic-chaining.png)
202
207
 
203
208
  &nbsp;
204
209
 
@@ -222,7 +227,13 @@ Rules are a unique and significant innovation, providing meaningful improvements
222
227
 
223
228
  &nbsp;
224
229
 
225
- > Key Takeway - Logic: Multi-table Derivation and Constraint Rules, 40X More Concise. <br>For more on rules, [click here](https://apilogicserver.github.io/Docs/Logic-Why/).
230
+ > **Key Takeway - Logic:** Multi-table Derivations and Constraint Rules, Extensible with Python
231
+ <br><br>Rules are:
232
+ <br>1. **Declared** in your IDE - 40X more concise
233
+ <br>2. **Activated** on server start
234
+ <br>3. **Executed** - *automatically* - on updates (using SQLAlchemy events)
235
+ <br>4. **Debugged** in your IDE, and with the console log
236
+ <br><br>For more on rules, [click here](https://apilogicserver.github.io/Docs/Logic-Why/).
226
237
 
227
238
  &nbsp;
228
239
 
@@ -234,7 +245,9 @@ To see security in action:
234
245
 
235
246
  **1. Logout (upper right), and Login** as `AFLKI`, password `p`
236
247
 
237
- **2. Click Customer** - observe you now see only 1 customer
248
+ * This authorized user has 2 roles: `customer` and 'tenant`
249
+
250
+ **2. Click Customer** - observe you now see only 1 customer (per the `customer` role)
238
251
 
239
252
  <br>
240
253
 
@@ -242,7 +255,7 @@ To see security in action:
242
255
 
243
256
  Declarative row-level security ensures that users see only the rows authorized for their roles. Observe you now see only customer ALFKI, per the security declared below. Note the console log at the bottom shows how the filter worked.
244
257
 
245
- <img src="https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/security-filters.jpg?raw=true">
258
+ ![security-filter](images/integration/security-filters.png)
246
259
 
247
260
  &nbsp;
248
261
 
@@ -277,7 +290,7 @@ The main task here is to ***map*** a B2B payload onto our logic-enabled SQLAlche
277
290
  * Use the `OrderB2B` class to transform a api request data to SQLAlchemy rows (`dict_to_row`)
278
291
  * The automatic commit initiates the same shared logic described above to check credit and reorder products
279
292
 
280
- ![dict to row](https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/dict-to-row.jpg?raw=true)
293
+ ![dict-to-row](images/integration/dict-to-row.png)
281
294
 
282
295
 
283
296
  &nbsp;
@@ -304,19 +317,25 @@ Just as you can customize apis, you can complement rule-based logic using Python
304
317
 
305
318
  3. `send_order_to_shipping` uses the `OrderShipping` class, which maps our SQLAlchemy order row to a dict (`row_to_dict`).
306
319
 
307
- ![send order to shipping](https://github.com/ApiLogicServer/Docs/blob/main/docs/images/integration/order-to-shipping.jpg?raw=true)
308
-
320
+ ![order-to-shipping](images/integration/order-to-shipping.png)
309
321
 
310
322
  &nbsp;
311
323
  > **Key Takeway - Extensible Rules, Kafka Message Produced**<br>Rule-based logic is extensible with Python, here producing a Kafka message with 20 lines of code.
312
324
 
325
+
326
+ &nbsp;
327
+
328
+ ### 3.e Customize the Data Model
329
+
330
+ You can also alter the data model, while preserving customizations. For more information, see [Database Design Changes](https://apilogicserver.github.io/Docs/Database-Changes/).
331
+
313
332
  &nbsp;
314
333
 
315
334
  ## Testing
316
335
 
317
336
  ### Behave
318
337
 
319
- You can test using standard api and ui test tools. We recommend exploring the [Behave framework](https://valhuber.github.io/ApiLogicServer/Behave/). This can be used as part of an overall agile approach as described in the [Logic Tutorial](https://valhuber.github.io/ApiLogicServer/Logic-Tutorial/).
338
+ You can test using standard api and ui test tools. We recommend exploring the [Behave framework](https://apilogicserver.github.io/Docs/Behave/). This can be used as part of an overall agile approach as described in the [Logic Tutorial](https://apilogicserver.github.io/Docs/Logic-Tutorial/).
320
339
 
321
340
  TL;DR - features and test scripts are predefined in the sample; to run them (with the server running):
322
341
 
@@ -328,7 +347,7 @@ TL;DR - features and test scripts are predefined in the sample; to run them (wit
328
347
 
329
348
  > The sample Scenarios below were chosen to illustrate the basic patterns of using rules. Open the disclosure box ("Tests - and their logic...") to see the implementation and notes.
330
349
 
331
- For more information, see [Testing with Behave](https://valhuber.github.io/ApiLogicServer/Behave/).
350
+ For more information, see [Testing with Behave](https://apilogicserver.github.io/Docs/Behave/).
332
351
 
333
352
  &nbsp;
334
353
 
@@ -361,7 +380,7 @@ ApiLogicServer curl "'POST' 'http://localhost:5656/api/ServicesEndPoint/OrderB2B
361
380
 
362
381
  After the Tutorial, these are excellent next steps:
363
382
 
364
- * Further explore Application Integration - [open the Sample Integration tutorial](integration/Sample-Integration.md)
383
+ * Further explore Application Integration - [open the Sample Integration tutorial](Sample-Integration.md)
365
384
  * It will show how to activate Kafka so that the message above is actually sent
366
385
  * It will ilustrate to the _consume_ Kafka messages
367
386
  * You've already created most of it, so...