Share My Creation [Project Template] [Web] Pakai Server v6

Pakai Server​

Version 6.99

Pakai Server is a full-stack B4J project template for building modern web applications and REST APIs. It generates all HTML server-side using B4X code (no client-side rendering), leverages HTMX for dynamic interactions without custom JavaScript, and includes both a Web UI and a REST API with auto-generated OpenAPI 3.0 documentation and Swagger UI.

GitHub: https://github.com/pyhoon/pakai-server-b4j

Pakai Server v6.00
Overview

Files:​

  • Pakai Server (6.99).b4xtemplate (52KB)
  • Pakai Server Api (6.99).b4xtemplate (40KB)
  • Pakai Server Web (6.99).b4xtemplate (34KB)
  • swagger.zip (509KB)

Libraries:​

Extensions:​

Features​

  • Frontend using HTMX v2.0.8, AlpineJS v3.15.8, Bootstrap v5.3.8, Bootstrap Icons v1.13.1
  • Responsive design with modal dialog and toast
  • SQLite and MySQL/MariaDB backend
  • Built-in CRUD/REST API examples

Improvement​

  • Better UI/UX/DX compared to version 5.x
  • More flexible to generate new models
  • HTML generated using B4X
  • No JavaScript module
  • No jQuery AJAX parsing
  • JSON/XML API supported
  • HelpHandler (API documentation) through WebApiUtils

Tutorial​

https://www.b4x.com/android/forum/threads/pakai-framework-v6.169286/ (outdated)
Please check updated tutorial: https://github.com/pyhoon/pakai-server-b4j/blob/main/TUTORIAL.md
and libraries tutorial: https://github.com/pyhoon/pakai-server-b4j/blob/main/TUTORIAL-LIBRARIES.md on GitHub

Reminder: Please do not post issue or question on this thread.
Always remember to start a new thread for any question and prefix with [Pakai v6].
 

Attachments

  • theme.zip
    2.2 KB · Views: 129
  • Pakai Server (6.99).b4xtemplate
    51.4 KB · Views: 8
  • Pakai Server Api (6.99).b4xtemplate
    39.6 KB · Views: 9
  • Pakai Server Web (6.99).b4xtemplate
    33 KB · Views: 8
  • swagger.zip
    508.6 KB · Views: 9
Last edited:

Mashiane

Expert
Licensed User
Longtime User
PATCH to the server in addition to GET and POST.
In most cases, this is a security based feature. I remember that I had to "trick" one php app I was using, by passing a "PUT" call, however internally server side made it to execute "PATCH", in most cases even ISP do no allow use of PATCH anymore via REST API.
 

aeric

Expert
Licensed User
Longtime User
Basically, we can use PUT or POST to update a record.
In fact, in my example, the update which is using PUT is actually doing a "PATCH" because I only do a partial update to the record.
So it is actually depends on how you design the API and handle the logic. You may define a scope in the header for an API to distinguish 2 different types of updates or use a slightly different URL for partial or full update.
In database CRUD, I think most of the time, we only do partial update. Hence, PUT is responsible to do the update which is behave more like a PATCH in this case.
 
Top