Categories
Automation – Building a Privacy-First, Automated Family Document Expiry Tracker Using PHP, N8N, Apple Shortcuts, Android HTTP Shortcuts
Learn how to build a privacy first, self hosted family document expiry reminder portal using PHP and MySQL, completely bypassed from server cron restrictions via native iOS Shortcuts and Android Automate background loops.
Home » Blog » Automation » Automation – Building a Privacy-First, Automated Family Document Expiry Tracker Using PHP, N8N, Apple Shortcuts, Android HTTP Shortcuts

Managing critical document validity dates for an entire family, from passports and national identity cards to residency visas and insurance policies, can quickly turn into a logistical headache. A single missed expiration can disrupt international travel, result in heavy fines, or cause completely avoidable stress.

To solve this challenge permanently and securely, I built a lightweight, self hosted Family Document Expiry Reminder Portal.


Most commercial reminder platforms require you to upload highly sensitive data to third party cloud servers. Furthermore, generic calendar applications lack the context specific business logic required for diverse legal documents.

For example, a passport technically remains valid until its printed expiry date, but international border control regulations generally require a minimum of 6 months (180 days) of remaining validity to grant entry. A local driver's license or vehicle registration, on the other hand, can safely be tracked with a shorter 30 day buffer.

To bridge this gap, I engineered a privacy first web utility using a local MySQL database and a clean, responsive PHP backend.


The application evaluates documents against distinct, context-aware rule sets:

  • High-Buffer Items (Passports): Automatically defaults to a 180 day notification lead time.
  • Standard Items (IDs/Visas): Automatically shifts to a 30 day alert threshold.
  • Unified Visual Alarms: The system compiles data server side and applies clear CSS styles, changing the display text and status to a bold red warning the moment an entry crosses the critical 30 day threshold.

To eliminate security risks entirely, the system operates purely on metadata and casual aliases/nicknames (e.g., "Dad," "Son," or "Brother"). The actual, sensitive document numbers and passport sequences are never stored in the clear, making the repository completely safe to run in any hosting environment.

Many shared hosting setups heavily restrict local server side cron jobs, which often kills automated execution scripts. I bypassed this limitation by exposing a secure, authenticated REST endpoint (api.php).

This allows external orchestration engines to serve as a periodic execution heartbeat:

  • The Centralized Automation Layer: An external workflow triggers the API, fetches structured datasets, maps the objects, and dispatches compiled, clean email digests to the family network.
  • The Android Background Engine: Utilizing the HTTP Request Shortcuts app on Android, I configured a dedicated micro script that fires silently in the background on an automated 24 hour cycle. It pings the endpoint and handles response payloads seamlessly without requiring manual app interaction.

One of the most rewarding aspects of this project was engineering a native app experience on mobile devices without going through the Apple App Store or Google Play Store.

Using Bootstrap 5, the interface features a compact, stacked multi-line layout optimized for small screens. To make it look and feel like a standalone app, I introduced cross-platform asset targeting:

For Apple devices, I bypassed manual browsing by programming a custom workflow inside the native iOS Shortcuts App. The automation uses a 'Get Contents of URL' block targeting the secure backend endpoint, which feeds the resulting execution data straight into an iOS 'Show Notification' block. By establishing a native Personal Automation rule, this script triggers completely in the background on a 24-hour interval every single morning, sliding a crisp, informative expiry notification banner directly down the iPhone screen.

For Android, instead of running background apps that are prone to aggressive OS battery termination, I built a visual flowchart inside the Automate app by LlamaLab. The flow works on an infinite loop:
1. A **Time await** block sleeps until exactly 08:00 AM daily.
2. It wakes up and triggers an **HTTP request** block set to 'Save as text', storing the API response into a memory variable.
3. It passes that variable directly into a **Show notification** block configured as a non-ongoing, fully cancellable system banner.
4. The flow loops instantly back to the top to wait for the next morning.

By implementing specialized <meta> tags and an apple-touch-icon declaration, iOS users can simply tap "Add to Home Screen" via Safari. This creates a high-fidelity home screen shortcut using a custom-designed blue shield logo. When launched, the browser navigation bars disappear entirely, running the portal in an immersive, full-screen standalone mode.

For Android devices, I deployed a standardized manifest.json file. This elevates the website into a recognized PWA in Google Chrome's eyes. When an Android user saves the shortcut, Chrome bypasses generic text badges, locks in the native application icon, and integrates the portal smoothly into the mobile application drawer.


I have fully isolated the core application logic from local environment credentials using dedicated configuration mapping files (config.php and .gitignore).

The code structure has been published publicly on GitHub under the MIT License. It features full multi-line mobile table stacking for compact on-screen reading, automated data-purging tools, and high-fidelity custom app icon rendering for both iOS Safari Web Clips and Android Progressive Web Apps (PWA).

Check out the full repository and setup instructions here: https://github.com/adeelkhan-learning/Reminder-App


Home » Blog » Automation » Automation – Building a Privacy-First, Automated Family Document Expiry Tracker Using PHP, N8N, Apple Shortcuts, Android HTTP Shortcuts

Leave a Reply

Your email address will not be published. Required fields are marked *