The Simple, Secure Address Book: Taking Back Control
Taking Back Your Data: The Simple, Secure Address Book
In a world where our most personal data—the names and numbers of our family and friends—is routinely harvested and monetized by large corporations, the idea of a simple, private address book feels almost revolutionary. The "free" services offered by tech giants are not free; we pay for them with our privacy. This is a price I'm no longer willing to pay.
That's why I decided to build my own. This project, the AddressBook, is a return to a core principle: you should own and control your own data. It's a simple, secure, multi-user web application that does one thing and does it well: it stores your contacts on your own server, under your own control.
Under the Hood: A Lesson in Modularity
This was the very first application I ever wrote using the Python Flask framework. The original version was a classic late-night project—I was learning, I was experimenting, and my main goal was just to make it work. And it did.
But as part of a larger effort to professionalize my homelab, I recently revisited this old project. Working with my AI assistant, we refactored it from the ground up, applying the strict modular protocols we've developed.
- The monolithic script was broken apart into a clean "controller" (`app.py`) and a dedicated "logic" module (`OV_addressbook.py`).
- All database connections were routed through our now-stable, global `MySql.py` module, which immediately solved the old, frustrating "MySQL has gone away" errors.
Security as a Core Feature
The most important upgrade was to security. The old version stored passwords in plain text—a common mistake for a first project, but an unacceptable risk. The new version implements modern security standards:
- Password Hashing: All user passwords are now cryptographically hashed using the robust `werkzeug.security` library before being stored. Even I, the system administrator, cannot see the users' actual passwords.
- Login Protection: All pages beyond the login screen are now protected by a "login required" decorator, preventing anyone from bypassing the login just by knowing the URL.
A Tool Built for Privacy
The result is an application that is not just functional, but robust, secure, and consistent with the design philosophy of my other homelab tools. It's a small act of defiance against a world that wants to own your data. It's a declaration that some things, like the names of your loved ones, should belong only to you.
Get the Code
The complete, documented project is available on my GitHub. It includes a `README.md` and a `man` page for installation and usage. Feel free to use it, learn from it, and adapt it to your own needs.