Inspiration
We were inspired by the desire to make travel safer and more accessible for everyone. While planning trips, travelers often have to consult multiple sources to gauge the safety of an area, find essential services like hospitals, or locate secure accommodation. We envisioned a single, comprehensive platform, SafeTravel, that would consolidate this critical information, allowing users to plan journeys with confidence and peace of mind. The idea was to leverage publicly available data to provide actionable insights, moving beyond simple navigation to intelligent, safety-aware route planning.
What it does
It leverage publicly available data to provide actionable insights, moving beyond simple navigation to intelligent, safety-aware route planning. While planning trips, travelers often have to consult multiple sources to gauge the safety of an area, find essential services like hospitals, or locate secure accommodation.
How we built it
SafeTravel is a full-stack web application built from the ground up.
Frontend: We chose a modern frontend stack using React and Vite for a fast, responsive user experience. We used Tailwind CSS for rapid UI development and Leaflet to render interactive maps, which are central to our application. User interactions, data fetching, and state management were handled with tools like Axios and TanStack Query.
Backend: The backend is powered by Node.js and Express, creating a robust REST API to serve data to the client. We implemented user authentication from scratch using express-session for session management and bcrypt for securely hashing passwords.
Database: We used PostgreSQL as our database, managed with the Drizzle ORM. This allowed us to define a clear schema for users, favorites (like saved hospitals or hotels), and journeys, enabling users to save and manage their travel plans.
API Integration: The core of our project involved integrating multiple third-party APIs: Nominatim & Overpass API: To geocode locations and fetch OpenStreetMap data for nearby hospitals, hotels, and tourist spots. data.police.uk: To pull in real-time (monthly) crime statistics for areas in the UK. OSRM (Open Source Routing Machine): To calculate route geometry, distance, and duration. A key feature is our "safest route" optimization. This works by sampling points along a standard route, checking the crime data for each point, and assigning a risk score, allowing users to compare the "shortest" path with the "safest" one.
Challenges we ran into
API Rate Limiting: Several of our core APIs, particularly Nominatim and the Overpass API, have strict rate limits. We had to be mindful of this during development and realized that a production-ready version would require robust caching to avoid hitting limits and ensure a smooth user experience.
Data Aggregation: Combining data from different sources was challenging. For example, correlating geographic coordinates from OpenStreetMap with crime data from the police API required careful data handling and transformation.
"Safest Route" Logic: Defining a "safest route" is non-trivial. Our current implementation (sampling points) is an approximation. A more advanced implementation would require complex graph algorithms (like A* or Dijkstra's) with a custom-weighted graph, which was beyond the scope of a short hackathon.
Data Scarcity: The biggest limitation is that our core safety feature relies on the data.police.uk API, restricting our application's utility to just the UK. Finding reliable, programmatic crime data for other countries is a significant challenge we'd need to solve to expand the project.
What we learned
This hackathon was a massive learning experience. We learned how to architect a full-stack application from concept to deployment. A major takeaway was the complexity of integrating multiple, disparate external APIs, each with its own data structure, rate limits, and usage policies.
We gained hands-on experience with database design, user authentication, and session management, understanding the security implications of handling user data. We also learned the importance of asynchronous programming and state management on the frontend, especially when dealing with data-heavy components like interactive maps and dynamic charts. Finally, we learned to critically assess data limitations—for instance, our crime data is UK-only, which forced us to think about how the app would scale and what a V2 would look like.
What's next for Safe Travel
Real-time crime data integration (where available) Advanced route optimization with graph algorithms Multi-country crime data support A mobile app (React Native) Real-time collaboration features Integration with travel booking APIs Weather data integration Emergency contact information by region
Built With
- api
- axios
- bcrypt
- cors
- css
- data.police.uk
- dotenv
- drizzle-kit
- drizzle-orm
- express-session
- express.js
- javascript
- leaflet.js
- lucide-react
- node.js
- nominatim
- npm
- osrm
- overpass
- pg
- postgresql
- radix-ui/react-*
- react
- router
- tailwind
- tanstack/react-query
- tsx
- typescript
- vite






Log in or sign up for Devpost to join the conversation.