GithubHelp home page GithubHelp logo

jurevans / mtagtfs Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 430 KB

React-Native GTFS Public Transportation App for NYC

JavaScript 2.38% TypeScript 74.55% Starlark 1.17% Java 11.91% Ruby 1.94% Objective-C 8.04%

mtagtfs's Introduction

MTA GTFS App

Table of Contents

About

This project aims to be a fully featured iOS and Android public transit application. It utilizes the GTFS feed data served via a GraphQL API for the NYC MTA (primarily), serving subway, Long Island Railroad, Metro North Rail, buses in all five boroughs, and will include NYC Ferry, as well as other data sources. See the following projects to learn about the APIs that power this app:

GTFS GraphQL API: https://github.com/jurevans/gtfs-graphql-api/

GTFS-Realtime GraphQL API: https://github.com/jurevans/gtfs-realtime-graphql-api/

[ Table of Contents ]

Set-up

The following .env variables are required to build this app:

MAPBOX_ACCESS_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
GTFS_API_GATEWAY_URL=http://localhost:4000/graphql
GTFS_API_GATEWAY_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXX

MapBox

This app uses MapBox, and will need a valid key to load the map. You will need to create an account with MapBox to obtain a MAPBOX_ACCESS_TOKEN to set in this file.

You will also need to add a "downloads API" token to the /android/gradle.properties, like so:

# Key for MapBox Downloads API
MAPBOX_DOWNLOADS_TOKEN=XXXXXXXXXXXXXXXXXX

API Gateway

The GTFS_API_GATEWAY_URL and GTFS_API_GATEWAY_KEY must be valid to access the GraphQL API. Presently, only the gtfs-graphql-api and gtfs-realtime-graphql-api APIs are in place, but an API gateway merging these schemas is being developed that will serve this app.

Running Metro

This project requires the react-native-cli. Starting up Metro and launching the emulator is straightforward, assuming that your environment has been configured according to the React Native environment setup docs:

# Start metro (in a separate terminal)
npm start
# OR
npx react-native start

# Launch app on Android
npm run android
# OR
npx react-native run-android

# Launch on iOS
npm run ios
# OR
npx react-native run-ios

[ Table of Contents ]

Notes

Read more about the frameworks and libraries this app utilizes at the links below:

[ Table of Contents ]

mtagtfs's People

Contributors

jurevans avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.