SafeWay is a safety-focused navigation app that calculates walking/driving routes based on crime data, street lighting, and environmental factors rather than just distance. Unlike standard maps that optimize for speed, SafeStep empowers users to choose their own balance between efficiency and safety using dynamic risk weighting and predictive machine learning.
- Map Interface
- Search
- Visual Routing
- Location Tracking
- Historial Data Collection
- Edge Weight Algorithm
- User Controls / Preferences
- Predictive Layer (ML)
- Live Data Scraper (Automation + NLP)
- Contextual APIs
- Client Side Server (model)
- Future Implementation: Travel Planner (Traveling Salesman)
Week 1: Setup 🌅
- Decide frontend/backend teams
- Finalize tech stack
- Research/Learn Tech Stack
- Understand Kaggle DataSet (Crime Data)
- Environment Setup
- Set up React Native (Expo) project on the phone.
- Set up FastAPI "Hello World" server on the laptop.
- Learn Git/Github
- Begin App Design with Figma
Week 2: Ramp-Up 💡
-
Frontend:
- Finish Figma Design and Prototype by the end of week
- Learn React Native
- Implement react-native-maps to show the user's current location (Blue Dot).
-
Backend:
- Start looking into the API’s
- Set up User Authentication
- Set up Database
- Install PostgreSQL & PostGIS extension.
- Use OSMnx to download a small map chunk (e.g., Campus area) and save nodes/edges to DB.
-
Milestone: You can see the map on the phone and query street data in SQL
Week 3: Coding ⚙️
-
Frontend:
- Login/Sign Up Pages
- Home Page
- Fetch and display a static list of coordinates (Polyline) from the backend
- Color-code the line (Green/Red) based on a dummy "risk score" sent by the server.
- Deliverable: A colored line appears on the map.
-
Backend:
- Ingest historical crime CSV into the Database (spatially join to nearest streets)
- Write a script to calculate a Base_Risk_Score (0-10) for every street segment
- Create groups, Join groups
- Create an API endpoint GET /risk_map that returns colored lines
- Deliverable: API returns JSON with street segments and scores.
-
Milestone: The phone map displays streets colored by their historical safety score.
Week 4: More Coding ⚙️
- Frontend:
- Add text input for "Destination."
- Implement Geocoding (convert "Library" to lat/long) using a free API (example: Nominatim)
- Deliverable: User types a place, map pins it
- Backend:
- Build the Graph in NetworkX
- Implement the Cost Function. (example: Cost = Length + (Risk * Weight))
- Write search algorithm logic. (Dijkstra’s Algorithm or A* Search)
- Deliverable: Script prints "Safe Path" nodes between two points.
Week 5/6: Middle Stretch 💫
- Integrate backend features with finished frontend pages (User Auth)
- Frontend
- Navigation Controls:
- Send start and end coordinates to the backend.
- Receive the route_geometry array
- Draw the specific path on the map
- Deliverable: "Get Route" button draws the calculated path.
- User Controls:
- Add "Safety vs. Speed" Slider (0.0 - 1.0)
- Pass slider value to the backend API.
- Deliverable: Moving slider refreshes the route line.
- Navigation Controls:
- Backend
- The Routing API:
- Create endpoint POST /get_route
- Accept start, end, and safety_preference
- Return the calculated path as GeoJSON.
- Deliverable: API returns the optimal path coordinates
- Dynamic Weighting:
- Update routing logic to use the safety_preference multiplier.
- Tuning: Adjust math so the route actually changes when slider moves.
- Deliverable: API returns different paths for Safety=0 vs Safety=1.
Week 7: Almost There ⏳
- Integrate finished backend features with finished frontend pages
- Finish all MVP features
- Work on stretch goals if possible
- Frontend
- Implement "Camera Follow" mode (map centers on user)
- Add "Step-by-Step" text box ("Turn left on Main St")
- Deliverable: App feels like a real GPS
- Backend
- Generate text instructions from the route ("Head North")
- Send instructions along with geometry
- Deliverable: API returns readable steps.
Week 8: Wrapping Up 🌙
- Finish backend/frontend integration
- Add finishing touches
- Finish stretch goals if possible
- Begin work on presentation
Week 9/10: Presentation Prep 🎬
- Prep for Presentation Night
- Finish Slides + Script + Demo
IDE: VSCode
Emulator: Expo or XCode
Wireframe: Figma
1st Choice Stack:
- Mobile App (Frontend): React Native (via Expo)
- Map Interface: react-native-maps
- Backend API: FastAPI (Python)
- Database: PostgreSQL + PostGIS
- Routing Engine: NetworkX (Python)
- Data Processing: Pandas & GeoPandas
- Machine Learning: Scikit-Learn
- Map Data Source: OSMnx
React Native:
- React Native Basics
- Environment Setup
- Environment Setup with Expo
- Build Full Stack App in React Native
- React Native Course
- React Native Tutorial
XCode:
FastAPI:
APIs:
- Fetching Data from an API in React Native
- React Native Tutorial - POST Request
- React Native tutorial - API Call
- Google Calendar API with Node.js
- Postman Tutorial
- RapidAPI
- Google Cloud Natural Language API
Other Technologies for Finding Free Time Slots:
- GraphQL Course for Beginners
- GraphQL With React Tutorial - Apollo Client
- date-fns
- AWS Lambda
- Associating a Lambda function to your Amazon Lex v2 bot
- Amazon Lex: Validate Slot data with Lambda
Optional/Stretch Goals:
Git Cheat Sheets:
Resources for Design:
- Best App Design - copy and paste link if it takes you to forbidden
- Dribble - copy and paste link if it takes you to forbidden
- Color Palettes
- More Color Palettes
- Do's and Don'ts of Mobile App Design
Other Resources:
General Use
| Command | Description |
|---|---|
| cd "SafeWay" | Change directories over to our repository |
| git branch | Lists branches for you |
| git branch "branch name" | Makes new branch |
| git checkout "branch name" | Switch to branch |
| git checkout -b "branch name" | Same as 2 previous commands together |
| git add . | Finds all changed files |
| git commit -m "Testing123" | Commit with message |
| git push origin "branch" | Push to branch |
| git pull origin "branch" | Pull updates from a specific branch |
- Mathew Biji
- Thilak Jayachandran