SafeGuard
BUILT TO TEST. DESIGNED TO REASSURE.

Meet the SafeGuard prototype

An Android-friendly web application for demonstrating personal safety workflows in a college project.

This is a runnable React + TypeScript web prototype, not a native Android APK or a life-critical safety service. It does not perform real AI detection, contact emergency services, send SMS automatically, or capture photos in the background.

Implemented now

  • Start and stop a foreground prototype monitoring session.
  • Test emergency detection with a cancellable 10-second countdown.
  • Request real device GPS coordinates and open them in Google Maps.
  • Manually capture, preview, and download a camera photo.
  • Save, edit, and delete encrypted device-linked trusted contacts.
  • Prepare an SOS draft and open the phone’s messaging application.
  • Run, cancel, and reset a saved check-in timer.
  • Review saved activity and enable supported system notifications.

Planned AI & native features

These features are not active: sensor-based AI threat detection, audio analysis, native foreground services, reliable Android background timer scheduling, and authorized automated alert delivery.

A future Kotlin / Jetpack Compose version needs explicit Android permissions, a tested AI model, battery and lifecycle handling, a privacy review, and authorized messaging integration. This prototype does not claim any of those are implemented.

System notifications

Permission: denied. In-app alerts always remain available while the app is open.

Run on an Android phone

  1. Open the secure published app URL in Chrome on your Android phone. The embedded preview also runs the app, but may restrict permissions and external messaging.
  2. If your browser offers it, choose “Add to Home screen” from its menu for a shortcut. This does not create a native APK or guarantee background services.
  3. Allow GPS, camera, and notifications only when prompted by the action you choose. You can change permissions in the browser’s site settings.
  4. Keep the app open during timer and emergency-countdown demonstrations. Use only consenting recipients for SOS tests.

Run the source project locally

All source files are in the editor’s Code tab. This project uses Vite, React, TypeScript, and Tailwind CSS.

  1. Install a supported Node.js environment (Node 22 or newer) and npm.
  2. Open the project folder in a terminal and run npm install.
  3. Run npm run dev and open the localhost URL printed by Vite.
  4. For a production build, run npm run build, then npm run preview.
  5. Deploy the built dist/ folder to HTTPS hosting for phone testing. A plain HTTP LAN address may not support GPS, camera, encryption, or notifications.

Inside this platform, encrypted records use the enabled built-in key-value store. Standalone builds without its SDK keep an encrypted copy in this browser only. Camera images are never saved in key-value storage.

College demonstration checklist

  1. Add a trusted contact using a real number you are authorized to contact. Refresh and verify it is still saved; edit and delete it to test those flows.
  2. Start monitoring. Verify ON, then stop and verify OFF. It is a prototype session, not AI analysis.
  3. Tap Simulate emergency. Cancel before 10 seconds and verify the status clears. Repeat, wait 10 seconds, and verify a clearly labeled TEST SOS draft opens. No message is sent.
  4. Request GPS. Allow permission and check coordinates. Open Google Maps. Deny permission on another attempt and verify a helpful error appears.
  5. Open camera. Allow permission, take a photo, review it, and save it. Try denying access and using the photo picker. Close the dialog and verify the camera indicator turns off.
  6. Set a custom timer to 0.05 minutes (3 seconds). Keep the app open and verify a check-in alert. Test cancel and reset. Enable notifications and repeat.
  7. Prepare an SOS. Verify real coordinates are included only after a GPS request. Open messaging and inspect the draft. Do not send a test message without the recipient’s permission.
  8. Refresh during a timer and verify the saved deadline resumes. Check Activity history and clear it. Test the dark theme and mobile bottom navigation.

Common questions

Is real-time AI detection running?

No. Monitoring is a foreground prototype session. The Simulate Emergency button is the only detection trigger.

Why does GPS or the camera fail in preview?

Embedded previews or browser permission settings may restrict device access. Open the HTTPS published app directly, enable device location, and allow the site permissions. Errors do not prevent using the other features.

Does SafeGuard send my SOS automatically?

No. SafeGuard prepares the draft and asks the phone to open its messaging app. You must confirm sending there. SafeGuard cannot verify delivery, and some desktops do not have an SMS handler.

Will a timer notify me after I close the app?

Not reliably. Browser tabs can be suspended. The saved deadline is checked when the app runs again; in-app and supported system alerts can appear then. Native Android scheduling is planned, not implemented.

Where are photos and contacts saved?

Photos stay in a temporary browser preview until you download them to your device. Contacts, timer settings, and history are encrypted with a browser-local key before being saved. There is no account recovery or cross-device sync.

Designed for Android browsers · Desktop-friendly for classroom demonstrations
SafeGuard – AI-Based Real-Time Personal Safety AppPrototype only · Not a replacement for emergency services
⚡Make an app like this, free