Skip to content

HoaKatie/SafeWalkie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Safe Walkie

Safe Walkie — header banner

License: MIT Build Status PWA Ready Mobile Platforms React Flask Vite

Your personal, hands‑free safety companion for solo walking — real‑time tracking, AI‑informed risk, and instant emergency alerts.


Demo

Safe Walkie — demo flow
Emergency trigger flow (placeholder). Record your real demo and replace this GIF.

Map & Route Guardian Dashboard
Map view Guardian dashboard

Overview

Safe Walkie combines real‑time mapping, voice recognition, and an event‑driven backend to provide proactive safety monitoring and instant emergency response.


Architecture

System Overview (Mermaid)

sequenceDiagram
    autonumber
    participant U as User (App)
    participant FE as React Frontend
    participant API as Flask Location API
    participant MQ as RabbitMQ
    participant AN as Analytics Service
    participant TW as Twilio API
    participant G as Guardian

    U->>FE: Start Walk / Speak Safe Word
    FE->>API: /start_walk / update_location
    API->>MQ: publish walk.started / location.update
    AN-->>MQ: consume location.update
    AN->>MQ: publish alert.events (risk scores)
    API-->>MQ: consume alert.events
    FE->>API: poll /risk/latest
    API-->>FE: risk score (green/amber/red)
    FE->>TW: /api/call_emergency (when triggered)
    TW->>G: Automated call with details
Loading

Event-Driven Design

  • Location API publishes session + location events
  • Analytics computes risk (off‑route, inactivity, anomalies) and publishes alerts
  • Frontend polls /risk/latest and triggers emergency flow when needed
  • Twilio places automated calls to guardians (optional)

Installation

Frontend

git clone <repo-url>
cd Safe-Walkie/frontend
npm install

# env
cat > .env.local << 'EOF'
VITE_MAPBOX_TOKEN=your_mapbox_access_token_here
VITE_BACKEND_URL=http://localhost:5001
EOF

npm run dev   # http://localhost:5173

Backend

cd ../backend
python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt

Start RabbitMQ (choose one):

docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
# or: brew services start rabbitmq
# or: sudo systemctl start rabbitmq-server

Backend env:

cat > .env << 'EOF'
MAPBOX_TOKEN=your_mapbox_token_here
TWILIO_ACCOUNT_SID=your_twilio_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
TWILIO_VOICE=alice
TWILIO_GUARDIAN_ALERT_MESSAGE=HELLO, THIS IS AN IMPORTANT CALL. YOU ARE THE GUARDIAN AND THE PERSON IS IN DANGER.
EOF

Run services (3 terminals):

python location-api.py   # :5001
python analytics.py      # :5002
python twilio-api.py     # :3001 (optional)

Usage

  • Enter destination → start route
  • Toggle Safe word ON (default: help) and allow mic
  • Watch risk indicator and use Emergency when needed
  • Guardian uses the Dashboard to monitor live status

Badges (CI / Shields)

  • To enable the Build Status badge, create .github/workflows/ci.yml and replace OWNER/REPO above with your repo.
  • Common options: lint, test, build, deploy. See GitHub Actions starter workflows.

License

MIT — see LICENSE.


Credits

Built with ❤️ by the Safe Walkie team at Tech‑Nol‑Hack.

About

A safety companion web and mobile app that lets users share real-time locations, send alerts, and stay connected during night walks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors