Pedaling AI to Build a Mood-Sea WeChat Mini-Program: It Faked 100 Dots for 37 Records
A mini-program that turns emotions into light dots on a sea, and the pitfalls AI didn't take off my shoulders.
I can't remember how many times this is. The requirements were still on paper, AI was already at the workstation, and I was pedaling hard beside it. When given the right direction, it runs fast. When the direction is unclear, it can lead you into a ditch, and even make the ditch look quite nice.
This time I dragged it into work again, building a WeChat mini-program: Emotional Ups and Downs.
It's not a chatbot, it's a moving sea
Opening the mini-program, there's no registration page, no "please describe your problem in detail," and no request to write an 800-character essay. It's just a dark sea. Lonely, happy, overthinking, calm, irritable: each emotion has its own color and movement. Tap your current emotion, and a light dot flies from the button into the sea. Your dot is brighter and easier to find. With more records that day, the sea becomes livelier; with fewer records, it naturally thins out, never using fake dots to fake a crowd.
Besides this sea, there are two more pages. Emotion Index: which emotion dominates today, how 24-hour records are distributed. My Footprints: when you were happy, when you were down, a calendar timeline.
No posts, no comments, no private chats, no content feed. It does one small thing: Turn your emotion right now into a visible light dot on the sea.
The tech isn't fancy, but it has what's needed
Frontend is native WeChat mini-program, WXML / WXSS / JS, core animations drawn directly with Canvas.
Backend is Spring Boot, MySQL for records, Redis for caching and rate limiting.
No AI chat box is forced in just to look advanced.
In this project, AI is mostly pressed into service at the dev workbench.
The first batch I gave it was the kind of stuff I didn't want to write but couldn't avoid:
- Page skeletons, component breakdown, API wrapping;
- Entity, VO, DTO, CRUD;
- Aggregation queries by day, by emotion, by hour;
- Share card rendering;
- Repetitive style tweaks, field renames, log debugging. Plainly speaking: Anything that can be done mechanically gets pulled over. But where precision matters, I didn't let it decide. For example, how exactly a record is counted, whether repeated taps within ten minutes should merge, how to isolate abnormal requests, how to tell your own light dot from others'. These aren't "code style" issues; they're about whether the product is real or not. If you tell AI "just optimize it a bit," it really will. If you tell it:
One record represents one emotional moment; submitting again within ten minutes merges and updates the latest one; public numbers must come from real records, not simulated data to pad the scene. Then it knows where to put its effort.
The first version AI writes usually looks the part
Then when you look closely, the pitfalls come. This project's first version had one particularly absurd problem: The API already returned 37 records, but the screen still had 100 light dots floating fixed. Looking at the screenshot, no problem. Deep sea, glow, breathing, trails, atmosphere all there. But it had nothing to do with real data. Today with 37 records, it shows the density of 100; tomorrow with 3,000, it's still the same sea. This isn't an animation issue; it's the product lying. Later I removed all static dots, and the dot count follows the real count. When the rendering cap is hit, instead of stacking more particles, it raises overall brightness and breathing frequency. Fewer people is fewer people. A newly launched product with a quieter sea isn't embarrassing. Faking a crowd is.
The second pitfall is more typical. When a user taps an emotion, the light dot takes two to three seconds to fly into the sea. If the user is quick and taps twice in a row, the first dot hasn't landed yet, and the second flies out too. Looking at a single tap's logic, everything is fine. With consecutive operations, state gets messy. With this kind of problem, just throwing the error log at AI may not let it guess the real cause. You have to describe the scene clearly:
Tapping is allowed while the animation isn't finished; the target object moves during the animation; after consecutive taps, two dots of your own appear. The expectation is that the later tap should track the existing dot, not create a new one. Finally, I moved target resolution to when the animation lands, and limited each emotion to one of your own dots. The code isn't complex. What's complex is first realizing: this isn't "drawing one extra dot," it's a state race condition.
My current tricks for squeezing AI
1. Define the terms before letting it write
A requirement like "build an emotion statistics" can yield three sets of definitions from AI, and they end up fighting each other. Clarify first what counts as a record, how to deduplicate, what to do with empty data, then start.
2. Hand over repetitive work, keep product judgment
Page skeletons, API boilerplate, field conversions, SQL drafts, error explanations: these are good for AI to do first. Privacy boundaries, data authenticity, abnormal states, real-device experience: these can't be outsourced.
3. Ask it to fix one specific problem at a time
Don't say "this page's experience is bad." Be clear about:
- What the current symptom is;
- How to reproduce;
- What the expectation is;
- Which files are involved;
- How to verify after the change. The more specific the requirement, the less it improvises.
4. Let AI do the dirty work in integration
API docs, real response samples, frontend type definitions: have AI do mechanical comparison:
- Which field is missing;
- Which type doesn't match;
- Which return value is inconsistent with the docs;
- Which places need runtime fallbacks. Output a diff list first, then change code after a human confirms.
5. If it can be verified by running, never just take its word that it's fixed
Compile once, hit the API once, tap on a real device once. Then tap rapidly, disconnect network, switch background, reopen, and test with empty and small data. When AI says "should be fine," in my book that's roughly "testing hasn't started yet."
What gets squeezed out is repetitive labor, not judgment
I don't think AI can write a whole product for me. It's more like a partner full of energy, with decent memory, and occasionally speaking nonsense with a straight face. It can quickly write boilerplate I don't want to write, and it can also execute a wrong direction meticulously when I describe things poorly. So a human can't step away. You have to set direction, break down requirements, protect data, handle operations only real users would come up with, and when it's confident, ask: "Are you sure?" That's why, even though I know AI can write well, I still stand beside it pedaling hard. It's responsible for running. I'm responsible for keeping it from running astray.
Back to this mini-program
"Emotional Ups and Downs" isn't here to heal anyone, nor to judge whether you should be happy or sad. It does one thing: Tap your current emotion, and that light dot stays in today's sea. As for the development process, yes, AI was used again. CRUD is written by it, repetitive modifications run by it, logs read by it first, code squeezed by it. But real data, race conditions, product boundaries, and every verification after launch still have to be carried by me. AI's wool: squeeze repetitive labor. Human skill: make sure what finally runs looks like a product.
Try it by scanning
No essay needed; tap your emotion right now and see if today's sea has a dot like yours.
Scan the WeChat QR code to open "Emotional Ups and Downs":
Top 2 from juejin.cn, machine-translated. The original thread is authoritative.
I also used AI to write a mini-program: specifically for treating couples' fights and family discord [spectator emoji]
Exactly, the fake light dots part is the real deal. When it comes to data, faking it is much worse than being quiet.