Skip to content

cse408-project/SecureHerAI

Repository files navigation

SecureHerAI

A comprehensive women's safety platform with AI integration, featuring a robust Spring Boot backend and a modern Expo React Native mobile application.

Live Web App: https://secureherai.expo.app/ Production API: https://www.secureherai.me/api or https://secureherai.me/api


πŸš€ Features

Mobile App (Expo React Native)

  • Authentication: Login, signup, password reset, Google OAuth, profile completion (Implemented)
  • SOS & Alerts: Emergency SOS button, incident reporting, real-time notifications (Implemented)
  • Trusted Contacts: Add, edit, delete, batch manage, emergency call integration (Implemented)
  • Notification Preferences: Email, SMS, push toggles, real-time API sync (Implemented)
  • Universal Alert System: Consistent alerts across web and native, context/provider-based (Implemented)
  • Professional UI/UX: Responsive, accessible, SecureHerAI branding, beautiful modals, error handling (Implemented)
  • TypeScript & API Compliance: Full type safety, matches backend API specs (Implemented)
  • AI Chat Helper: In-app AI-powered chat for guidance and support (Planned)
  • Live Map & Route Tracking: Real-time journey tracking and safe route suggestions (Planned)
  • Heatmap & Area Safety: Visualize area risk and safety intelligence (Planned)

Backend API (Spring Boot)

  • User Management: Secure registration, login, JWT authentication, Google OAuth (Implemented)
  • Trusted Contacts: CRUD, validation, user isolation, phone/email validation (Implemented)
  • Notification System: Preferences management, alert delivery, status tracking, error handling (Implemented)
  • Incident Reporting: Full-featured reporting with location, time, evidence, privacy controls (Implemented)
  • Security: Role-based access, robust error handling, JWT validation, input validation (Implemented)
  • Comprehensive API: Well-structured REST endpoints, detailed error responses, test coverage (Implemented)
  • SOS Alert System (AI-Powered): Real-time emergency alerting, distress monitoring, auto-generated incident reports (Partially Implemented, AI features Planned)
  • Fake Alert Detection (AI-Powered): AI analyzes audio, video, image, and metadata to verify alert authenticity (Planned)
  • Map & Route Tracking: Live journey tracking, encrypted communication, ETA/status updates, offline support (Planned)
  • Heat Map & Safe Routes (AI-Powered): AI-driven safety intelligence, risk assessment, real-time danger zone alerts (Planned)
  • Responder Module: Emergency responders view/manage/respond to alerts, communicate with users (Planned)
  • Admin Module: System administration, statistics, settings management (Planned)
  • AI Chat Helper: Real-time guidance, safety tips, feature navigation, emotional support (Planned)

🧠 Backend Modules & AI Features

Note: Some modules are fully implemented, while others are in progress or planned for future releases. See tags below.

  • SOS Alert System (AI-Powered):
    • Real-time emergency alerting, distress monitoring, and auto-generated incident reports (Partially Implemented, AI features Planned)
    • Voice command detection for hands-free SOS triggering (Planned)
    • Notifies police, responders, and trusted contacts instantly (Implemented)
  • Fake Alert Detection (AI-Powered):
    • AI analyzes audio, video, image, and metadata to verify alert authenticity and reduce false alarms (Planned)
  • Map & Route Tracking:
    • Live journey tracking, encrypted communication, ETA/status updates, and offline support (Planned)
  • Heat Map & Safe Routes (AI-Powered):
    • AI-driven safety intelligence, risk assessment, and real-time danger zone alerts (Planned)
    • Suggests safest routes and provides area risk levels (Planned)
  • Contacts & Notification:
    • Trusted contacts management, flexible notification methods (email, SMS, push), and automatic emergency messaging (Implemented)
  • Incident Report System:
    • Submit detailed reports with evidence, privacy controls, and public/private options (Implemented)
  • Responder Module:
    • Enables emergency responders to view, manage, and respond to alerts and communicate with users (Planned)
  • Admin Module:
    • System administration, statistics, and settings management (Planned)
  • AI Chat Helper (Optional):
    • Real-time guidance, safety tips, feature navigation, emotional support, and resource connection via natural language chat (Planned)

