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: 131
  • Pakai Server (6.99).b4xtemplate
    51.4 KB · Views: 10
  • Pakai Server Api (6.99).b4xtemplate
    39.6 KB · Views: 11
  • Pakai Server Web (6.99).b4xtemplate
    33 KB · Views: 10
  • swagger.zip
    508.6 KB · Views: 11
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.
 

hatzisn

Expert
Licensed User
Longtime User
Hi,

I am contacting you because of what you have posted in the Pakai Server v6.99. We, in Europe, starting this summer, we are all subjects to the Cyber Resillience Act by the European Union. We are not allowed to post any app with any known vulnerabilities. The fines are completely devastating if we do such a thing. Personally I am engaged with a project now, and I have no time immediately to check the Pakai server v6.99 capabilities (I will do it in the future when I am free), but if you have anyone that will use your Pakai Server immediately, there are two out of three apparent dependencies (I have not checked b4xlibs) that have vulnerabilities.

You have added the following apparent dependencies:
1) sqlite-jdbc-3.7.2.jar
2) mysql-connector-j-9.3.0.jar
3) mariadb-java-client-3.5.6.jar


If you visit https://www.mvnrepository.com and search for, and click in each one of these, you will find that 1 & 3 have vulnerabilities.
It would be a good thing to change them with the following (number 2 is just an upgrade because mysql-connector-j-9.3.0.jar has no known vulnerabilities) :
1) sqlite-jdbc-3.53.2.0.jar
2) mysql-connector-j-9.7.0.jar
3) mariadb-java-client-3.5.9.jar


Thank you for your efforts,
@hatzisn

P.S. How are the files theme.zip and swagger.zip used? Thanks in advance.
 
Top