Let me analyze what was actually happened in the first post if no one ever get it.
Chapter 0: Story
I think Pakai Server project template is a good candidate to build web app or API backend. The project is fully open source so AI or human can read it completely. The project depends on some libraries which are also fully open source on GitHub. So let's try "vibe coding".
Chapter 1: Idea
So I just make a simple prompt to ask ChatGPT to build an app based on my project template. It has given me some good suggestions. Good job ChatGPT!
Here I am not sure how many person has clicked the link and read the conversation. I believed 9 out of 10 don't read.
Chapter 2: Understanding Pakai Server
Now, let's see is ChatGPT really understand what Pakai Server is?
So, based on it's answer, it is describing what Pakai Server is based on the repo descriptions. It is pretending it is fully understand what Pakai Server is.
It shows a sample code of building a Task / Project Tracker complete with all REST API endpoints. Great job again ChatGPT!
The code basically look correct except that it has invented a new sub call "HandleRequest" which is wrong. The correct name is "Handle" sub in B4J server handler. The function signatures also wrong. Looking further, many B4X syntax are not correct and it's made up class are not functioning.
It is so proud with it's answer and offered me which app I want it to create.
Since it's first suggestion is Inventory Management System so I tell it that's my choice.
Chapter 3: Mission begins
Let's start building it from the beginning. ChatGPT has come out with the models such as Products, Suppliers, Purchases, Sales and Reports. It also come out with the database schema. It seems like work for SQLite and MySQL but I see it would only work in SQLite.
Then it also list out the REST API endpoints.
The code seems good but it repeated the same mistakes again.
It uses raw SQL statements which are fine but Pakai Server makes use of MiniORMUtils which don't use SQL statements.
Last thing is the frontend. It proposed whether I want to use HTMX (or Vue/React).
Chapter 4: "yes"
I didn't describe more about my specifications and just follow what it suggested.
So it started to create a
starter code package so that I can run it immediately. "yes"
Chapter 5: Utilities class
It invented some new classes DBUtils.bas and AppUtils.
Is "this student" listening what "the teacher" is teaching in the class or is he sleeping?
Pakai Server has stated that it depends on MiniORMUtils and WebApiUtils which do the exact things.
Chapter 6: Test the app
It provides steps to run the app. It suggested me to use Curl or Postman to test the endpoints.
No, you don't need these! Pakai Server already comes with build-in API testing page using HelpHandler.
Chapter 7: Package into a zip
It created a ready to download zip. What's inside make me started want to cry.
Again it invented it's own config.properties file while Pakai Server uses a config.example template for the server config.
Chapter 8: Next option
I choose to use a minimal Bootstrap + HTMX frontend. While Pakai Server utilize REST API backend, it is not working out of the box with HTMX. Unless we start with EndsMeet Server project template which is more suitable in this case.
Chapter 9: JSON API -> HTML
By default, Pakai Server is still using older version of Bootstrap 4 and jQuery. ChatGPT suggest to use the latest Bootstrap5 + HTMX CDN.
It understand that Pakai Server is returning JSON API but let it takes the challenge to transform it to return HTML components.
Chapter 10: Frontend in zip
So it suggested to put the HTML files inside the www asset folder. This is a straight forward way but not a good practice. We should put the html files inside Files or project assets folder so they are protected from public access.
Chapter 11: Updated project
So now it allows both HTMX and JSON API in the app. This is a bit confusing.
It thinks it already finished the mission very well so far and asked me to extend further.
In fact the whole project code is not working at all and in a mess.
Chapter 12: Original Libraries
I don't want to accept the code. I insist it to use the original dependencies which are EndsMeet, WebApiUtils and MiniORMUtils by providing the links to the repos. It started to go haywire and hallucinating much seriously.
It may have confused with Python or PHP by introducing syntax like Public Sub __table__ As String with underscores.
It may also mix up with .Net Web API or Ruby.
Then it has reached the limit of my patience and I gave up to continue further.
Moral of the story
I don't agree Pakai Server is not the right tool or framework to build an app.
It may seems ChatGPT is unable to do the job perfectly.
I may need to use other LLMs such as DeepSeek or Qwen-Coder
Second thought
Maybe the problem is not ChatGPT but the prompt that I gave. Refer to Chapter 4. I should not used "yes".
I am using the LLM
WRONG.
More
specific details need to be provided or else the LLM will take things in general.
Takeaway
If someone with totally no programming experience try to vibe code, this is the result. The coder should have a clear idea what is going on and make the accurate prompt.
Imagine a CEO with no software development background try to make an app. My opinion is to hire a CTO with experience in software development is more appropriate to complete the task.