TrailKit: An Offline Trail Companion
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass What I Built TrailKit is an app for hikers who want to explore trails without worrying about losing network coverage. It tracks your trek, identifies plants and animals, and keeps your route and photos on your phone. Here's what it can do: Record your trek. GPS tracks your route, even with the screen off.…
TrailKit is an app designed for hikers who wish to explore trails without worrying about losing network coverage. The app tracks hikes, identifies plants and animals using AI, and keeps route and photos on the user's phone.
Key features of TrailKit include:
- Recording treks with GPS tracking even when the screen is off
- Identifying plants, insects, and snakes from photos taken during the hike using AI on the phone
- Providing safety information and first-aid guidance for dangerous species
- Allowing users to mark interesting views on their route
- Providing a checklist and countdown to help plan the hike
- Alerting users if they stray more than 60 meters from their planned route
- Sharing treks privately, with the option to share route, statistics, and identified species with other hikers
TrailKit is built using Expo, React Native, and TypeScript for Android and iOS. The main challenge in development was getting AI identification to work locally while ensuring it doesn't generate misleading safety advice.
Two models run on the phone to achieve this:
- BioCLIP, trained on biological data, compares photos against a list of known species and ranks the closest matches using ONNX Runtime
- Gemma 4 E2B, a 2.6 GB model, generates short explanations based on BioCLIP's top match
If the AI is less than 60% confident in its identification, TrailKit will say it's unsure and show the three leading candidates. If a plausible match is dangerous, TrailKit treats it as dangerous and shows relevant safety information.
The app uses MapLibre with free tiles from OpenFreeMap, based on OpenStreetMap data. Users can download the map around their planned route before leaving to ensure they have everything they need even without network connectivity.
The optional community features use Supabase for authentication, Postgres storage, and profile photos, with row-level security policies to restrict accounts to their own data. Deleting an account removes all local data and posts.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.