Skip to content

Marc-JB/TraiNL

Repository files navigation

Banner image

TraiNL

Public transport app that showcases various Android architecture patterns (like MVVM, Dependency Injection).

Android Release Quality Gate Status License: CC BY-NC-ND 4.0

📔 Table of Contents

🌟 About the Project

📷 Screenshots

Screenshot: Departures (light mode) Screenshot: Departures (dark mode)

👾 Tech Stack

An Android application in Kotlin with the following libraries/patterns:

🎯 Features

  • Viewing train departures at any Dutch train station
  • Viewing details of a train, like toilet availability or delay per station on the route
  • Viewing a list of disruptions (including maintenance)
  • Improved reliability of information shown in the app when compared to other providers that use the Dutch Railways API

🎨 Color Reference

Color Hex
Primary Color #1976D2 #1976D2
Primary Color (Light) #63A4FF #63A4FF
Primary Color (Dark) #004BA0 #004BA0
Secondary Color #FFEB3B #FFEB3B
Secondary Color (Light) #FFFF72 #FFFF72
Secondary Color (Dark) #C8B900 #C8B900
App Icon Color (Start) #536DFE #536DFE
App Icon Color (End) #6A3DE8 #6A3DE8

🔑 Environment Variables

This project requires a Firebase Crashlytics configuration file and a Dutch Railways API key.

Setting up Firebase Crashlytics

  1. Generate a google-services.json file from the Firebase console
  2. Copy the file to /app/

Configuring the Dutch Railways API

  1. Sign up to the Dutch Railways developer portal
  2. Subscribe to the Ns-App service
  3. Copy your API key and use it in
    • local.properties by adding a line dutchRailways.travelInfoApi.key= which is then followed by the API key.
    • the enviromental variables (in a CI/CD pipeline) by setting a property DUTCHRAILWAYS_TRAVELINFOAPI_KEY to your API key.

🧰 Getting Started

Note: This project may contain references to "OVgo". This was the previous name for this app.

‼️ Prerequisites

This project uses Gradle as build tool. Android Studio is the recommended IDE to deploy or test this application.

⚙️ Installation

To build the project from a command line/terminal, run the following command:

./gradlew build

🧪 Running Tests

To run tests, run:

./gradlew :app:cleanTestDebugUnitTest :app:testDebugUnitTest

🚩 Deployment

To build .apk and .aar files, run:

./gradlew bundleRelease assembleRelease

👀 Usage

New versions of this app are uploaded to the releases page. You can download an .apk file there to install on your Android device.

⚠️ License

This project is published under the Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) License. Read more about this license in the LICENSE file or on https://creativecommons.org/licenses/by-nc-nd/4.0/.

💎 Acknowledgements