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

Pakai Server​

Version 6.99 rev1

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

Overview
Pakai Server v6.00

Files:​

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

Libraries:​

JDBC/Connector Downloads:

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: 142
  • swagger.zip
    508.6 KB · Views: 33
  • Pakai Server (6.99 rev1).b4xtemplate
    51.6 KB · Views: 3
  • Pakai Server Api (6.99 rev1).b4xtemplate
    39.7 KB · Views: 3
  • Pakai Server Web (6.99 rev1).b4xtemplate
    33.1 KB · Views: 3
Last edited:

aeric

Expert
Licensed User
Longtime User
Version 6.99 rev1

HelpHandler is updated with WebApiUtils v6.99 rev1.

Conditional Compiling in Main updated for each template.
B4X:
#If MariaDB
#AdditionalJar: mariadb-java-client-3.5.9
#Else If MySQL
#AdditionalJar: mysql-connector-j-9.7.0
#Else
#AdditionalJar: sqlite-jdbc-3.53.2.0
#End If

JDBC/Connector updated in post #1:
  • sqlite-jdbc-3.53.2.0.jar
  • mysql-connector-j-9.7.0.jar
  • mariadb-java-client-3.5.9.jar
These libraries can also be updated using libget.jar as libs.json is also updated with new urls.
All 3 libraries are tested before this post is made.

Thanks @hatzisn for reporting the issue.
 
Last edited:

aeric

Expert
Licensed User
Longtime User
To continue with previous story, the second reason that catalyzed my decision to stop Pakai Server development is... Reality.

I am feeling stressed.
I have been facing a serious problem in my life right now. It is not just happened recently.

I live alone in a small apartment with cheap maintenance and mortgage loan. I bought another apartment before COVID-19 and rented out as an investment. The rental actually can cover the installment but I need to spend extra for the maintenance fee and wifi charge. The problem is with the tenant who paid the rental late every month. I want to discontinue the contract this July and he beg me to let him stay until September because he hasn't find a new house. I agreed. Then last 2 weeks he suddenly told me he found a house and will end the rent immediately. WTH. I already stopped the real estate agents to look for new tenants. How I could find new replacement in such a short period? Today is the last day and I am not having a new tenant. I am really worried I need to bear the installments for coming months.

But the real concern started at beginning of this year.
Since I quit from my job 5 years ago, I have put my bet on entrepreneurship. I have all-in into B4X because I believed I can create great products starting with my POS system. However, I think I really bad in business and I have failed.

I didn't have much savings actually but I have some financial commitment such as car installment, 2 apartments loan, medical and life insurance, internet plan and monthly expenses. I have minimized my expenses as much as I can. I didin't bring money back to my parents for years. My girlfriend come to find me 3 days a week. We have simple meals and most of the time I pay for the dinner and breakfast if we dine out. She cook for me on weekends so we can safe some money.

I was lucky that I get a freelance job a few years back during COVID-19. I think this is God's help that I can found a job for B4A, such a niche programming tool in my country. Almost no one heard about this tool but a town district government is using a mobile app for the enforcement officers to issue compound and traffic fines, car towing and residents against some local act. I have been supporting a software vendor providing bug fixes, maintenance for the mobile part while they support the backend.

A few years ago, due to a shift in political landscape, the administration of the district council also changed. The organization has restructured from the director to person in charge of IT department. The contract between the vendor and the council has been in discussion for months and I think it is not going to continued.

My last 3 months maintenance job for last year has ended and I never had a single job since then. The vendor keep delaying my payment until I said I am going for magistrate to take action for the pending payment then they start paying me by installment.

Last month I planned to take a delivery job with Lalamove app.
I have finished all my savings and sell out my only savings fund with insurance agent and I get back around MYR1300. Then I received another MYR2400 for the last pending balance from the vendor so I decided to postpone the delivery job for 1 more month. If things are not changing, I will take the delivery job next month.

So I was thinking that if I take the delivery job, I don't have much time sitting in front of my laptop to work on B4X projects. That is why I decided to stop Pakai Server or other development for the time being.
 
Top