Skip to content

Structure

Project Structure

When you create an ApiLogicProject, the system creates a project like this that you customize in your API:

Explore the Tutorial Project, and observe that the projects are rather small. That is because the syste creates models that define what, not now. Explore the project and you will find it easy to understand the API, data model, app and logic files.

Note the entire project is file-based, which makes it easy to perform typical project functions such as source control, diff, merge, code reviews etc.

Customizing ApiLogicProjects

You will typically want to customize and extend the created project. Edit the files described in the subsections below.

The 2 indicated files in the tree are the Python files that run for the Basic Web App and the API Server.

Projects are created from a system-supplied prototype. You can use your own prototype from git (or a local directory) using the from_git parameter.

Project Architecture

ApiLogicServer creates a standard Flask-based 3-tier architecture:

  • Flask enables you to write custom web apps, and custom api end points

    • ApiLogicServer automatically creates an Admin App using safrs-react-admin, useful for back-office admin access and prototyping
  • SAFRS provides the API, which you can use to support mobile apps and internal / external integration

  • SQLAlchemy provides data access.

  • Logic Bank listens for updates, and applies your declared logic, for both API and web app updates.