ApiLogicServer 15.0.38__py3-none-any.whl → 15.0.41__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.
- api_logic_server_cli/api_logic_server.py +2 -2
- api_logic_server_cli/api_logic_server_info.yaml +3 -3
- api_logic_server_cli/prototypes/base/.copilot-instructions.md +10 -0
- api_logic_server_cli/prototypes/base/.devcontainer-option/.copilot-instructions.md +178 -0
- api_logic_server_cli/prototypes/base/.vscode/.copilot-instructions.md +178 -0
- api_logic_server_cli/prototypes/base/README_PROJECT.md +43 -0
- api_logic_server_cli/prototypes/base/api_logic_server_run.py +20 -8
- api_logic_server_cli/prototypes/base/integration/mcp/readme-mcp.md +9 -0
- api_logic_server_cli/prototypes/base/logic/logic_discovery/readme_logic_discovery.md +9 -0
- api_logic_server_cli/prototypes/base/logic/logic_discovery/use_case.py +27 -0
- api_logic_server_cli/prototypes/base/logic/{readme_declare_logic.md → readme_logic.md} +70 -1
- api_logic_server_cli/prototypes/base/readme.md +30 -5
- api_logic_server_cli/prototypes/base/security/readme_security.md +17 -0
- api_logic_server_cli/prototypes/manager/.copilot-instructions.md +13 -0
- api_logic_server_cli/prototypes/manager/.github/.copilot-instructions.md +58 -0
- api_logic_server_cli/prototypes/manager/.vscode/.copilot-instructions.md +58 -0
- api_logic_server_cli/prototypes/manager/.vscode/ApiLogicServer.code-workspace +2 -2
- api_logic_server_cli/prototypes/manager/README.md +13 -1
- api_logic_server_cli/prototypes/nw/ui/reference_react_app/README.md +21 -4
- {apilogicserver-15.0.38.dist-info → apilogicserver-15.0.41.dist-info}/METADATA +1 -1
- {apilogicserver-15.0.38.dist-info → apilogicserver-15.0.41.dist-info}/RECORD +25 -14
- {apilogicserver-15.0.38.dist-info → apilogicserver-15.0.41.dist-info}/WHEEL +0 -0
- {apilogicserver-15.0.38.dist-info → apilogicserver-15.0.41.dist-info}/entry_points.txt +0 -0
- {apilogicserver-15.0.38.dist-info → apilogicserver-15.0.41.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-15.0.38.dist-info → apilogicserver-15.0.41.dist-info}/top_level.txt +0 -0
|
@@ -12,10 +12,10 @@ ApiLogicServer CLI: given a database url, create [and run] customizable ApiLogic
|
|
|
12
12
|
Called from api_logic_server_cli.py, by instantiating the ProjectRun object.
|
|
13
13
|
'''
|
|
14
14
|
|
|
15
|
-
__version__ = "15.00.
|
|
15
|
+
__version__ = "15.00.41" # last public release: 15.00.40 (15.00.12)
|
|
16
16
|
recent_changes = \
|
|
17
17
|
f'\n\nRecent Changes:\n' +\
|
|
18
|
-
"\t07/
|
|
18
|
+
"\t07/10/2024 - 15.00.41: copilot vibe support for logic, UI, MCP, bug[98] \n"\
|
|
19
19
|
"\t06/30/2024 - 15.00.33: Tech Preview: genai-logic genai-add-app --vibe, bug [96, 97] \n"\
|
|
20
20
|
"\t06/10/2024 - 15.00.12: MCP Security, win fixes for readme, graphics quotes \n"\
|
|
21
21
|
"\t06/08/2024 - 15.00.10: MCP, optional shortening of stacktrace lines, bugfix[92] \n"\
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
last_created_date: July
|
|
2
|
-
last_created_project_name:
|
|
3
|
-
last_created_version: 15.00.
|
|
1
|
+
last_created_date: July 08, 2025 21:48:29
|
|
2
|
+
last_created_project_name: samples/nw_sample_nocust
|
|
3
|
+
last_created_version: 15.00.39
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Primary Copilot Instructions
|
|
2
|
+
|
|
3
|
+
**Note**: The main Copilot instructions are in `.vscode/.copilot-instructions.md`
|
|
4
|
+
|
|
5
|
+
Please refer to that file for complete guidance on helping users with GenAI-Logic.
|
|
6
|
+
|
|
7
|
+
## Quick Reference for AI Assistants
|
|
8
|
+
|
|
9
|
+
When users ask "what do I do now?":
|
|
10
|
+
1. Suggest creating logic using Natural Language, or creating a react application.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) Projects
|
|
2
|
+
|
|
3
|
+
## Project Type: Auto-Generated Microservice
|
|
4
|
+
|
|
5
|
+
This is a **GenAI-Logic (aka API Logic Server) project** - a complete, working microservice - auto-generated from a database schema.
|
|
6
|
+
|
|
7
|
+
## ⚠️ IMPORTANT: What's Already Built
|
|
8
|
+
|
|
9
|
+
**DO NOT recreate these - they're already working:**
|
|
10
|
+
|
|
11
|
+
1. **Admin Web Application** - Live at `http://localhost:5656`
|
|
12
|
+
2. **REST API Endpoints** - All database tables exposed at `/api/*`
|
|
13
|
+
3. **Database Models** - Complete SQLAlchemy ORM in `database/models.py`
|
|
14
|
+
4. **Authentication System** - JWT-based auth framework
|
|
15
|
+
5. **Business Logic Engine** - Declarative rules system
|
|
16
|
+
|
|
17
|
+
## 🎯 Common Tasks
|
|
18
|
+
|
|
19
|
+
If the user asks "what do I do now?", these subsections are good suggestions.
|
|
20
|
+
|
|
21
|
+
List these as choices, do not just do all of them at once - that would be overwhelming.
|
|
22
|
+
|
|
23
|
+
### 🚀 To Run This Project
|
|
24
|
+
|
|
25
|
+
Use F5 (pre-configured run configuration - supports debugger for server logic), or (when focused on client apps):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
python api_logic_server_run.py
|
|
29
|
+
# Then open: http://localhost:5656
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Adding Business Logic
|
|
33
|
+
Use `docs/training` to accept Natural Language logic, and translate it into rules like:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
# Edit: logic/declare_logic.py
|
|
37
|
+
Rule.sum(derive=Customer.Balance, as_sum_of=Order.AmountTotal)
|
|
38
|
+
Rule.constraint(validate=Customer, as_condition=lambda row: row.Balance <= row.CreditLimit)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Generally CoPilot solicits Natural Language logic for translation (see logic/logic_discovery/readme_logic_discovery.md),
|
|
42
|
+
but you can also offer to suggest rules.
|
|
43
|
+
|
|
44
|
+
### Adding MCP
|
|
45
|
+
|
|
46
|
+
The API is automatically MCP-enabled.
|
|
47
|
+
|
|
48
|
+
To add MCP Client (requires OpenAI key):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Add MCP Client
|
|
52
|
+
genai-logic genai-add-mcp-client
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Configuring Admin UI
|
|
56
|
+
|
|
57
|
+
This is built when project is created - no need to add it.
|
|
58
|
+
Customize by editing the underlying yaml.
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
# Edit: ui/admin/admin.yaml
|
|
62
|
+
resources:
|
|
63
|
+
Customer:
|
|
64
|
+
attributes:
|
|
65
|
+
- name: CompanyName
|
|
66
|
+
search: true
|
|
67
|
+
sort: true
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Create and Customize React Apps
|
|
71
|
+
|
|
72
|
+
Complete customization is provided by generating a React Application (requires OpenAI key, Node):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Create: ui/admin/my-app-name
|
|
76
|
+
genai-logic genai-add-app --app-name=my-app-name --vibe
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then, `npm install` and `npm start`
|
|
80
|
+
|
|
81
|
+
Temporary restriction: security must be disabled.
|
|
82
|
+
|
|
83
|
+
Customize using CoPilot chat, with `docs/training`.
|
|
84
|
+
|
|
85
|
+
### Security - Role-Based Access Control
|
|
86
|
+
|
|
87
|
+
Configure:
|
|
88
|
+
```
|
|
89
|
+
als add-auth --provider-type=sql --db-url=
|
|
90
|
+
als add-auth --provider-type=sql --db_url=postgresql://postgres:p@localhost/authdb
|
|
91
|
+
|
|
92
|
+
als add-auth --provider-type=keycloak --db-url=localhost
|
|
93
|
+
als add-auth --provider-type=keycloak --db-url=hardened
|
|
94
|
+
|
|
95
|
+
als add-auth --provider-type=None # to disable
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Keycloak quick start [(more information here:)](https://apilogicserver.github.io/Docs/Security-Keycloak/)
|
|
99
|
+
```bash
|
|
100
|
+
cd devops/keycloak
|
|
101
|
+
docker compose up
|
|
102
|
+
als add-auth --provider-type=keycloak --db-url=localhost
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
For more on KeyCloak: https://apilogicserver.github.io/Docs/Security-Keycloak/
|
|
106
|
+
|
|
107
|
+
Declaration:
|
|
108
|
+
```python
|
|
109
|
+
# Edit: security/declare_security.py
|
|
110
|
+
Grant(on_entity=Customer, to_role=sales, filter=lambda: Customer.SalesRep == current_user())
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Adding Custom API Endpoints
|
|
114
|
+
```python
|
|
115
|
+
# Edit: api/customize_api.py
|
|
116
|
+
@app.route('/api/custom-endpoint')
|
|
117
|
+
def my_endpoint():
|
|
118
|
+
return {"message": "Custom endpoint"}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Customize Models - Add Derived attributes
|
|
122
|
+
|
|
123
|
+
Here is a sample derived attribute, `proper_salary`:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
|
|
127
|
+
# add derived attribute: https://github.com/thomaxxl/safrs/blob/master/examples/demo_pythonanywhere_com.py
|
|
128
|
+
@add_method(models.Employee)
|
|
129
|
+
@jsonapi_attr
|
|
130
|
+
def __proper_salary__(self): # type: ignore [no-redef]
|
|
131
|
+
import database.models as models
|
|
132
|
+
import decimal
|
|
133
|
+
if isinstance(self, models.Employee):
|
|
134
|
+
rtn_value = self.Salary
|
|
135
|
+
if rtn_value is None:
|
|
136
|
+
rtn_value = decimal.Decimal('0')
|
|
137
|
+
rtn_value = decimal.Decimal('1.25') * rtn_value
|
|
138
|
+
self._proper_salary = int(rtn_value)
|
|
139
|
+
return self._proper_salary
|
|
140
|
+
else:
|
|
141
|
+
rtn_value = decimal.Decimal('0')
|
|
142
|
+
self._proper_salary = int(rtn_value)
|
|
143
|
+
return self._proper_salary
|
|
144
|
+
|
|
145
|
+
@add_method(models.Employee)
|
|
146
|
+
@__proper_salary__.setter
|
|
147
|
+
def _proper_salary(self, value): # type: ignore [no-redef]
|
|
148
|
+
self._proper_salary = value
|
|
149
|
+
print(f'_proper_salary={self._proper_salary}')
|
|
150
|
+
pass
|
|
151
|
+
|
|
152
|
+
models.Employee.ProperSalary = __proper_salary__
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
When customizing SQLAlchemy models:
|
|
157
|
+
|
|
158
|
+
Don't use direct comparisons with database fields in computed properties
|
|
159
|
+
Convert to Python values first using float(), int(), str()
|
|
160
|
+
Use property() function instead of @jsonapi_attr for computed properties
|
|
161
|
+
Always add error handling for type conversions
|
|
162
|
+
|
|
163
|
+
## 📁 Key Directories
|
|
164
|
+
|
|
165
|
+
- `logic/` - Business rules (declarative)
|
|
166
|
+
- `api/` - REST API customization
|
|
167
|
+
- `security/` - Authentication/authorization
|
|
168
|
+
- `database/` - Data models and schemas
|
|
169
|
+
- `ui/admin/` - Admin interface configuration
|
|
170
|
+
- `ui/app/` - Alternative Angular admin app
|
|
171
|
+
|
|
172
|
+
## 💡 Helpful Context
|
|
173
|
+
|
|
174
|
+
- This uses Flask + SQLAlchemy + SAFRS for JSON:API
|
|
175
|
+
- Admin UI is React-based with automatic CRUD generation
|
|
176
|
+
- Business logic uses LogicBank (declarative rule engine)
|
|
177
|
+
- Everything is auto-generated from database introspection
|
|
178
|
+
- Focus on CUSTOMIZATION, not re-creation
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) Projects
|
|
2
|
+
|
|
3
|
+
## Project Type: Auto-Generated Microservice
|
|
4
|
+
|
|
5
|
+
This is a **GenAI-Logic (aka API Logic Server) project** - a complete, working microservice - auto-generated from a database schema.
|
|
6
|
+
|
|
7
|
+
## ⚠️ IMPORTANT: What's Already Built
|
|
8
|
+
|
|
9
|
+
**DO NOT recreate these - they're already working:**
|
|
10
|
+
|
|
11
|
+
1. **Admin Web Application** - Live at `http://localhost:5656`
|
|
12
|
+
2. **REST API Endpoints** - All database tables exposed at `/api/*`
|
|
13
|
+
3. **Database Models** - Complete SQLAlchemy ORM in `database/models.py`
|
|
14
|
+
4. **Authentication System** - JWT-based auth framework
|
|
15
|
+
5. **Business Logic Engine** - Declarative rules system
|
|
16
|
+
|
|
17
|
+
## 🎯 Common Tasks
|
|
18
|
+
|
|
19
|
+
If the user asks "what do I do now?", these subsections are good suggestions.
|
|
20
|
+
|
|
21
|
+
List these as choices, do not just do all of them at once - that would be overwhelming.
|
|
22
|
+
|
|
23
|
+
### 🚀 To Run This Project
|
|
24
|
+
|
|
25
|
+
Use F5 (pre-configured run configuration - supports debugger for server logic), or (when focused on client apps):
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
python api_logic_server_run.py
|
|
29
|
+
# Then open: http://localhost:5656
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Adding Business Logic
|
|
33
|
+
Use `docs/training` to accept Natural Language logic, and translate it into rules like:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
# Edit: logic/declare_logic.py
|
|
37
|
+
Rule.sum(derive=Customer.Balance, as_sum_of=Order.AmountTotal)
|
|
38
|
+
Rule.constraint(validate=Customer, as_condition=lambda row: row.Balance <= row.CreditLimit)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Generally CoPilot solicits Natural Language logic for translation (see logic/logic_discovery/readme_logic_discovery.md),
|
|
42
|
+
but you can also offer to suggest rules.
|
|
43
|
+
|
|
44
|
+
### Adding MCP
|
|
45
|
+
|
|
46
|
+
The API is automatically MCP-enabled.
|
|
47
|
+
|
|
48
|
+
To add MCP Client (requires OpenAI key):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Add MCP Client
|
|
52
|
+
genai-logic genai-add-mcp-client
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Configuring Admin UI
|
|
56
|
+
|
|
57
|
+
This is built when project is created - no need to add it.
|
|
58
|
+
Customize by editing the underlying yaml.
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
# Edit: ui/admin/admin.yaml
|
|
62
|
+
resources:
|
|
63
|
+
Customer:
|
|
64
|
+
attributes:
|
|
65
|
+
- name: CompanyName
|
|
66
|
+
search: true
|
|
67
|
+
sort: true
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Create and Customize React Apps
|
|
71
|
+
|
|
72
|
+
Complete customization is provided by generating a React Application (requires OpenAI key, Node):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Create: ui/admin/my-app-name
|
|
76
|
+
genai-logic genai-add-app --app-name=my-app-name --vibe
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Then, `npm install` and `npm start`
|
|
80
|
+
|
|
81
|
+
Temporary restriction: security must be disabled.
|
|
82
|
+
|
|
83
|
+
Customize using CoPilot chat, with `docs/training`.
|
|
84
|
+
|
|
85
|
+
### Security - Role-Based Access Control
|
|
86
|
+
|
|
87
|
+
Configure:
|
|
88
|
+
```
|
|
89
|
+
als add-auth --provider-type=sql --db-url=
|
|
90
|
+
als add-auth --provider-type=sql --db_url=postgresql://postgres:p@localhost/authdb
|
|
91
|
+
|
|
92
|
+
als add-auth --provider-type=keycloak --db-url=localhost
|
|
93
|
+
als add-auth --provider-type=keycloak --db-url=hardened
|
|
94
|
+
|
|
95
|
+
als add-auth --provider-type=None # to disable
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Keycloak quick start [(more information here:)](https://apilogicserver.github.io/Docs/Security-Keycloak/)
|
|
99
|
+
```bash
|
|
100
|
+
cd devops/keycloak
|
|
101
|
+
docker compose up
|
|
102
|
+
als add-auth --provider-type=keycloak --db-url=localhost
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
For more on KeyCloak: https://apilogicserver.github.io/Docs/Security-Keycloak/
|
|
106
|
+
|
|
107
|
+
Declaration:
|
|
108
|
+
```python
|
|
109
|
+
# Edit: security/declare_security.py
|
|
110
|
+
Grant(on_entity=Customer, to_role=sales, filter=lambda: Customer.SalesRep == current_user())
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Adding Custom API Endpoints
|
|
114
|
+
```python
|
|
115
|
+
# Edit: api/customize_api.py
|
|
116
|
+
@app.route('/api/custom-endpoint')
|
|
117
|
+
def my_endpoint():
|
|
118
|
+
return {"message": "Custom endpoint"}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Customize Models - Add Derived attributes
|
|
122
|
+
|
|
123
|
+
Here is a sample derived attribute, `proper_salary`:
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
|
|
127
|
+
# add derived attribute: https://github.com/thomaxxl/safrs/blob/master/examples/demo_pythonanywhere_com.py
|
|
128
|
+
@add_method(models.Employee)
|
|
129
|
+
@jsonapi_attr
|
|
130
|
+
def __proper_salary__(self): # type: ignore [no-redef]
|
|
131
|
+
import database.models as models
|
|
132
|
+
import decimal
|
|
133
|
+
if isinstance(self, models.Employee):
|
|
134
|
+
rtn_value = self.Salary
|
|
135
|
+
if rtn_value is None:
|
|
136
|
+
rtn_value = decimal.Decimal('0')
|
|
137
|
+
rtn_value = decimal.Decimal('1.25') * rtn_value
|
|
138
|
+
self._proper_salary = int(rtn_value)
|
|
139
|
+
return self._proper_salary
|
|
140
|
+
else:
|
|
141
|
+
rtn_value = decimal.Decimal('0')
|
|
142
|
+
self._proper_salary = int(rtn_value)
|
|
143
|
+
return self._proper_salary
|
|
144
|
+
|
|
145
|
+
@add_method(models.Employee)
|
|
146
|
+
@__proper_salary__.setter
|
|
147
|
+
def _proper_salary(self, value): # type: ignore [no-redef]
|
|
148
|
+
self._proper_salary = value
|
|
149
|
+
print(f'_proper_salary={self._proper_salary}')
|
|
150
|
+
pass
|
|
151
|
+
|
|
152
|
+
models.Employee.ProperSalary = __proper_salary__
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
When customizing SQLAlchemy models:
|
|
157
|
+
|
|
158
|
+
Don't use direct comparisons with database fields in computed properties
|
|
159
|
+
Convert to Python values first using float(), int(), str()
|
|
160
|
+
Use property() function instead of @jsonapi_attr for computed properties
|
|
161
|
+
Always add error handling for type conversions
|
|
162
|
+
|
|
163
|
+
## 📁 Key Directories
|
|
164
|
+
|
|
165
|
+
- `logic/` - Business rules (declarative)
|
|
166
|
+
- `api/` - REST API customization
|
|
167
|
+
- `security/` - Authentication/authorization
|
|
168
|
+
- `database/` - Data models and schemas
|
|
169
|
+
- `ui/admin/` - Admin interface configuration
|
|
170
|
+
- `ui/app/` - Alternative Angular admin app
|
|
171
|
+
|
|
172
|
+
## 💡 Helpful Context
|
|
173
|
+
|
|
174
|
+
- This uses Flask + SQLAlchemy + SAFRS for JSON:API
|
|
175
|
+
- Admin UI is React-based with automatic CRUD generation
|
|
176
|
+
- Business logic uses LogicBank (declarative rule engine)
|
|
177
|
+
- Everything is auto-generated from database introspection
|
|
178
|
+
- Focus on CUSTOMIZATION, not re-creation
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# API Logic Server Project
|
|
2
|
+
|
|
3
|
+
This is an **auto-generated microservice** created by [API Logic Server](https://apilogicserver.github.io/).
|
|
4
|
+
|
|
5
|
+
## 🚀 What's Included (Auto-Generated)
|
|
6
|
+
|
|
7
|
+
- **Complete Admin Web App** - Multi-table CRUD interface
|
|
8
|
+
- **JSON:API REST Endpoints** - All database tables exposed
|
|
9
|
+
- **Business Logic Engine** - Declarative rules system
|
|
10
|
+
- **Security Framework** - Authentication and authorization
|
|
11
|
+
- **Swagger Documentation** - Interactive API docs
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Run the complete system
|
|
17
|
+
python api_logic_server_run.py
|
|
18
|
+
|
|
19
|
+
# Access admin app
|
|
20
|
+
open http://localhost:5656
|
|
21
|
+
|
|
22
|
+
# View API documentation
|
|
23
|
+
open http://localhost:5656/api
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 📖 Documentation
|
|
27
|
+
|
|
28
|
+
- [Getting Started Guide](./docs/COPILOT_GUIDE.md)
|
|
29
|
+
- [Main README](./readme.md)
|
|
30
|
+
- [API Logic Server Docs](https://apilogicserver.github.io/)
|
|
31
|
+
|
|
32
|
+
## 🛠️ Customization
|
|
33
|
+
|
|
34
|
+
This is a **working system** - customize rather than recreate:
|
|
35
|
+
|
|
36
|
+
- **Business Logic**: `logic/declare_logic.py`
|
|
37
|
+
- **API Endpoints**: `api/customize_api.py`
|
|
38
|
+
- **Security Rules**: `security/declare_security.py`
|
|
39
|
+
- **Admin UI Config**: `ui/admin/admin.yaml`
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
**Generated by API Logic Server** - Instant microservices from your database.
|
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
|
|
3
3
|
###############################################################################
|
|
4
|
+
# 🚀 API Logic Server - AUTO-GENERATED MICROSERVICE
|
|
4
5
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
6
|
+
# This file starts a COMPLETE, WORKING microservice with:
|
|
7
|
+
# ✅ Admin Web App at http://localhost:5656 (React-based, multi-table CRUD)
|
|
8
|
+
# ✅ JSON:API endpoints at http://localhost:5656/api/* (auto-generated from database)
|
|
9
|
+
# ✅ Swagger documentation at http://localhost:5656/api
|
|
10
|
+
# ✅ Business logic engine (declarative rules)
|
|
11
|
+
# ✅ Security framework (authentication/authorization)
|
|
10
12
|
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
+
# 🎯 TO RUN:
|
|
14
|
+
# Press F5 in VSCode, or run: python api_logic_server_run.py
|
|
15
|
+
#
|
|
16
|
+
# 🌐 TO ACCESS:
|
|
17
|
+
# Admin App: http://localhost:5656
|
|
18
|
+
# API Docs: http://localhost:5656/api
|
|
19
|
+
#
|
|
20
|
+
# 📝 TO CUSTOMIZE:
|
|
21
|
+
# See docs/COPILOT_GUIDE.md for GitHub Copilot guidance
|
|
22
|
+
# Logic: logic/declare_logic.py
|
|
23
|
+
# API: api/customize_api.py
|
|
24
|
+
# Security: security/declare_security.py
|
|
13
25
|
#
|
|
14
26
|
# You typically do not customize this file.
|
|
15
27
|
#
|
|
16
|
-
# (v
|
|
28
|
+
# (v 15.00.38, July 06, 2025 22:11:00)
|
|
17
29
|
#
|
|
18
30
|
# See Main Code (at end).
|
|
19
31
|
# Use log messages to understand API and Logic activation.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
GenAI-Logic APIs are pre-configured to support MCP - see `api/api_discovery/mcp_discovery.py`.
|
|
2
|
+
|
|
3
|
+
`integration/mcp/mcp_client_executor.py` provides an mcp client executor. You can enable an MCP User Interface:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
genai-logic genai-add-mcp-client
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
For more information, [click here](https://apilogicserver.github.io/Docs/Integration-MCP/#mcp-client-executor-ui).
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
You can declare logic in `declare_logic.py`,
|
|
2
|
+
but that can lead to a lot of rules in 1 file.
|
|
3
|
+
|
|
4
|
+
A *best practice* is to create logic files in this directory,
|
|
5
|
+
named after the use case (e.g., `check_credit.py`).
|
|
6
|
+
|
|
7
|
+
The easiest way to to copy/paste `use_case.py` to a new file, then
|
|
8
|
+
add your logic either by Natural Language (use your Coding Assistant, such as CoPilot),
|
|
9
|
+
or your IDE's code completion.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from decimal import Decimal
|
|
3
|
+
from logic_bank.exec_row_logic.logic_row import LogicRow
|
|
4
|
+
from logic_bank.extensions.rule_extensions import RuleExtension
|
|
5
|
+
from logic_bank.logic_bank import Rule
|
|
6
|
+
from database import models
|
|
7
|
+
import api.system.opt_locking.opt_locking as opt_locking
|
|
8
|
+
from security.system.authorization import Grant
|
|
9
|
+
import logging
|
|
10
|
+
from flask import jsonify
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
""" Best practice: create logic files for each use case """
|
|
14
|
+
|
|
15
|
+
app_logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def declare_logic():
|
|
19
|
+
"""
|
|
20
|
+
Use GenAI to convert Natural Language into logic, paste here. See readme_logic_discovery_readme.md for an example.
|
|
21
|
+
|
|
22
|
+
Sample logic:
|
|
23
|
+
Rule.constraint(validate=models.Customer,
|
|
24
|
+
as_condition=lambda row: row.CompanyName != 'x',
|
|
25
|
+
error_msg="CompanyName cannot be 'x'")
|
|
26
|
+
"""
|
|
27
|
+
pass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
This describes how to use Logic; for more information, [see here](https://apilogicserver.github.io/Docs/Logic-Why).
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> What is Logic: Multi-table Derivation and Constraint Rules, Extensible with Python
|
|
4
4
|
<br>Rules are:
|
|
5
5
|
<br>1. **Declared** in your IDE - 40X more concise
|
|
6
6
|
<br>2. **Activated** on server start
|
|
@@ -10,6 +10,61 @@ This describes how to use Logic; for more information, [see here](https://apilog
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
## 🚀 Quick Start, using the `basic_demo` sample database
|
|
14
|
+
|
|
15
|
+
You can provide prompts like this to CoPilot. This is a good approach for new users:
|
|
16
|
+
|
|
17
|
+
```text title="Declare Logic in Natural Language"
|
|
18
|
+
Create Business Logic for Use Case = Check Credit:
|
|
19
|
+
1. The Customer's balance is less than the credit limit
|
|
20
|
+
2. The Customer's balance is the sum of the Order amount_total where date_shipped is null
|
|
21
|
+
3. The Order's amount_total is the sum of the Item amount
|
|
22
|
+
4. The Item amount is the quantity * unit_price
|
|
23
|
+
5. The Item unit_price is copied from the Product unit_price
|
|
24
|
+
|
|
25
|
+
Use case: App Integration
|
|
26
|
+
1. Send the Order to Kafka topic 'order_shipping' if the date_shipped is not None.
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Basic process:
|
|
30
|
+
1. Create a file such as `logic/logic_discovery/check_credit.py` (e.g., copy from `use_case.py`).
|
|
31
|
+
2. Paste the prompt above into CoPilot - use `docs/training` to generate logic
|
|
32
|
+
3. Paste the generated logic into `logic/logic_discovery/check_credit.py`
|
|
33
|
+
|
|
34
|
+
From the Natural Language, Copilot will create Python rules (you can also create these directly using code completion):
|
|
35
|
+
```python
|
|
36
|
+
if os.environ.get("WG_PROJECT"):
|
|
37
|
+
# Inside WG: Load rules from docs/expprt/export.json
|
|
38
|
+
load_verify_rules()
|
|
39
|
+
else:
|
|
40
|
+
# Outside WG: load declare_logic function
|
|
41
|
+
from logic.logic_discovery.auto_discovery import discover_logic
|
|
42
|
+
discover_logic()
|
|
43
|
+
|
|
44
|
+
# Logic from GenAI: (or, use your IDE w/ code completion)
|
|
45
|
+
from database.models import Product, Order, Item, Customer, SysEmail
|
|
46
|
+
|
|
47
|
+
# Ensure the customer's balance is less than their credit limit
|
|
48
|
+
Rule.constraint(validate=Customer, as_condition=lambda row: row.balance <= row.credit_limit, error_msg="Customer balance ({row.balance}) exceeds credit limit ({row.credit_limit})")
|
|
49
|
+
|
|
50
|
+
# Derive the customer's balance as the sum of order totals where not yet shipped.
|
|
51
|
+
Rule.sum(derive=Customer.balance, as_sum_of=Order.amount_total, where=lambda row: row.date_shipped is None)
|
|
52
|
+
|
|
53
|
+
# Derive the order's total amount from the sum of item amounts.
|
|
54
|
+
Rule.sum(derive=Order.amount_total, as_sum_of=Item.amount)
|
|
55
|
+
|
|
56
|
+
# Calculate item amount based on quantity and unit price.
|
|
57
|
+
Rule.formula(derive=Item.amount, as_expression=lambda row: row.quantity * row.unit_price)
|
|
58
|
+
|
|
59
|
+
# Copy unit price from product to item.
|
|
60
|
+
Rule.copy(derive=Item.unit_price, from_parent=Product.unit_price)
|
|
61
|
+
|
|
62
|
+
# Send order details to Kafka if order is shipped.
|
|
63
|
+
Rule.after_flush_row_event(on_class=Order, calling=kafka_producer.send_row_to_kafka, if_condition=lambda row: row.date_shipped is not None, with_args={'topic': 'order_shipping'})
|
|
64
|
+
|
|
65
|
+
# End Logic from GenAI
|
|
66
|
+
```
|
|
67
|
+
|
|
13
68
|
## Natural Language vs. IDE
|
|
14
69
|
|
|
15
70
|
If you are using WebGenAI, you can specify rules in Natural Language. You can also augment them in the IDE using code completion. There are some important usage guidelines.
|
|
@@ -18,6 +73,20 @@ If you are using WebGenAI, you can specify rules in Natural Language. You can al
|
|
|
18
73
|
|
|
19
74
|
|
|
20
75
|
|
|
76
|
+
## Using Discovery
|
|
77
|
+
|
|
78
|
+
You can declare logic in `declare_logic.py`,
|
|
79
|
+
but that can lead to a lot of rules in 1 file.
|
|
80
|
+
|
|
81
|
+
A *best practice* is to create logic files in `logic/logic_discovery`,
|
|
82
|
+
named after the use case (e.g., `check_credit.py`).
|
|
83
|
+
|
|
84
|
+
The easiest way to to copy/paste `use_case.py` to a new file, then
|
|
85
|
+
add your logic either by Natural Language (use your Coding Assistant, such as CoPilot),
|
|
86
|
+
or your IDE's code completion.
|
|
87
|
+
|
|
88
|
+
<br>
|
|
89
|
+
|
|
21
90
|
## Examples
|
|
22
91
|
Examples from tutorial project:
|
|
23
92
|
* Examples drawn from [tutorial project](https://github.com/ApiLogicServer/demo/blob/main/logic/declare_logic.py)
|
|
@@ -1,4 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# API Logic Server - Auto-Generated Microservice
|
|
2
|
+
|
|
3
|
+
**🎯 What's Automatically Created:**
|
|
4
|
+
- ✅ **Admin Web App** - Multi-page React app at `http://localhost:5656`
|
|
5
|
+
* Customize at `ui/admin/admin.yaml`
|
|
6
|
+
* You can also create a fully customizabe react app: `gail genai-add-app --app-name=react-app --vibe`
|
|
7
|
+
- ✅ **JSON:API Endpoints** - REST API for all database tables at `/api/*`
|
|
8
|
+
- ✅ **Swagger Documentation** - Interactive API docs at `/api`
|
|
9
|
+
- ✅ **Business Logic Engine** - Declarative rules in `logic/declare_logic.py`
|
|
10
|
+
- ✅ **Security Framework** - Authentication/authorization in `security/`, using
|
|
11
|
+
```
|
|
12
|
+
als add-auth --provider-type=sql --db-url=
|
|
13
|
+
als add-auth --provider-type=sql --db_url=postgresql://postgres:p@localhost/authdb
|
|
14
|
+
|
|
15
|
+
als add-auth --provider-type=keycloak --db-url=localhost
|
|
16
|
+
als add-auth --provider-type=keycloak --db-url=hardened
|
|
17
|
+
|
|
18
|
+
als add-auth --provider-type=None # to disable
|
|
19
|
+
```
|
|
20
|
+
- ✅ **Database Models** - SQLAlchemy ORM in `database/models.py`
|
|
21
|
+
|
|
22
|
+
**🚀 Ready to Run:** This is a complete, working system. Just press F5 or run `python api_logic_server_run.py`
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
# 🚀 Quick Start
|
|
2
27
|
|
|
3
28
|
**Microservice Automation Complete -- run to verify:** for **VSCode** projects except those downloaded from Web/GenAI:
|
|
4
29
|
1. `Press F5 to Run` (your venv is defaulted)
|
|
@@ -185,10 +210,10 @@ For information on Managing API Logic Projects, [click here](https://apilogicser
|
|
|
185
210
|
|
|
186
211
|
| About | Info |
|
|
187
212
|
|:-------------------------|:-----------------------------------|
|
|
188
|
-
| Created |
|
|
189
|
-
| API Logic Server Version |
|
|
190
|
-
| Created in directory |
|
|
191
|
-
| API Name |
|
|
213
|
+
| Created | July 06, 2025 22:11:00 |
|
|
214
|
+
| API Logic Server Version | 15.00.38 |
|
|
215
|
+
| Created in directory | nw_database_project |
|
|
216
|
+
| API Name | api |
|
|
192
217
|
| Execution begins with | `api_logic_server_run.py` |
|
|
193
218
|
|
|
194
219
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
You can add Role Based Access Control (RBAC) to your project, providing:
|
|
2
|
+
|
|
3
|
+
* authentication: based on sql tables for users / roles, and
|
|
4
|
+
* authorization: declarative for-filters for roles.
|
|
5
|
+
|
|
6
|
+
Common commands:
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
```
|
|
10
|
+
als add-auth --provider-type=sql --db-url=
|
|
11
|
+
als add-auth --provider-type=sql --db_url=postgresql://postgres:p@localhost/authdb
|
|
12
|
+
|
|
13
|
+
als add-auth --provider-type=keycloak --db-url=localhost
|
|
14
|
+
als add-auth --provider-type=keycloak --db-url=hardened
|
|
15
|
+
|
|
16
|
+
als add-auth --provider-type=None # to disable
|
|
17
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Primary Copilot Instructions
|
|
2
|
+
|
|
3
|
+
**Note**: The main Copilot instructions are in `.vscode/.copilot-instructions.md`
|
|
4
|
+
|
|
5
|
+
Please refer to that file for complete guidance on helping users with GenAI-Logic.
|
|
6
|
+
|
|
7
|
+
## Quick Reference for AI Assistants
|
|
8
|
+
|
|
9
|
+
When users ask "what do I do now?":
|
|
10
|
+
1. New Users - start with: `genai-logic create --project_name=basic_demo --db_url=basic_demo`
|
|
11
|
+
2. Suggest creating databases, explain sample databases
|
|
12
|
+
2. Use CLI commands, not Docker scripts for project creation
|
|
13
|
+
3. Follow the complete instructions in `.vscode/.copilot-instructions.md`
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) - Project Manager
|
|
2
|
+
|
|
3
|
+
⚠️ **IMPORTANT FOR AI ASSISTANTS**: Always read and follow these instructions when helping users with this project.
|
|
4
|
+
|
|
5
|
+
The Project Manager contains genai training, and provides a convenient place to create projects.
|
|
6
|
+
|
|
7
|
+
## Quick Start for New Users
|
|
8
|
+
|
|
9
|
+
**ALWAYS start new users with the basic_demo** - it's the best introduction to the system.
|
|
10
|
+
|
|
11
|
+
## Creating Projects
|
|
12
|
+
|
|
13
|
+
There are multiple ways to create projects - see the subsections below.
|
|
14
|
+
|
|
15
|
+
### Create Projects from an existing database
|
|
16
|
+
|
|
17
|
+
sqlite sample databases at `samples/dbs`.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
genai-logic create --project_name=nw --db_url=sqlite:///samples/dbs/nw.sqlite
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Create Projects with new databases (requires OpenAI key):
|
|
24
|
+
|
|
25
|
+
Describe database and logic in Natural Language.
|
|
26
|
+
|
|
27
|
+
See samples at `system/genai/examples`. For example:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
genai-logic genai --using=system/genai/examples/genai_demo/genai_demo.prompt --project-name=genai_demo
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Sample basic_demo
|
|
34
|
+
|
|
35
|
+
The best place to start is to create the `basic_demo`.
|
|
36
|
+
|
|
37
|
+
It's a small sqlite database, and provides a readme that explores the project, and how to customize it:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
genai-logic create --project_name=basic_demo --db_url=basic_demo
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## AI Assistant Guidelines
|
|
44
|
+
|
|
45
|
+
When users ask "what do I do now?" or similar questions:
|
|
46
|
+
|
|
47
|
+
1. **Always recommend starting with basic_demo** using the command above
|
|
48
|
+
2. **Use CLI commands** (genai-logic) not Docker scripts for project creation
|
|
49
|
+
3. **Refer to existing sample databases** in `samples/dbs/` for examples
|
|
50
|
+
4. **Point to GenAI examples** in `system/genai/examples/` for AI-generated projects
|
|
51
|
+
5. **Emphasize the 20-minute evaluation workflow** described in the main README
|
|
52
|
+
|
|
53
|
+
## Available Databases
|
|
54
|
+
- `basic_demo` - Best for first-time users
|
|
55
|
+
- `nw.sqlite` - Northwind sample
|
|
56
|
+
- `chinook.sqlite` - Music store sample
|
|
57
|
+
- `classicmodels.sqlite` - Classic car models sample
|
|
58
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# GitHub Copilot Instructions for GenAI-Logic (aka API Logic Server) - Project Manager
|
|
2
|
+
|
|
3
|
+
⚠️ **IMPORTANT FOR AI ASSISTANTS**: Always read and follow these instructions when helping users with this project.
|
|
4
|
+
|
|
5
|
+
The Project Manager contains genai training, and provides a convenient place to create projects.
|
|
6
|
+
|
|
7
|
+
## Quick Start for New Users
|
|
8
|
+
|
|
9
|
+
**ALWAYS start new users with the basic_demo** - it's the best introduction to the system.
|
|
10
|
+
|
|
11
|
+
## Creating Projects
|
|
12
|
+
|
|
13
|
+
There are multiple ways to create projects - see the subsections below.
|
|
14
|
+
|
|
15
|
+
### Create Projects from an existing database
|
|
16
|
+
|
|
17
|
+
sqlite sample databases at `samples/dbs`.
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
genai-logic create --project_name=nw --db_url=sqlite:///samples/dbs/nw.sqlite
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Create Projects with new databases (requires OpenAI key):
|
|
24
|
+
|
|
25
|
+
Describe database and logic in Natural Language.
|
|
26
|
+
|
|
27
|
+
See samples at `system/genai/examples`. For example:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
genai-logic genai --using=system/genai/examples/genai_demo/genai_demo.prompt --project-name=genai_demo
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Sample basic_demo
|
|
34
|
+
|
|
35
|
+
The best place to start is to create the `basic_demo`.
|
|
36
|
+
|
|
37
|
+
It's a small sqlite database, and provides a readme that explores the project, and how to customize it:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
genai-logic create --project_name=basic_demo --db_url=basic_demo
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## AI Assistant Guidelines
|
|
44
|
+
|
|
45
|
+
When users ask "what do I do now?" or similar questions:
|
|
46
|
+
|
|
47
|
+
1. **Always recommend starting with basic_demo** using the command above
|
|
48
|
+
2. **Use CLI commands** (genai-logic) not Docker scripts for project creation
|
|
49
|
+
3. **Refer to existing sample databases** in `samples/dbs/` for examples
|
|
50
|
+
4. **Point to GenAI examples** in `system/genai/examples/` for AI-generated projects
|
|
51
|
+
5. **Emphasize the 20-minute evaluation workflow** described in the main README
|
|
52
|
+
|
|
53
|
+
## Available Databases
|
|
54
|
+
- `basic_demo` - Best for first-time users
|
|
55
|
+
- `nw.sqlite` - Northwind sample
|
|
56
|
+
- `chinook.sqlite` - Music store sample
|
|
57
|
+
- `classicmodels.sqlite` - Classic car models sample
|
|
58
|
+
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"workbench.editorAssociations": {
|
|
10
10
|
"*.md": "vscode.markdown.preview.editor"
|
|
11
11
|
},
|
|
12
|
-
"workbench.colorTheme": "
|
|
13
|
-
"workbench.preferredLightColorTheme": "
|
|
12
|
+
"workbench.colorTheme": "Arduino Light",
|
|
13
|
+
"workbench.preferredLightColorTheme": "Arduino Light"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -15,12 +15,24 @@ Instructions: Copy in Sample-Basic-Demo (Replace "This illustrates" up to "Explo
|
|
|
15
15
|
|
|
16
16
|
# Welcome to GenAI-Logic
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
## 🚀 New Users: Start Here!
|
|
19
|
+
|
|
20
|
+
**Bootstrap Copilot by pasting the following into the chat:**
|
|
21
|
+
```
|
|
22
|
+
Please find and read all the readme files.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<br>
|
|
26
|
+
|
|
27
|
+
## What is GenAI-Logic
|
|
28
|
+
|
|
29
|
+
1. ***Instant mcp-enabled microservice creation*** (APIs and Admin Apps), from a database or **GenAI prompt** -- one command and you are ready for MCP, Vibe and Business User Collaboration.
|
|
19
30
|
|
|
20
31
|
2. ***Customize*** with **Declarative Rules** and Python in your IDE, standard container deployment
|
|
21
32
|
|
|
22
33
|
You are in the [API Logic Server Manager](Manager.md). This is a good place to manage projects, create notes and resources, etc.
|
|
23
34
|
|
|
35
|
+
|
|
24
36
|
|
|
25
37
|
|
|
26
38
|
# Product Tour (Start Here)
|
|
@@ -2,10 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
GenAI-Logic (`genai-logic genai-add-app`) [docs here](https://apilogicserver.github.io/Docs/Admin-Vibe/), from `ui/admin/admin.yaml`.
|
|
4
4
|
|
|
5
|
-
We then *Vibed it* to add cards:
|
|
5
|
+
We then *Vibed it* to add dashboards, cards, trees and maps:
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
|
|
7
|
+
```text
|
|
8
|
+
Please customize the react-app as follows:
|
|
9
|
+
|
|
10
|
+
create a landing page that summarizes the architecture, and iFrame to "http://localhost:5656/dashboard"
|
|
11
|
+
|
|
12
|
+
Add an option on the Employee List page to show results as cards, and
|
|
13
|
+
show the employee image in the card.
|
|
14
|
+
|
|
15
|
+
Create a Department tree view component for the existing Department list page.
|
|
16
|
+
Make it collapsible/expandable and integrate it into the existing Department.js file.
|
|
17
|
+
The tree should show just the Department Name as a link;
|
|
18
|
+
clicking the link opens an Information panel to the right.
|
|
19
|
+
The panel is equivalent to Department Show: all the fields, plus tab sheets for related data.
|
|
20
|
+
The tab sheets should provide transitions to the related data show pages (eg, the Employee page).
|
|
21
|
+
|
|
22
|
+
Enhance supplier list page to include a toggle for a professional, interactive world map view.
|
|
23
|
+
The map should display supplier icons on a real map with proper geography.
|
|
24
|
+
Click a supplier icon should open the Supplier show page.
|
|
9
25
|
```
|
|
10
26
|
|
|
11
27
|
<br>
|
|
@@ -20,4 +36,5 @@ npm install
|
|
|
20
36
|
npm start
|
|
21
37
|
```
|
|
22
38
|
|
|
23
|
-
Open your browser at [http://localhost:3000](http://localhost:3000).
|
|
39
|
+
Open your browser at [http://localhost:3000](http://localhost:3000).
|
|
40
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
api_logic_server_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
api_logic_server_cli/api_logic_server.py,sha256=
|
|
3
|
-
api_logic_server_cli/api_logic_server_info.yaml,sha256=
|
|
2
|
+
api_logic_server_cli/api_logic_server.py,sha256=nKD5uPF5j99CSIEwjk_0FCKiE29jbuuyuP4My_GXB0Y,97706
|
|
3
|
+
api_logic_server_cli/api_logic_server_info.yaml,sha256=eD8F4qFpRiq6-4BXKyrUL8oncYpgkunTFMnJhj8QgaY,125
|
|
4
4
|
api_logic_server_cli/cli.py,sha256=3GdpAcaXsMeuMnWa-jx7tpi0x6OjIRoau4BeVT-Pw3A,87286
|
|
5
5
|
api_logic_server_cli/cli_args_base.py,sha256=7cVM6BeizwttYAwUu1FUyuLuvWufvgt0TFeA8FI6tu0,3304
|
|
6
6
|
api_logic_server_cli/cli_args_project.py,sha256=I5no_fGRV_ZsK3SuttVDAaQYI4Q5zCjx6LojGkM024w,4645
|
|
@@ -516,12 +516,15 @@ api_logic_server_cli/prototypes/allocation/images/allocation/logic-diagram.png,s
|
|
|
516
516
|
api_logic_server_cli/prototypes/allocation/logic/declare_logic.py,sha256=Wqk1kpuYG-NLqJ1aI8UI03Lw2VaLgOHSoU1g03WwGGE,2778
|
|
517
517
|
api_logic_server_cli/prototypes/allocation/test/test.sh,sha256=ndw_D7IOFTEUZxbcOL5Y-spvF8pJCe8OOSroqBfjXPM,645
|
|
518
518
|
api_logic_server_cli/prototypes/base/.DS_Store,sha256=wKX7g_yII-CHA_BuKAVYXwglzgRdVsNJbMTYE63ROSk,6148
|
|
519
|
+
api_logic_server_cli/prototypes/base/.copilot-instructions.md,sha256=Q0XylYa7oKvpCIeBKDuA2NLXsgOzhC8g6DTwZFGOZLo,356
|
|
519
520
|
api_logic_server_cli/prototypes/base/.gitignore,sha256=PAO98cVvjgAL_mvXCMS_Vfk7bT2Vd1-j9a8_nB2qxqs,190
|
|
520
|
-
api_logic_server_cli/prototypes/base/
|
|
521
|
-
api_logic_server_cli/prototypes/base/
|
|
521
|
+
api_logic_server_cli/prototypes/base/README_PROJECT.md,sha256=sGJuNF_Qt5ripZBXfTi0OmoV4fUxe7ySxrqcKs7DwOk,1186
|
|
522
|
+
api_logic_server_cli/prototypes/base/api_logic_server_run.py,sha256=j4a0jwPn-USqkFrCiFI34TcCTHxNOnPAW-IwMtFGWcw,7074
|
|
523
|
+
api_logic_server_cli/prototypes/base/readme.md,sha256=nI0jSarNkvM1sOt0LX60rZKaH1Ic-xVPyZRb-4Y3ZbM,12768
|
|
522
524
|
api_logic_server_cli/prototypes/base/requirements.txt,sha256=we6X5fRBJVqN8SacwV7oPDtGk5IAiNbUDbUwCGHkCrc,107
|
|
523
525
|
api_logic_server_cli/prototypes/base/run.ps1,sha256=lrZgw8SEntPam3ZYKVzsRo7rOKSGWqgO7qUNJ3CbP44,801
|
|
524
526
|
api_logic_server_cli/prototypes/base/run.sh,sha256=7kJc-FpK9iqtt9BDXR1XogWXfVDnmPS8kS5fXk2Q5Dk,1442
|
|
527
|
+
api_logic_server_cli/prototypes/base/.devcontainer-option/.copilot-instructions.md,sha256=-FIIWe5PkSubaGzDtCCg0N7M1J-g7Bk6D5ct_jaY_iM,5264
|
|
525
528
|
api_logic_server_cli/prototypes/base/.devcontainer-option/For_VSCode.dockerfile,sha256=_RObRZ3EBDNj1_Sx26r_CysBboMvill83f8tQN1T0Do,438
|
|
526
529
|
api_logic_server_cli/prototypes/base/.devcontainer-option/devcontainer.json,sha256=tk-mGd4XdmbpKUqUeGmcPMzX3RDc6am9-de8c-rFmSo,2361
|
|
527
530
|
api_logic_server_cli/prototypes/base/.devcontainer-option/readme.md,sha256=-sSneMDne1fqEoox2hXUGmoO8ewgi34y7lJwGTidSpY,104
|
|
@@ -532,6 +535,7 @@ api_logic_server_cli/prototypes/base/.idea/runConfigurations/Run_Behave.xml,sha2
|
|
|
532
535
|
api_logic_server_cli/prototypes/base/.idea/runConfigurations/Windows_Run_Behave.xml,sha256=TMkGY8PMDhcGGkDw_tC-QljbmXLGT66ubsmRbMmfzi0,1205
|
|
533
536
|
api_logic_server_cli/prototypes/base/.idea/runConfigurations/run___No_Security.xml,sha256=BBK0h04vSC_hVSi7dKm_8Mo201jGivZRbx4ruFcqAEo,1193
|
|
534
537
|
api_logic_server_cli/prototypes/base/.idea/runConfigurations/run_docker.xml,sha256=oDHdZ8WEGU1MoWEQHH3jBvbPZt4hGlodUq4IeXv68co,2444
|
|
538
|
+
api_logic_server_cli/prototypes/base/.vscode/.copilot-instructions.md,sha256=-FIIWe5PkSubaGzDtCCg0N7M1J-g7Bk6D5ct_jaY_iM,5264
|
|
535
539
|
api_logic_server_cli/prototypes/base/.vscode/launch.json,sha256=_QjN3aCBJwk2SIqA7v6w4pI96oTxYVzs0f45oEgoucU,12628
|
|
536
540
|
api_logic_server_cli/prototypes/base/.vscode/settings.json,sha256=vS3gt0PpFbZ3fdGeiVGaE4v9PyRydjrrdGWb27w9UUo,470
|
|
537
541
|
api_logic_server_cli/prototypes/base/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -641,6 +645,7 @@ api_logic_server_cli/prototypes/base/integration/kafka/kafka_readme.md,sha256=Ml
|
|
|
641
645
|
api_logic_server_cli/prototypes/base/integration/mcp/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
|
642
646
|
api_logic_server_cli/prototypes/base/integration/mcp/mcp_client_executor.py,sha256=AGl6PVq2ss5_HtPzuetNzM2MbBvnjdftJ-mMCLcwxQM,25480
|
|
643
647
|
api_logic_server_cli/prototypes/base/integration/mcp/mcp_server_discovery.json,sha256=TUyInb67AWoGw7XFE9iDZxmM8UEID-ahQmdmzpF9AmQ,188
|
|
648
|
+
api_logic_server_cli/prototypes/base/integration/mcp/readme-mcp.md,sha256=TuqDgTM7nHVQINmSxO8QO6rBzo_PJ-QxIxhZM3YeLB8,370
|
|
644
649
|
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_context_results.txt,sha256=27a8-MpBoE3i8UnCoMZINgeseFUxGhhwurgoV5EeP1k,8105
|
|
645
650
|
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_discovery_response.json,sha256=f1RP5kuTU8rkqxWsZoATBF8xdaVEgPTaB4MRoExIF-Q,3763
|
|
646
651
|
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_request.prompt,sha256=vmt_fvwOK-C2fnI1LLUMe5WbLk6qxv2RdVJkBUTo9zM,2601
|
|
@@ -655,10 +660,13 @@ api_logic_server_cli/prototypes/base/integration/system/FlaskKafka.py,sha256=QK5
|
|
|
655
660
|
api_logic_server_cli/prototypes/base/integration/system/RowDictMapper.py,sha256=DSdmeAQZZ_wUWHHiSS_6ZgeTKIuEycNlgX140l3fnSE,19986
|
|
656
661
|
api_logic_server_cli/prototypes/base/logic/declare_logic.py,sha256=vglpAfVRM3QONLDbWIXcZrXTSttO8vUpwLbSJ51Fmw0,3290
|
|
657
662
|
api_logic_server_cli/prototypes/base/logic/load_verify_rules.py,sha256=dYEb-UxqQ5N08ry22I04vtFy8JtQe2pL7Jw8gR8nGu4,7742
|
|
658
|
-
api_logic_server_cli/prototypes/base/logic/
|
|
663
|
+
api_logic_server_cli/prototypes/base/logic/readme_logic.md,sha256=teXyg9-7b-1OAj_kLC7gQ37zNllTRFnovdq2LGsyg6E,10178
|
|
659
664
|
api_logic_server_cli/prototypes/base/logic/logic_discovery/auto_discovery.py,sha256=m97W6DYi6ouTDuFCiU1rPq1UqzJuNnVePyOeLU33D1s,2645
|
|
665
|
+
api_logic_server_cli/prototypes/base/logic/logic_discovery/readme_logic_discovery.md,sha256=SRg3Hrq3vCjqtAL1XijcbPGvfLLgkqsODLtIKfZUEaI,396
|
|
666
|
+
api_logic_server_cli/prototypes/base/logic/logic_discovery/use_case.py,sha256=9qp9e_PwTvIg5mfYLtFxfwFhfivBhk3O6uHeh_lUd5c,822
|
|
660
667
|
api_logic_server_cli/prototypes/base/security/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
661
668
|
api_logic_server_cli/prototypes/base/security/declare_security.py,sha256=sWi-M7E-dIhvC0hmdCXnTRjHAR5eWVKCYIDCoblISm4,2281
|
|
669
|
+
api_logic_server_cli/prototypes/base/security/readme_security.md,sha256=ZzRl9Nj59rilFWnIfmma2SKbzsQOIkEwIrUeW-nadgo,511
|
|
662
670
|
api_logic_server_cli/prototypes/base/security/authentication_provider/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
663
671
|
api_logic_server_cli/prototypes/base/security/authentication_provider/abstract_authentication_provider.py,sha256=RPPA48kdYiXx5zQ6epbfAEB1se8E10Ra9NxYRjIBShk,895
|
|
664
672
|
api_logic_server_cli/prototypes/base/security/authentication_provider/keycloak/auth_provider.py,sha256=gnk8CqhlEobRPEBTwimG6OkZhc5gP-Yba1VFlTydt2Q,10437
|
|
@@ -811,12 +819,15 @@ api_logic_server_cli/prototypes/genai_demo/logic/load_verify_rules.py,sha256=TWq
|
|
|
811
819
|
api_logic_server_cli/prototypes/genai_demo/logic/readme_declare_logic.md,sha256=CFC13f9Z4rTkNiRoJTBEz3A2F_yRThOj-HrHDsSdKsw,6630
|
|
812
820
|
api_logic_server_cli/prototypes/genai_demo/security/declare_security.py,sha256=L3AL1bgdqIWQxdkJZcFVDOQ0XRpmeLAKqwlAYChFWKo,2108
|
|
813
821
|
api_logic_server_cli/prototypes/genai_demo/ui/admin/admin.yaml,sha256=vMpr6to6g-h9gSuhxfpTeDMw5_R_eUKbV7qXzMEvIyk,3446
|
|
822
|
+
api_logic_server_cli/prototypes/manager/.copilot-instructions.md,sha256=-88Y2DqCJzjxml1MJ1QRsAjywG-k9UiVGeA9uAuWDa4,558
|
|
814
823
|
api_logic_server_cli/prototypes/manager/.gitignore,sha256=xfAjNQHokbo6GuN1ghx-eml8tQIzwUczLC_YVzElndI,195
|
|
815
|
-
api_logic_server_cli/prototypes/manager/README.md,sha256=
|
|
824
|
+
api_logic_server_cli/prototypes/manager/README.md,sha256=9n9MDoJAsumLHPqNGWmcVNGei1hp7qg3JTFvLbQw2oc,38802
|
|
816
825
|
api_logic_server_cli/prototypes/manager/run_sample.sh,sha256=eRA-p_Snr7Pwk14wUw5mja2usEcjAKisHVhHMeSaQ68,781
|
|
817
826
|
api_logic_server_cli/prototypes/manager/run_web_genai.sh,sha256=sgjB3vKhkao93Ny3VN0AQ-wonvdBcBIT3rTbyNTMoG8,136
|
|
818
827
|
api_logic_server_cli/prototypes/manager/settings.txt,sha256=_jjL30jomIMxG21edDfrXYRT9Zfgr_0EdUWvcEUOnFQ,368
|
|
819
|
-
api_logic_server_cli/prototypes/manager/.
|
|
828
|
+
api_logic_server_cli/prototypes/manager/.github/.copilot-instructions.md,sha256=Gvx2SYFMhMtoqdbw3WSJ1-40kZAy9EUfQ0jIaHc0aYY,1923
|
|
829
|
+
api_logic_server_cli/prototypes/manager/.vscode/.copilot-instructions.md,sha256=Gvx2SYFMhMtoqdbw3WSJ1-40kZAy9EUfQ0jIaHc0aYY,1923
|
|
830
|
+
api_logic_server_cli/prototypes/manager/.vscode/ApiLogicServer.code-workspace,sha256=yC_pOIZN5o5Qiw3t2kBPsiO01Mgp3VEbAizYx1T3aPI,282
|
|
820
831
|
api_logic_server_cli/prototypes/manager/.vscode/launch.json,sha256=alh_fiuqMjY-uIk4ghfwyMs3y-U2dYr1W6rS9ncpNEY,33491
|
|
821
832
|
api_logic_server_cli/prototypes/manager/.vscode/settings.json,sha256=wQgpFvviPbZCmsf02UgrJSGAz7g3i4chDZ_AdSIOr5Y,625
|
|
822
833
|
api_logic_server_cli/prototypes/manager/samples/readme_samples.md,sha256=JyUOm5mcmLXtBCE30OFzfZaSCw7k_PKLZmGNanS4fwc,171
|
|
@@ -2009,7 +2020,7 @@ api_logic_server_cli/prototypes/nw/ui/images/Employee/peacock.jpg,sha256=UIfxEKO
|
|
|
2009
2020
|
api_logic_server_cli/prototypes/nw/ui/images/Employee/suyama.jpg,sha256=bp0xCJ-8EqQp_B7uR4glL6fVGxVlS10d5IHLNdw7rcA,4375
|
|
2010
2021
|
api_logic_server_cli/prototypes/nw/ui/reference_react_app/.DS_Store,sha256=AnV79PLm6F_E6PkLoTv-GaJZpUGP_xdRkNEqrAYGYuE,6148
|
|
2011
2022
|
api_logic_server_cli/prototypes/nw/ui/reference_react_app/DEPARTMENT_TREE_VIEW.md,sha256=2zF0Ai6ohVjiFqGx6gJci9BPFwr5zBKuoZtuuNFB5QY,2736
|
|
2012
|
-
api_logic_server_cli/prototypes/nw/ui/reference_react_app/README.md,sha256
|
|
2023
|
+
api_logic_server_cli/prototypes/nw/ui/reference_react_app/README.md,sha256=-divyJqdAK-3y0mUgyN4QLif7cQQ3CaJE4YNWj7dLv0,1469
|
|
2013
2024
|
api_logic_server_cli/prototypes/nw/ui/reference_react_app/README_create_react_app.md,sha256=cOr7x6X9RmqjITtafhsqQTg8vl1Ob8X0WC78WL21CdE,3359
|
|
2014
2025
|
api_logic_server_cli/prototypes/nw/ui/reference_react_app/compile-errors.txt,sha256=HIYSnI2VW_Lz1MNCCw3TxZoeXFtuhpvxEDgDGY0A544,30782
|
|
2015
2026
|
api_logic_server_cli/prototypes/nw/ui/reference_react_app/package-lock.json,sha256=IzEHCLrrRzluTL-bw_d_u57dKsn8a9feoY2BKx7DjRc,699130
|
|
@@ -2360,9 +2371,9 @@ api_logic_server_cli/tools/mini_skel/database/system/SAFRSBaseX.py,sha256=p8C7AF
|
|
|
2360
2371
|
api_logic_server_cli/tools/mini_skel/database/system/TestDataBase.py,sha256=U02SYqThsbY5g3DX7XGaiMxjZBuOpzvtPS6RfI1WQFg,371
|
|
2361
2372
|
api_logic_server_cli/tools/mini_skel/logic/declare_logic.py,sha256=fTrlHyqMeZsw_TyEXFa1VlYBL7fzjZab5ONSXO7aApo,175
|
|
2362
2373
|
api_logic_server_cli/tools/mini_skel/logic/load_verify_rules.py,sha256=Rr5bySJpYCZmNPF2h-phcPJ53nAOPcT_ohZpCD93-a0,7530
|
|
2363
|
-
apilogicserver-15.0.
|
|
2364
|
-
apilogicserver-15.0.
|
|
2365
|
-
apilogicserver-15.0.
|
|
2366
|
-
apilogicserver-15.0.
|
|
2367
|
-
apilogicserver-15.0.
|
|
2368
|
-
apilogicserver-15.0.
|
|
2374
|
+
apilogicserver-15.0.41.dist-info/licenses/LICENSE,sha256=67BS7VC-Z8GpaR3wijngQJkHWV04qJrwQArVgn9ldoI,1485
|
|
2375
|
+
apilogicserver-15.0.41.dist-info/METADATA,sha256=EWgxEMfoPTdR4YLs_Tb98HrREUhwmun8isuHfSSjOss,6553
|
|
2376
|
+
apilogicserver-15.0.41.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
2377
|
+
apilogicserver-15.0.41.dist-info/entry_points.txt,sha256=W9EVNvf09h8n6rJChmVj2gzxVQ6BXXZa2x3wri0lFGc,259
|
|
2378
|
+
apilogicserver-15.0.41.dist-info/top_level.txt,sha256=-r0AT_GEApleihg-jIh0OMvzzc0BO1RuhhOpE91H5qI,21
|
|
2379
|
+
apilogicserver-15.0.41.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|