Architecture
Full Stack - Open Source
Full Stack - Open Source
GenAI Logic consists of 2 products.
A web site for creating, iterating and running projects, using your browser
A local install to Create, Customize and Run Projects using the CLI and your IDE
Projects are deployed as standard containers - cloud or your site
When you submit your prompt to WebGenAI, it calls ChatGPT to obtain a database creation script, and calls the API Logic Server (als) CLI to create a project for the created database. This includes the SqlAlchemy models. The models are also used to create the yaml file that implements the SAFRS-RA App, and the SAFRS API on which it operates.
At runtime, SAFRS uses the models to expose JSON_API "crud" endpoints for database read/update. SAFRS responds to API calls by using SQLAlchemy to read and write data.
Your logic is stored in the project as Python source that calls LogicBank to load the rules when the project starts. The rules are either directly entered via the IDE using code completion, or translated into the same logic from Natural Language.
LogicBank is pre-configured to load the rules (whether from GenAI or the IDE) on project start. On commit, LogicBank handles SqlAlchemy events to discover the old/new rows; it uses attribute-level analysis to watch which attributes have changed, and react by running the relevant rules. These rules might chain and trigger the execution of other rules, possibly in other tables. Data access, ordering and transaction management are fully automated.
Use WebGenAI or your IDE and CLI to create full running systems in 1 minute from:
a Natural Language prompt, or
an existing database
Provide declarative business logic, either in Natural Language or using IDE code code completion.
Simple projects are ready to deploy. See the Time Tracking example.
For complex projects, leverage the full power of your IDE to customize. And, use the new generation of AI Coding tools, such as CoPilot, Claude, All Hands, etc.
Deploy standard containers to the cloud or on-premise.
GenAI-Logic is not a thin layer over existing GenAI. It creates models (not code) that leverage sophisticated underling engines.
NO - copy that section
Programmers are understandably wary of code generators. These often take simple inputs, and create hundreds / thousands of lines of code. The automation is nice, but understanding and customizing the generated code can be a nightmare. FrankenCode.
Why can't we just run the cocktail napkin?
Models are the antidote: clear, succinct declarations of what, not how. They make the cocktail napkin executable.
Models are expressed in a Domain Specific Language (DSL). These typically invoke underlying runtime engines.
Accordingly, GenAI-Logic creates models, not code. This applies to all elements of system, as shown here.
Contrast this to many AI Coding Tools that are Natural Language Code Generators. That's the road to FrankenCode.
Effective prototypes require sophisticated apps to read / update data - multiple pages with related data, page navigations, automatic joins, lookups, etc.
This typically involves enormous amounts of complex HTML, CSS and JavaScript. This would be tedious to understand and customize.
Instead, GenAI-Logic creates a model file in yaml. As shown at right, you can edit to control captions, field order, even when fields are displayed / hidden. These declarations are handled by the Safrs React Admin runtime engine.
Enterprise-class APIs require a great deal of sophistication:
Endpoint for each table, with CRUD support - create, read, update and delete.
Filtering, sorting, pagination, including related data access, based on relationships in the models file (typically derived from foreign keys)
Automatic Swagger
Enforces logic and security - partitioning of logic from (each) client app
The entire API creation process is shown at right. It is completely driven off the data model, relying on the sophisticated SAFRS API engine.
Add new endpoints using standard Flask and SQLAlchemy - see here.
Built on Open Source