I am currently working for having A.I. workflow for generating projects. There are two things that need to be tackled for that: 1) hallucinations; and 2) old codes. I have met several patterns to tackle those two and just need to formulate the patterns into a general flow.
Thankfully, a video of building fullstack app using A.I. from Raf Dev channel inspired me to make the formulation. He used multiple A.I. engines to his need:
He used Google Gemini to onboard his ideas and summarized it.
He forked a boilerplate of NextJS project into a new project.
Then, he added the summary from Google Gemini into a file for context.
He used QWEN Code, a QWEN3 code engine that is a fork from Gemini CLI, to build the project.
When working with an existing project, A.I. will take the whole project as a context. It also means that it will stick with the version used by the libraries. It also will try to update its knowledge based on the common pattern in the project. Most of the time, it will use the current syntax of the project.
His reason to use Gemini to sketch his ideas is because currently it is the best for his understanding to build requirements. I don't have the say about this, because I didn't have an extensive research on this. I myself, use Deep Seek for this use case. The cute anime images from my previous A.I. were generated from perchance.org. This post's image is generated using Gemini. The prompts for those images were built from Deep Seek.
I accidentally found out about this when asking Deep Seek to generate image. Each A.I. provider has its own way to express how to generate what you want. The prompt targetting perchance.org is different from the one targetting Gemini. Deep Seek knew how to effectively build the prompt for each A.I. provider. Thus, it is really important to have your prompt polished by an A.I. engine before your prompt submitted into the real A.I. engine that will do the job.
Thus, with this, I applied them into programming as follow:
Each command line program has its own context file. For instance, QWEN uses QWEN.md file, Gemini CLI uses GEMINI.md, and Claude code uses CLAUDE.md file.
One caveat, though, you need to do the flow using common stack. I did try to experiment with Gowebly (a golang, HTMX, AlpineJS stack) and the Qwen run 4 hours without solving the problem. I haven't try that with Gemini CLI, but will try to use it for Gowebly later.
Currently Working Flow
I think I have experimented a good variations for the common flow implementations. However, what I think good work today is using this flow:
Create front end code with Google AI Studio. This tool will make the step 1 and step 2 at the same time. This is called prototyping in the old world. LOL...
Using Gemini/Qwen generate an initial context file.
Create the BFF and make it production ready, e.g. make it according to OWASP recommendations, add login, etc..
Yeah, it is noteworthy if you build your own boilerplate from the very beginning so that your A.I. vibe code can code better. You can search for ready-to-use boilerplates. Also, you need to accept that Google AI Studio can only make React app. I can't get it to work to build using Solid JS. I miss Solid. ;-(
I also want to admit that I still cheated. Sometimes, I fix the code myself. LOL....
Design System
By default, Google AI Studio uses Google Material-like design system and INA DIgital has its own design system at https://design.inadigital.co.id/ site. It has three types of guideline:
A design guidelines using Zero Height.
A figma design.
A React component.
Let's have a summary.
Design Guidelines
GEMINI CLI can access the site and read the rest of the guidelines. it then build the project accordingly. It's not very accurate, but it lay a foundation.
QWEN Code cannot read the site.
Figma Design
Neither AI tools can access. What I did was exporting the Figma layer as PNG. Then, I opened ChatGPT and upload the PNG file there and asked it to generate a React project.
React Component
By default, the component uses Tailwind 4 with React 19. I cheated and setup the packages manually. So, I would start the project with INA Digital react components ready to use.
I can't say for GEMINI Pro because my experiments ate all of my token. I run QWEN for this and the result surprisingly good. It coded the way I wanted to.
Comments
Post a Comment