Skip to content
AnjanB3012Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SheNow - Women's Safety App

A comprehensive women's safety application built for HackViolet 2026. SheNow provides essential safety features including SOS monitoring, safe navigation, and emergency product delivery.

Features

1. SOS Mode

  • Periodic activity check-ins every 15 minutes
  • 5-minute buffer period before alerting emergency contacts
  • Automatic SMS alerts with live location tracking link
  • Panic button for immediate emergency alerts
  • Background notifications for check-in reminders

2. Safe Navigate

  • Walking navigation with safety-focused routing
  • Avoids high-crime areas and low-network zones
  • Prefers well-lit streets with higher foot traffic
  • Real-time safety scores and route recommendations
  • Uses OpenStreetMap (free, no API key required)

3. Emergency Products

  • Quick delivery of essential products (tampons, pain relief, first aid, etc.)
  • Price comparison across UberEats, DoorDash, Instacart, Gopuff, CVS, Walgreens
  • Best value recommendations based on price and delivery time
  • Order tracking with ETA
  • Orders tab auto-hides after fulfillment

Project Structure

SheNow/
├── backend/                 # Node.js Express server
│   ├── src/
│   │   ├── index.js        # Main server entry
│   │   ├── db/             # JSON file database
│   │   ├── routes/         # API routes
│   │   ├── middleware/     # Auth middleware
│   │   └── services/       # SMS service
│   ├── data/               # JSON data storage (auto-created)
│   │   ├── users.json
│   │   └── orders.json
│   ├── package.json
│   └── .env
│
└── mobile/                  # React Native Expo app
    ├── App.js              # Main app entry with navigation
    ├── src/
    │   ├── screens/        # All app screens
    │   ├── context/        # Auth context
    │   ├── services/       # API service
    │   └── constants/      # Theme & styling
    ├── assets/             # App icons & images
    ├── app.json            # Expo configuration
    └── package.json

Quick Start (Recommended)

One-Command Setup with ngrok

The easiest way to run SheNow with everything connected:

# Terminal 1: Start backend + ngrok
./start.sh

# Terminal 2: Start mobile app
./start-mobile.sh

The start.sh script will:

  1. Start ngrok to create a public URL
  2. Automatically update .env with the ngrok URL
  3. Update the mobile app's API URL
  4. Start the backend server

Manual Setup

Prerequisites

Backend Setup

  1. Navigate to backend directory:
cd backend
  1. Install dependencies:
npm install
  1. Start the server:
npm run dev

The backend will run on http://localhost:3000 and automatically create a data/ folder for JSON storage.

Environment Variables (.env)

# Server port
PORT=3000

# JWT secret for authentication tokens
JWT_SECRET=your-secret-key

# Twilio for SMS (optional - leave empty for console logging)
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=

# APP_URL - Public URL of this server
# Used to generate tracking links sent via SMS to emergency contacts
# When SOS alerts trigger, contacts receive: {APP_URL}/track/{trackingId}
#
# Examples:
#   - Local: http://localhost:3000
#   - Production: https://your-server.com
#   - ngrok: https://abc123.ngrok.io (for testing SMS locally)
APP_URL=http://localhost:3000

Mobile App Setup

  1. Navigate to mobile directory:
cd mobile
  1. Install dependencies:
npm install
  1. Update API URL in src/services/api.js:
const API_BASE_URL = 'http://YOUR_IP_ADDRESS:3000/api';

(Use your local IP for physical device testing, e.g., 192.168.1.100)

  1. Start the Expo development server:
npm start
  1. Scan the QR code with Expo Go app (iOS/Android)

API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user

User

  • GET /api/user/profile - Get user profile
  • PUT /api/user/profile - Update profile
  • POST /api/user/emergency-contacts - Add emergency contact
  • DELETE /api/user/emergency-contacts/:id - Remove contact

SOS

  • POST /api/sos/activate - Activate SOS mode
  • POST /api/sos/deactivate - Deactivate SOS mode
  • POST /api/sos/checkin - Check in (confirm active)
  • GET /api/sos/status - Get SOS status
  • POST /api/sos/trigger-alert - Send emergency alerts
  • POST /api/sos/panic - Immediate panic alert

Location

  • POST /api/location/update - Update user location
  • GET /api/location/track/:trackingId - Get tracking location (public)
  • POST /api/location/safe-route - Calculate safe route

Orders

  • GET /api/orders/products - List all products
  • GET /api/orders/products/:id/compare - Compare prices
  • POST /api/orders/place - Place order
  • GET /api/orders - Get user orders

Tech Stack

Backend

  • Node.js + Express - Server framework
  • JSON File Storage - Simple persistence (no database required)
  • JWT - Authentication
  • bcryptjs - Password hashing
  • Twilio - SMS alerts (optional)

Mobile

  • React Native + Expo - Cross-platform mobile app
  • React Navigation - Stack + Bottom Tabs
  • React Native Maps - Uses Apple Maps (iOS) / Google Maps (Android)
  • Expo Location - GPS tracking
  • Expo Notifications - Push notifications
  • AsyncStorage - Local data persistence

Maps (Free, No API Key Required)

  • Mobile App: Uses device's native maps (Apple Maps on iOS, Google Maps on Android via react-native-maps)
  • Web Tracking Page: Uses Leaflet + OpenStreetMap tiles (completely free)

MVP Notes

  • No Database Required - Uses local JSON files for storage
  • No Google Maps API Key - Uses free OpenStreetMap for web tracking
  • Payment Not Implemented - MVP demonstration only
  • Safe Routes Mock Data - Production would use real crime/network APIs
  • Product Prices Simulated - Production would integrate real delivery platform APIs
  • SMS Development Mode - Console logging when Twilio not configured

Future Enhancements

  • Real-time crime data integration
  • Cellular coverage mapping
  • Voice-activated SOS
  • Community safety reports
  • Integration with local emergency services
  • Wearable device support
  • Multi-language support
  • Real delivery platform API integrations

Team

Built with ❤️ for HackViolet 2026

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages