Skip to content

dodaa08/Zarva

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

SafeRoute

SafeRoute is a mobile app designed to help users find safer routes while traveling, based on various safety parameters. The app fetches routes from Google Maps, evaluates the safety of each route, and displays the safest routes to the user along with the default Google Maps route for comparison.

Features

  • Fetches travel routes from Google Maps API
  • Displays the safest routes based on predefined safety data
  • Allows users to input origin and destination for route planning
  • Provides a safety score (0-100) for each route
  • Displays default Google Maps routes along with the safety data

Technologies Used

  • React Native for building the mobile app
  • Node.js and Express.js for backend services
  • Axios for HTTP requests to Google Maps API
  • Google Maps API for fetching routes
  • Dotenv for environment variables management

Installation

Backend Setup

  1. Clone the repository:

    git clone <repo-url>
  2. Install dependencies:

    cd backend
    npm install
  3. Create a .env file and add your Google Maps API key:

    GOOGLE_MAPS_API_KEY=<your-google-maps-api-key>
    
  4. Start the backend server:

    npm run dev

Frontend Setup (React Native)

  1. Clone the frontend repository:

    git clone <repo-url>
  2. Install dependencies:

    cd mobile-app
    npm install
  3. Run the app:

    npm start

Usage

Backend API

The backend exposes a POST endpoint to fetch routes:

POST /get-routes

Request body:

{
  "origin": "starting-point",
  "destination": "destination-point"
}

About

Cab Security

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published