Skip to content

trufi-association/trufi-core

Repository files navigation

Trufi Core

GPLv3 License style: lint contributions welcome Twitter Follow Flutter Test

A cross-plattform multi-modal public transport app based on open data. Built in Flutter by the Trufi Association, a social startup.

Trufi Logo

Get the Trufi App for your city

The mobile application is currently available for the following cities:

Please contact the Trufi Association to get one for your city, too. But if you prefer to do it yourself then see below:

Getting started

Trufi Core is the base dependency used to create your public transport app. Have a look at the example implementation that contains further instructions.

Preparing environment

  1. Copy the contents of the folder example into a new repository. See trufi-app for an example because we did it like what described below.

  2. Modify pubspec.yml: Replace the content

      trufi_core:
        path: ../

    with

      trufi_core:
        git:
          url: https://github.com/trufi-association/trufi-core.git
          ref: main

    to be able to use this library - trufi-core

  3. Prepare your development environment so you can compile it successfully

Making necessary modifications

  1. Edit main.dart and modify the necessary things

    1. Offline search POI functionality: remove photonUrl and generate your own version of the assets/data/search.json using osm-search-data-export.
    2. Online search POI functionality: remove searchAssetPath
  2. Change drawer-bg.jpg

Contributing

See CONTRIBUTING and our Code of Conduct prior to contributing.

Translations

Do not modify the files in /translations they are managed from Lokalise. If you need to update the translations checkout the Translations Update Guide Please reach out to the Contributers to get access.

If you need to overwrite translations of the Host app checkout the following article here.

Complementary projects

osm-search-data-export - Generates offline search data that includes POIs, streets and street junctions. The app currently uses the json-compact format.

osm-public-transport-export - Fetches OSM data and generates GeoJSON and additional files.

geojson-to-gtfs - Turns generated GeoJSON and additional data into GTFS.

gtfs-bolivia-cochabamba - Config package that internally uses osm-public-transport-export and geojson-to-gtfs to generate a GTFS file to be used in OTP. Use this as a template to generate your own GTFS.

OpenTripPlanner - Trip planning server that uses GTFS feeds for routing.

Free Software

Copyright 2020-present - Trufi Association

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Shout-outs

Big thanks to Lokalise for supporting our localization efforts with a free Open Source Enterprise plan. Thanks to the FMI - Finnish Meteorological Institute for the Open Weather Data