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.
- 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
- 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
-
Clone the repository:
git clone <repo-url>
-
Install dependencies:
cd backend npm install
-
Create a
.env
file and add your Google Maps API key:GOOGLE_MAPS_API_KEY=<your-google-maps-api-key>
-
Start the backend server:
npm run dev
-
Clone the frontend repository:
git clone <repo-url>
-
Install dependencies:
cd mobile-app npm install
-
Run the app:
npm start
The backend exposes a POST endpoint to fetch routes:
POST /get-routes
Request body:
{
"origin": "starting-point",
"destination": "destination-point"
}