AIGUIMI · 爱硅蜜

My First App, Built From Zero: A Drowsiness Detector

October 2026 · AIGUIMI

I had been driving for ten years before I wrote my first line of code. This is the story of the app I built because of a night I would rather forget — and of what happens when someone with no technical background gets handed an AI pair programmer.

The night that started it

During the 2024 Spring Festival travel rush I drove home through heavy snow across Hunan and Hubei. A journey that normally takes twelve hours stretched past thirty. Somewhere in the second night I drifted off for three to five seconds with my eyes shut, at highway speed, and woke up with the car still moving straight. I was lucky. Nothing happened. But I remember pulling over afterwards and shaking.

Fatigue on a highway is not dramatic. There is no swerving, no screeching. You simply stop seeing the road for a few seconds, and those seconds are enough. In 2026, on May 24th, I finally asked the question I had been carrying for over a year: could I build something that catches those seconds before they happen?

What the app actually does

DriverFatigueDetector is an Android app that uses the phone's front camera to watch the driver. It runs continuously while you drive and looks at several signals at once rather than trusting any single one:

When the combined picture says you are falling asleep, the alarm is loud and it does not politely wait for you to dismiss it. That was a deliberate choice. A gentle notification is easy to ignore when you are already half asleep.

Everything runs on the phone. No video, no face data, no trip log ever leaves the device.

I could not code. That turned out not to matter.

I came to AI in April 2026 as a complete beginner — a bag factory owner in Yiwu, not a developer. The whole app was built inside TRAE Solo, with DeepSeek, Doubao, GPT and Qwen taking turns on the hard parts: one was better at reading stack traces, another at explaining why a camera preview was rotated 90 degrees, another at restructuring a file I had broken.

It took fifteen days and more than three thousand AI calls. Most of those calls were not elegant. They were me pasting an error and asking, in plain language, what went wrong. The honest summary is that I did not learn Android development in fifteen days. I learned how to describe a problem precisely enough that an AI could fix it, and how to test the answer before trusting it. That turns out to be a different skill, and a much faster one to acquire.

Why it stays offline

A drowsiness camera is about as personal as software gets: it is pointed at your face, in your car, at your most unguarded moments. Sending that to a server would be the easiest way to build the feature and the fastest way to lose everyone's trust. So all inference happens on-device. It also means the app works on a mountain road with no signal, which is exactly where you need it.

The other reason is cost. Hardware driver-monitoring systems ship in new cars and cost real money. Most vehicles on the road today, especially older petrol cars outside China, will never get one. A phone already sitting in a dashboard holder costs nothing extra.

Open source, and coming to Google Play

The project is fully open source on GitHub. Anyone can read it, learn from it, or tell me where I got it wrong — and with a safety app, being told where I got it wrong is a feature, not an insult.

We are preparing it for Google Play now. It is a public-interest project: free, no ads, no accounts. If it keeps one driver awake through one more night, the fifteen days were worth it.

What I actually learned

If you have been telling yourself you need to learn programming first: you probably don't. Start with the thing that actually bothers you. I started with a night on a snowy highway.

← Back to My AI Journey