ApiLogicServer - Automated React Admin Creation
This is the source code for a React Admin app, created automatically by APILogicServer.
View live demo! (username is admin and password is p)
You can run it locally as described below in Installation.
Background
What: Working Software, Now
API Logic Server introspects your database, and creates an executable, customizable project from a single command:
ApiLogicServer run # defaults to pre-installed sample database
ApiLogicServer creates the complete project below from your data model, including:
-
Models: SQLAlchemy requires model classes; these are created automatically from the database
- You can customize the model, e.g., denormalizations, hybrid (virtual) attributes, and supply missing relationships.
-
API: a JSON:API from SAFRS, used by the react-admin app, via ra-jsonapi-client
-
Logic: declare transactional logic using spreadsheet-like rules (multi-table derivations and constraints)
- 40x more concise than code, extensible with standard python - explore it here
-
UI: multi-page, multi-table react-admin apps as shown below
Why: agile collaboration / iteration, business agility
So, in a few seconds, you can create working projects that would otherwise require weeks or months, and then customize them.
-
Agile: working sofware now enables you to collaborate with business users over working screens, as a basis for iterations. This is the basis of the Agile Manifesto.
-
Business Agility: this declarative approach provides remarkable competitive advantage in time to market, and responding to business change.
This positions react-admin with strategic advantages over competitive frameworks:
-
Backend automation, with unique transaction logic
Backend transaction logic is signicant - often nearly half the effort for such systems. Reducing code by 40X can have a dramatic effect on delivery and iteration.
-
Zero learning curve
A sophisticated multi-page, multi-table app (not Hello World!) is running in moments, with zero learning curve. Customize the app, by editing working software.
Multi-page, Multi-Table Application
Observe the following screens created from the sample database:
Customer List
List screens support filtering, sorting and pagination.
Note that fields are intelligently ordered - name fields first, Id fields last, etc.
Clicking a row opens Customer Show
, below.
Customer Show
Show screens show all the attributes of an object, with a tab sheet showing a list of related Child rows.
Clicking a child row opens up its show page, enabling you to walk the database relationships.
Order Show
Observe the automatic joins, so you can see the Product Name instead of the Product Id (not currently working).
Generated Project
The UI components includes a react-admin folder:
Customizable - Backend and Frontend
API Logic server backends are customizable as described here.
Likewise, the created react-admin project preserves the customize without ejecting approach of react-admin.
Status - technology exploration
API Logic Server react-admin creation services are not yet suitable for use. They are available to support technology exploration.
Key Issue - Joins
As shown on the Order Show ("missing joins - product name), joins are not yet operaational. Support appears to be available in the react-admin enterprise edition, but has not been tried.
Is joins support required from ra-json-api-client?
We are seeking collaborators.
Installation
Before you install this react app for APILogicServer, you need to have npm, node and yarn installed on your local machine.
Use this website to install npm, node and yarn - https://nodejs.org/en/download/.
yarn install
This will install all the dependencies listed within package.json.
yarn start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
yarn build
Builds the app for production to the build
folder.\
How to Get Support
Contact the developers: meera.datey@gmail.com or valjhuber@gmail.com.