How It All Started #
A few years ago, my mom started running a small B&B. Naturally, as the “tech-savvy son”, I became her unofficial IT support. You know how it goes. Among the many things she asked me to “fix”, there was this guest registration process. For context: in Italy, every accommodation must report guest data to the State Police within 24 hours of arrival.
I’m not gonna lie, the first time I watched her manually copy passport data into the Alloggiati Web portal, I nearly lost it. I thought: it’s 2026 and we’re still doing this by hand? There has to be a better way.
The Technical Problem #
The Alloggiati Web portal works, don’t get me wrong, but manual entry is slow and error-prone. Especially when you have foreign guests with complicated names, or those old Italian paper ID cards—the ones so worn out that even a handwriting expert would struggle to read them.
As a software architect now, I couldn’t resist: I started thinking about how to automate the whole thing. The basic idea was simple: scan the document, extract the data, format it, send it to the portal. Easy to say, a bit harder to do.
Under the Hood #
I built a multi-layer recognition system. This wasn’t a random choice—it came from real-world experience:
Google MLKit (On-Device) - Works great for passports and electronic ID cards. It reads MRZ codes (those character strips at the bottom of documents) in milliseconds, all on-device so no data leaves the phone. This was a top priority for me.
Custom Local Algorithm - But MLKit alone isn’t enough. I had to develop a specific algorithm for old Italian paper ID cards. I know those things well because I’ve seen every type come through my mom’s place. Reflections, folds, faded ink… I had to handle it all.
Gemini Flash as Fallback - And when everything else fails? I integrated Gemini Flash as a last resort. Only if the user consents, the image gets analyzed by Google’s AI which can figure out even the most desperate cases. I think it’s a good balance between automation and privacy.
A Note on Privacy #
I want to be clear about something: data never passes through my servers. The app reads the document, extracts data locally, and sends it straight to the Police portal. No intermediate clouds, no databases. I made this choice from day one because it seemed like the only sensible thing to do with such sensitive data.
Try It Out #
The app is called Send to Police and it’s free. I built it first for my mom, then figured it might be useful for others too. If you run an accommodation and you’re tired of copying data by hand, let me know what you think.
iOS version is in the works, coming soon.