ychinamale / ev-chargers-mob

An Android app that allows an EV driver to find nearby charge points - built with React Native.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EV Charger Finder

An Android app that allows an EV driver to find nearby charge points - built with React Native.

Approach

The app launches with its default location set to a region in Johannesburg South Africa. The MapView component shows a map of the area. A side effect fetches ev chargers in the vicinity using coordinates of the default location. Moving the map triggers another side effect to update the region in focus (kept in state). Once that happens, the app re-fetches ev chargers in the new area. A simple png is used as a marker for a charger site. These are shown on the screen once the list of charge points updates. To check against calls to re-fetch charge points being too frequent, a debounce function is used to delay repeat calls when the region updates.

App Preview

Features

  • Jump to current location
  • Identify EV charger points in vicinity
  • Initiate charging session with chosen charger point (dummy request)

Tech Stack

Setup

OPENCHARGEMAP_API_KEY=your_api_key_here
OPENCHARGEMAP_BASE_URL=https://api.openchargemap.io/v3
  • Start the app by running these commands: yarn and then yarn android

Things I'd have wanted to do

  • Update the 'Status' so it reflects the readiness of the charger markers
  • Setup and built iOS app
  • UI improvements
  • Housekeeping (e.g. set up absolute paths, linting, TS, app icons, splash screen)
  • Add more comments to the code
  • Add dimension scaling
  • Looked into performance (e.g. unnecessary re-renders, glitch when user quickly flicks the MapView)
  • Moved API keys to backend
  • A location search at the top so we don't scroll everywhere
  • A bookmark feature for favourite locations
  • An intuitive way of showing that a certain charger has multiple charge points
  • Show user the distance to a selected charger

About

An Android app that allows an EV driver to find nearby charge points - built with React Native.


Languages

Language:Java 35.4%Language:JavaScript 32.8%Language:Objective-C 16.3%Language:Starlark 8.4%Language:Ruby 7.1%