Skip to content

A crowd-sourced safety navigation app that helps users travel from A to B while avoiding high-risk areas through real-time incident reporting.

Notifications You must be signed in to change notification settings

sakshichauhan06/SafetyNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

61 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ SafetyNet

Navigate Safely. Report Responsibly. Empower Your Community.

App Logo

A crowd-sourced safety navigation app that helps users travel from A to B while avoiding high-risk areas through real-time incident reporting.

Kotlin Jetpack Compose License

Features β€’ Architecture β€’ Screenshots β€’ Setup


🎯 Problem Statement

Traditional navigation apps show traffic conditions, but what about safety conditions? SafetyNet fills this gap by creating a community-driven safety map where users can report and view incidents in real-time, making informed decisions about their routes.

Gender-neutral. Community-powered. Safety-first.


Screenshots


Features

Interactive Safety Map

  • Real-time GPS location tracking
  • Color-coded incident markers
    • πŸ”΄ High Risk (Assault, Robbery)
    • 🟠 Medium Risk (Harassment, Theft)
    • 🟑 Low Risk (Suspicious Activity)
    • 🟒 Safe (Well-lit, Patrolled)
  • Smart 5km radius filtering
  • Auto-centering on user location

Incident Reporting

  • Tap-to-report interface
  • Dropdown incident type selection
  • Detailed description fields
  • Severity-based categorization
  • Timestamp & location metadata

Smart Detection

  • Duplicate filtering (50m radius)
  • Distance-based sorting
  • Severity + proximity algorithm
  • Real-time data synchronization

πŸ’Ύ Offline-First

  • Local Room database
  • Persistent incident storage
  • CRUD operations
  • Works without internet

Architecture

Built with Clean Architecture principles for scalability and maintainability:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           UI Layer (Jetpack Compose)                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  MapScreen β”‚  β”‚ ReportDialogβ”‚  β”‚ IncidentListβ”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Domain Layer (Business Logic)               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  Use Cases: AddIncident, GetNearbyIncidents  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Data Layer (Repository Pattern)            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ Local (Room DB)β”‚  ←→    β”‚ Remote (Firebase)  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Category Technology
Language Kotlin
UI Framework Jetpack Compose
Architecture MVVM
Dependency Injection Hilt
Database Room
Maps Google Maps
Backend Firebase Retrofit
Documentation KDoc

Security & Privacy

  • Location Privacy: GPS data never leaves device without user consent
  • Anonymous Reporting: Optional identity protection
  • Data Encryption: All sensitive data encrypted at rest
  • No Tracking: Zero analytics or user behavior tracking

Roadmap

Q1 2025
β”œβ”€β”€ βœ… Core incident reporting
β”œβ”€β”€ βœ… Interactive map with clustering
β”œβ”€β”€ βœ… Offline-first architecture
└── πŸ”„ Firebase integration (In Progress)

Q2 2025
β”œβ”€β”€ Route optimization avoiding high-risk areas
β”œβ”€β”€ Push notifications for nearby incidents
β”œβ”€β”€ Community verification system
└── Heatmap visualization

Future
β”œβ”€β”€ Multi-language support
β”œβ”€β”€ Safety analytics dashboard
β”œβ”€β”€ AI-powered incident prediction
└── Integration with local authorities

Installation

# Clone the repository
git clone https://github.com/yourusername/safetynet.git

# Navigate to project directory
cd safetynet

# Add your Google Maps API key in local.properties
echo "MAPS_API_KEY=your_api_key_here" >> local.properties

# Add google-services.json from Firebase Console
# Place in app/ directory

# Build the project
./gradlew build

# Run on device/emulator
./gradlew installDebug

Requirements:

  • Android Studio Hedgehog | 2023.1.1+
  • Minimum SDK: 24 (Android 7.0)
  • Target SDK: 34 (Android 14)
  • JDK 17+

Testing

# Run unit tests
./gradlew test

# Run instrumented tests
./gradlew connectedAndroidTest

# Generate coverage report
./gradlew jacocoTestReport

Documentation

Comprehensive KDoc documentation available. Generate docs:

./gradlew dokkaHtml

View at: build/dokka/html/index.html


🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please read CONTRIBUTING.md for details on our code of conduct.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ for safer communities GitHub issues

⭐ Star this repo if you find it useful! ⭐

About

A crowd-sourced safety navigation app that helps users travel from A to B while avoiding high-risk areas through real-time incident reporting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages