Back to Blog

Building Greece Transit for bus tracking in Athens and Thessaloniki

Emmanouil Athanasopoulos2 min read307 words
React NativeMapsNFCPublic Transit

The Motivation Behind the Project

Greece Transit was built to make public transport information easier to access on the move. The app focuses on the kind of data people need quickly: where the bus is, what the stop is called, and when the next one arrives.

Core Features and Design Goals

  • Real-time bus locations: the core feature for making transit information feel current.
  • Stop details: quick reference for stations and routes.
  • Schedules: a way to plan around departures instead of guessing.

Technical Implementation

  • Built a unified API abstraction layer that transparently switches between the OASA Telematics API (Athens) and the OASTH API (Thessaloniki) based on city context, with a shared TypeScript interface for lines, routes, stops, and bus locations so the UI layer never knows which backend it's talking to.
  • Implemented a persistent API cache using AsyncStorage that stores static transit data (lines, routes, stops) to survive network failures, with cache-first reads and background refreshes — while keeping live bus locations always fetched fresh.
  • Designed an NFC transit card reader using react-native-nfc-manager with custom binary parsers that decode MIFARE Classic sector data to extract ticket validity, remaining trips, and card metadata from Athens transit cards.
  • Built a two-step schedule resolver that first queries available schedule day types for a master line, then fetches departure times for both directions, extracting HH:MM from legacy datetime strings and deduplicating with Set for clean schedule presentation.

The Technology Stack

Built with Expo SDK 54, Expo Router, and TypeScript. The data layer uses a unified API client with AsyncStorage-backed caching, React Query for reactive data fetching, and a city-context provider. The map uses React Native Maps with Gorhom Bottom Sheet for stop details, and the NFC module reads raw MIFARE Classic sector data for transit card information.

Final Reflections

Transit tools work best when they remove uncertainty instead of adding more choices.