Inspiration

Walking alone at night or traveling solo can be anxiety-inducing. Most people have experienced that moment of panic when a friend or family member doesn't text back to say they got home safe. I wanted to build a "dead man's switch" for personal safety—a tool that requires zero effort if you are okay, but automatically alerts your loved ones if something goes wrong.

What it does

Safe Journey is a minimalist web app that acts as your personal safety net.

  1. You enter your emergency contact's phone number and set a countdown timer (e.g., 20 minutes for your walk home).
  2. You start your journey, and the app tracks your live GPS location.
  3. If you arrive safely, you just tap the massive "I'M SAFE" button, and the timer stops.
  4. If the timer hits zero and you don't check in, Safe Journey automatically sends an SMS to your emergency contact with a Google Maps link to your last known location.

How I built it

  • Frontend: Built with vanilla HTML, CSS, and JavaScript for lightning-fast performance. I used a dark-mode UI based on the Catppuccin Mocha color palette and the Space Grotesk / JetBrains Mono fonts to ensure high contrast and readability in low-light environments.
  • Backend: Node.js / Express to handle the timer logic and API requests.
  • APIs: I used the browser's native Geolocation API to track coordinates and integrated the Twilio API to handle the automated SMS alerts.
  • Logic: I implemented a "grace period" so that if the timer runs out, the user has 60 seconds to tap "I'm Safe" before the SMS is actually fired off (preventing accidental alerts if the user is just running slightly late).

Challenges I ran into

  • The Timer Sync: I quickly realized that if I put the timer only on the frontend, refreshing the page or closing the browser would stop the alert from sending. I had to sync the timer with the backend to ensure the alert triggers even if the user's tab goes to sleep.
  • Design Contrast: Because I used the pastel Catppuccin palette, I struggled with contrast issues on the form inputs and buttons. I had to iterate heavily on the CSS to ensure the dark text on light buttons was actually readable in a dark room.
  • Location Accuracy: Getting the browser's Geolocation API to grab an accurate, high-precision location within a short timeout window was tricky.

Accomplishments that I'm proud of

I am incredibly proud of the UI/UX. The countdown ring is visually engaging, and the massive "I'M SAFE" button is designed to be easily tapped in a panic. I am also thrilled that the Twilio integration works flawlessly—watching a real SMS with a live map link arrive on a phone during testing was a huge win.

What I learned

Building this solo taught me a lot about asynchronous JavaScript and handling background timers. I also learned the importance of designing for accessibility—specifically how contrast ratios change completely when you switch from a light theme to a dark theme.

What's next for Safe Journey

With more time, I would love to turn this into a PWA (Progressive Web App) so users can install it on their phones and use it offline. I would also add a "Grace Period Escalation"—if the user doesn't respond to the first SMS, the app would automatically call the emergency contact or send them a voice message. Finally, I'd love to integrate with Twilio Voice to provide an automated phone call instead of just a text.

Share this project:

Updates

Submission history