All implemented modules are secured with JWT authentication, role-based access, and robust validation.


πŸ—οΈ Architecture

  • Backend: Spring Boot 3.x, PostgreSQL, Spring Security, Docker, Azure VM deployment
  • Frontend: Expo (React Native), Expo Router, EAS (Expo Application Services), NativeWind/Tailwind, TypeScript
  • CI/CD: GitHub Actions (API deploy to Azure), EAS (web & Android builds/deploys), Namecheap DNS

πŸ“‚ Project Structure

SecureHerAI/
β”œβ”€β”€ secureherai-api/         # Spring Boot backend
β”‚   β”œβ”€β”€ src/                 # Java source code
β”‚   β”œβ”€β”€ database/            # SQL schema
β”‚   β”œβ”€β”€ endpoints/           # API test files
β”‚   └── ...                  # Docker, docs, etc.
β”œβ”€β”€ secureherai-app/         # Expo mobile app
β”‚   β”œβ”€β”€ app/                 # App screens (Expo Router)
β”‚   β”œβ”€β”€ components/          # UI components
β”‚   β”œβ”€β”€ services/            # API services
β”‚   β”œβ”€β”€ .eas/                # EAS workflows (CI/CD)
β”‚   └── ...                  # Config, assets, etc.
β”œβ”€β”€ .github/                 # GitHub Actions workflows
β”œβ”€β”€ README.md                # This file
└── ...                      # Docs, design, etc.

βš™οΈ Setup & Development

Backend (API)

  1. Prerequisites: Java 17+, Maven 3.6+, PostgreSQL 12+
  2. Environment:
    • Copy .env.example to .env and fill in secrets (see below)
    • Never commit .env to version control
  3. Run Locally:
    docker-compose -f docker-compose-dev.yml up --build
    API: http://localhost:8080

Mobile App

  1. Install dependencies:
    cd secureherai-app
    npm install
  2. Start development server:
    npx expo start

πŸ§ͺ Testing

  • API: Use HTTP files in secureherai-api/endpoints/ (e.g., auth_test.http, con_not_test.http)
  • Mobile: Use Expo Go, web browser, or emulators.
  • Test Coverage: All major modules (auth, contacts, notifications, alerts) have comprehensive tests and error handling for implemented features.

πŸ”’ Security

  • JWT authentication and role-based access
  • Input validation (phone, email, required fields)
  • Proper error codes and messages
  • User isolation for sensitive data (contacts, preferences)
  • Secure environment variable management

πŸ“² Deployment & CI/CD

GitHub Actions (API β†’ Azure)

  • Workflow: .github/workflows/deploy.yml
  • Deploys API to Azure VM on push to main
  • Steps: Docker build, SSH to VM, deploy with Docker Compose, health checks
  • Secrets: Managed via GitHub repository secrets (Azure VM, mail, OAuth, etc.)

EAS (Expo Application Services)

  • Workflows: secureherai-app/.eas/workflows/deploy.yml
  • Builds: Android APK, deploys web on push to main
  • Config: secureherai-app/eas.json for build profiles
  • Web App: https://secureherai.expo.app/

Namecheap DNS


πŸ“– Documentation


πŸ›£οΈ Roadmap & Future Enhancements

  • Real-time notifications (WebSocket) (Planned)
  • Notification templates and analytics (Planned)
  • Contact import and verification (Planned)
  • Location sharing enhancements (Planned)
  • Emergency templates and cloud sync (Planned)
  • Rate limiting and advanced security (Planned)

πŸ“ License

MIT License. See LICENSE.


🀝 Contributing

PRs and issues welcome! Please see the documentation and follow the established code style and commit conventions.


🌐 Links


Built with ❀️ by the SecureHerAI Team


References:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •