Developed a Mini - program to Assist in Analyzing Whether Food is Healthy
Two days before the Mid - Autumn Festival, I suddenly had an idea: create an application that can identify the ingredient list information of food and then analyze whether the food is healthy. Recently, I often saw various news reports about what additives were in certain foods, making them unhealthy, or how some ingredients were bad for the human body. One night, when I couldn’t fall asleep, this idea just popped into my mind.
This is the mini - program code. Interested friends can give it a try.
Development Process
Since I don’t know how to develop mini - programs myself, after having this idea, I immediately talked to a colleague who is proficient in mini - program development. He thought it was feasible and helped create the UI for the first version. Later, with the help of a large language model (LLM), I made a few minor modifications based on his work.
Now, I can barely say that I’ve gotten a basic understanding of mini - program development.
I have to say that with the advent of LLMs, learning a new framework has become much easier than before. Pair - programming with an LLM, you just need to clearly state your requirements, ask it to provide a solution, then write code step by step, and adjust it yourself. If you don’t understand something, just ask it, and it will explain it very clearly. Basically, after completing a specific project, you can generally master a new framework, and it’s much faster than looking up information on your own in the past.
I developed the backend myself, still based on Django + DRF. After getting familiar with it, I found that this set of frameworks performs extremely well in scenarios where the concurrency requirement is not that high.
Some Pitfalls Encountered
The main function of this mini - program, that is, the part of analyzing ingredient components, actually calls an LLM. So, the technical difficulty isn’t very high. Just let the user take a photo, analyze the content of the picture, and provide some appropriate prompts.
At work, I’ve always been using GPT - 4o and GPT - 4o - mini. This time, because of this mini - program, I used a domestic multi - modal large language model for the first time. I found that there is a big gap. The picture recognition effect is much worse, and the API response speed is also quite a bit slower.
The biggest difference is that the domestic multi - modal large language model doesn’t seem to support system prompts, which basically have no effect. I thought for a while that the domestic multi - modal model was really that bad. But then I thought that their app has a good picture recognition effect, so the API shouldn’t be this bad. So, I tried adding some requirements directly in the user prompt, and the effect improved a lot. This difference tricked me for a long time and took me quite a while to figure out.
In addition, at first, I had users upload pictures to the server, and then perform LLM recognition operations on the server. However, this process consumes a lot of server bandwidth. My server has a relatively low configuration, and with this approach, even at 10 requests per second (rps), it was already very slow. Later, I modified the logic and moved the process of calling the LLM to the client - side. This not only reduces the consumption of server performance, allowing the server to support higher concurrency, but also significantly reduces the overall recognition time, as it reduces the time for photo transmission.
Independent Developers
Recently, I’ve seen a lot of information about independent developers. This time, after actually creating a small product myself, I realized that it’s not easy to be an independent developer and be able to support yourself and your family. It’s even more difficult than earning a salary in a company.
First of all, you need to have a good idea that can meet some needs.
Then, you need development skills. Although there may be no strict requirements for the technology stack and there is the assistance of LLMs, it’s still not easy. Especially since independent developers are basically expected to be full - stack developers, which makes it even more challenging.
Finally, once you have a product, you need to promote it. I guess most programmers have no clue about this step because it’s basically not related to their daily work.
Some Thoughts
To be honest, I didn’t expect to make a lot of money through this mini - program. But this process has indeed taught me a lot. I realized that I still have many shortcomings, and in the future, I can focus on making up for them at work.