Inspiration

This idea came from a real experience. While heading for a hike, I took a 43km Bolt ride from Sabaki to Githiga. The electric bike's battery died just 2km from the destination. We pushed it uphill together, and during that conversation, the rider shared the daily struggles of estimating battery range, locating swap stations, and managing EV uncertainty. That's when BattSwap was born.

What it does

  • Detects rider’s real-time location
  • Prompts for dual battery percentages (A & B)
  • Calculates range based on battery input
  • Plans optimized route to destination
  • Suggests mid-route swap stations if range is insufficient
  • AI assistant accepts natural language queries for trip evaluation

How we built it

  • Frontend: React + Vite + TailwindCSS
  • Maps & Routing: Leaflet, OpenStreetMap, OSRM, Nominatim
  • AI Logic: Custom assistant with natural language parsing & dynamic trip reasoning
  • Voice Navigation: Web Speech API (optional)
  • Geolocation: Browser APIs with graceful fallback logic

Challenges we ran into

  • Real-time Location & Permissions: Handling browser compatibility and user permission issues for location access.
  • Complex Battery Modeling: Creating realistic dual-battery range estimations, including safety buffers.
  • Voice Navigation: Synchronizing speech synthesis across devices and browsers.
  • Map Integration: Combining OSM, OSRM, and Nominatim with error handling and fallback logic.
  • Mobile Responsiveness: Balancing full functionality with mobile-first responsive design, especially map UI.

Accomplishments that we're proud of

  • Smart Battery System: Dual-battery logic with dynamic range detection and swap station rerouting.
  • AI-Powered Assistant: Natural language understanding for destination checks and trip analysis.
  • Turn-by-Turn Routing: Integrated voice guidance with live routing and lane support.
  • Polished UX: Smooth UI with seamless transitions, mobile optimization, and intuitive flow.
  • Robust Integrations: Multiple external APIs with fail-safes for a production-ready EV trip planner.

What we learned

  • API Resilience: Building fallback systems and caching strategies for real-time data.
  • Mobile-First Thinking: Designing intuitive touch-first interactions with map overlays and input forms.
  • Voice UI Design: Crafting natural, helpful voice feedback for navigation tasks.
  • Battery Logic Modeling: Understanding real-world EV range patterns and constraints.
  • UX Balancing: Prioritizing clarity, feedback, and flow to reduce user anxiety and decision friction.
  • Live Data Handling: Managing dynamic updates, asynchronous streams, and state persistence across sessions.

What's next for BattSwap

  • Integrate live swap station availability from battery providers
  • Train models to predict battery performance over time
  • Optimize swap station suggestions based on traffic, battery age, and user history
  • Full API integration with Bolt/Uber for automated ride readiness checks

Built With

Share this project:

Updates