Skip to content

Commit 113b359

Browse files
author
Landon Reed
authored
Merge pull request #3 from catalogueglobal/dev
Version release
2 parents f28b44e + 1976d15 commit 113b359

File tree

209 files changed

+4368
-3212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+4368
-3212
lines changed

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,19 @@ config_server.yml
1111
configurations/*
1212
!configurations/default
1313
tmp/
14+
15+
# Optional npm cache directory
16+
.npm
17+
18+
# Optional REPL history
19+
.node_repl_history
20+
21+
# Configurations
22+
configurations/*
23+
!configurations/default
24+
dist
25+
assets
26+
27+
# Secret config files
28+
env.yml
29+
env.yml-original

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ cache:
77
yarn: true
88
before_install:
99
- npm i -g codecov
10+
- pip install --user mkdocs
1011
script:
1112
- yarn run lint
1213
- yarn run cover-client
1314
- codecov
1415
- yarn run build
16+
- mkdocs build
1517

1618
# If sudo is disabled, CI runs on container based infrastructure (allows caching &c.)
1719
sudo: false

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
# Transit Data Manager
1+
# datatools-ui
22

33
The core application for Conveyal's transit data tools suite.
44

5+
## Configuration
6+
7+
This repository serves as the front end UI for the Data Manager application. It must be run in conjunction with [datatools-server](https://github.com/conveyal/datatools-server)
8+
59
## Documentation
610

7-
View the [latest documentation](http://conveyal-data-tools.readthedocs.org/en/latest/) at ReadTheDocs.
11+
View the [latest documentation](http://conveyal-data-tools.readthedocs.org/en/latest/) at ReadTheDocs for more info on deployment and development as well as a user guide.

configurations/default/env.yml.tmp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
AUTH0_CLIENT_ID: your-auth0-client-id
2+
AUTH0_DOMAIN: your-auth0-domain
3+
MAPZEN_TURN_BY_TURN_KEY: test-turn-key
4+
MAPBOX_ACCESS_TOKEN: test-access-token
5+
MAPBOX_MAP_ID: mapbox.streets
6+
MAPBOX_ATTRIBUTION: <a href="https://www.mapbox.com/about/maps/" target="_blank">&copy; Mapbox &copy; OpenStreetMap</a> <a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>
7+
# R5_URL: http://localhost:8080

configurations/default/settings.yml

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,20 @@ entries:
33
- lib/index.css:dist/index.css
44
application:
55
data:
6-
mapdb: /path/to/mapdb
7-
gtfs: /path/to/gtfs
8-
editor_mapdb: /path/to/editor
9-
regions: /path/to/regions/geojson
10-
use_s3_storage: false
116
gtfs_s3_bucket: bucket-name
12-
port: 4000
137
title: Data Manager
14-
assets_bucket: bucket-name
158
logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png
169
active_project: project-id
1710
notifications_enabled: false
18-
public_url: http://localhost:9000
1911
docs_url: http://docs.example.com
2012
changelog_url: https://changelog.example.com
2113
support_email: support@example.com
22-
osm_vex: http://localhost:1000
23-
r5: http://localhost:8080
2414
date_format: MMM Do YYYY
25-
26-
auth0:
27-
domain: your-auth0-domain
28-
client_id: your-auth0-client-id
29-
MAPZEN_TURN_BY_TURN_KEY: API_KEY
30-
mapbox:
31-
access_token: MAPBOX_ACCESS_TOKEN
32-
map_id: conveyal.ie3o67m0
3315
modules:
3416
enterprise:
3517
enabled: false
3618
editor:
3719
enabled: true
38-
legacy_editor:
39-
enabled: false
40-
url: http://localhost:9001
4120
alerts:
4221
enabled: false
4322
use_extension: mtc
@@ -51,16 +30,9 @@ modules:
5130
enabled: false
5231
gtfsapi:
5332
enabled: false
54-
load_on_fetch: false
55-
load_on_startup: false
5633
use_extension: mtc
57-
update_frequency: 3600 # in seconds
58-
5934
extensions:
6035
transitland:
61-
enabled: true
62-
api: https://transit.land/api/v1/feeds
36+
enabled: false
6337
transitfeeds:
64-
enabled: true
65-
api: http://api.transitfeeds.com/v1/getFeeds
66-
key: your-api-key
38+
enabled: false

docs/dev/deployment.md

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,40 @@
22

33
## Prerequisites
44

5-
The application features a Spark-powered Java backend and a Javascript frontend written with React and Redux. To install and deploy the application, you will need Java 8, Maven, Node/npm, yarn, and [mastarm](https://github.com/conveyal/mastarm).
5+
The application consists of two repositories: a [Spark-powered Java backend](https://github.com/conveyal/datatools-server) and a [Javascript frontend written with React and Redux](https://github.com/conveyal/datatools-ui). To install and deploy the application, you will need Java 8, Maven, Node/npm, yarn, and [mastarm](https://github.com/conveyal/mastarm).
66

7-
User athentication is done via [Auth0](http://auth0.com). You will need an Auth0 account and application to use the Data Manager.
7+
User authentication is done via [Auth0](http://auth0.com). You will need an Auth0 account and application to use the Data Manager.
88

99
## Installation and Basic Configuration
1010

1111
Clone the repo and change to the project directory:
1212

1313
```bash
14-
$ git clone https://github.com/conveyal/datatools-manager.git
15-
$ cd datatools-manager
14+
$ git clone https://github.com/conveyal/datatools-ui.git
15+
$ git clone https://github.com/conveyal/datatools-server.git
1616
```
1717

18-
Copy the included configuration templates:
18+
Copy the included configuration `env` templates for both the server and UI repos:
1919

2020
```bash
21-
$ cp config.yml.template config.yml
22-
$ cp config_server.yml.template config_server.yml
21+
$ cp datatools-ui/configurations/default/env.yml.tmp datatools-ui/configurations/default/env.yml
22+
$ cp datatools-server/configurations/default/env.yml.tmp datatools-server/configurations/default/env.yml
2323
```
2424

25-
Create directories on your local machine to store the MapDB databases, GTFS feeds, and GeoJSON data. Update the following properties in `config.yml` to reflect these locations:
25+
You'll then need to supply Auth0 account information (see below) and API keys for various services used in the application.
26+
27+
The default `server.yml` (for `datatools-server`) and `settings.yml` (for `datatools-ui`) should work out of the box, but you may want to specify alternative settings files outside of these repositories. These can be specified as a directory during `datatools-ui` build with mastarm:
28+
29+
```bash
30+
$ mastarm build --config /path/to/configurations/dir
31+
```
32+
33+
AND as individual file args for `datatools-server`:
34+
35+
```bash
36+
$ java -jar target/dt-v1.0.0.jar /path/to/env.yml /path/to/server.yml
37+
```
38+
In `datatools-server:server.yml`, be sure to update the paths for where the databases will be stored:
2639

2740
```yaml
2841
application:
@@ -65,26 +78,24 @@ Create your first Auth0 user through Auth0 web console (Users > Create User). In
6578
}
6679
```
6780

68-
#### Update `config.yml` and `config_server.yml`
69-
Update the following properties in `config.yml` to reflect the public Auth0 application settings:
81+
#### Update `env.yml` for both
82+
Update the following properties in **both** `env.yml` files to reflect the public Auth0 application settings:
7083

7184
```yaml
72-
auth0:
73-
domain: your-auth0-domain.auth.com
74-
client_id: your-auth0-client-id
85+
AUTH0_DOMAIN: your-auth0-domain.auth.com
86+
AUTH0_CLIENT_ID: your-auth0-client-id
7587
```
7688

77-
Update the following properties in `config_server.yml` to reflect the secure Auth0 application settings:
89+
Update the following properties in `datatools-server` `env.yml` to reflect the secure Auth0 application settings:
7890

7991
```yaml
80-
auth0:
81-
client_secret: your-auth0-client-secret
82-
api_token: your-auth0-api-token
92+
AUTH0_SECRET: your-auth0-client-secret
93+
AUTH0_TOKEN: your-auth0-api-token
8394
```
8495

8596
**Note**: to generate the `api_token`, go to Documentation > Management API. After adding scopes, your token will appear in the input field.
8697

87-
![Auth0 token generator](/img/auth0-token-generator.png =50x)
98+
![Auth0 token generator](../img/auth0-token-generator.png)
8899

89100
To allow for the creation, deletion and editing of users you must generate a token for the following scopes:
90101

@@ -117,12 +128,12 @@ $ mvn package
117128
Deploy the application with Java:
118129

119130
```bash
120-
$ java -jar target/datatools.jar
131+
$ java -jar target/dt-v1.0.0.jar /path/to/env.yml /path/to/server.yml
121132
```
122133

123134

124-
The application back-end should now be running at `http://localhost:9000` (or whatever port you specified in `config.yml`).
125-
The front-end assets are pointed to by the back end at whatever s3 bucket name is specified in `config.yml` at `application.assets_bucket`.
135+
The application back-end should now be running at `http://localhost:9000` (or whatever port you specified in `server.yml`).
136+
The front-end assets are pointed to by the back end at whatever s3 bucket name is specified in `server.yml` at `application.assets_bucket`.
126137

127138
## Configuring Modules
128139

@@ -135,25 +146,26 @@ Enables the GTFS Editor module.
135146
#### List of configuration settings
136147

137148
- `MAPZEN_TURN_BY_TURN_KEY`
138-
- `mapbox`
139-
- `access_token`
140-
- `map_id`
149+
- `MAPBOX_MAP_ID`
150+
- `MAPBOX_ACCESS_TOKEN`
151+
- `R5_URL` (optional parameter for r5 routing in editor pattern drawing)
141152

142153
### Validator
143154

144155
While the application handles basic validation even without the validator module enabled, the validator allows for enhanced accessibility- and map-based validation.
145156

146157
#### List of configuration settings
147158

148-
- `application.osm_vex` - the validator requires the URL of a running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
159+
- `OSM_VEX` - `datatools-server:env.yml` the validator requires the URL of a running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
160+
149161

150162
### Sign Configurations
151163

152164
Enables the sign configuration module.
153165

154166
#### List of configuration settings
155167

156-
- `use_extension` - extension to use for sign configuration
168+
- `use_extension` - extension key to use for sign configuration
157169
- `url`
158170
- Requires `gtfsapi` module
159171

@@ -163,7 +175,7 @@ Enables the real-time alerts module.
163175

164176
#### List of configuration settings
165177

166-
- `use_extension` - extension to use for sign configuration
178+
- `use_extension` - extension key to use for sign configuration
167179
- `url`
168180
- Requires `gtfsapi` module
169181

@@ -177,7 +189,7 @@ Enables the OTP automated deployments module.
177189

178190
#### List of configuration settings
179191

180-
- `application.osm_vex` - the validator requires the URL of a running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
192+
- `OSM_VEX` - `datatools-server:env.yml` the validator requires the URL of a running instance of the [OSM vex server](https://github.com/conveyal/vanilla-extract).
181193

182194
### GTFS API
183195

@@ -188,7 +200,7 @@ Supports other modules with API endpoints for getting GTFS entities (routes, sto
188200
- `load_on_fetch` - whether to load GTFS feeds when new feed is detected
189201
- `load_on_startup` - whether to load GTFS feeds on application startup
190202
- `use_extension` - which extension to connect to
191-
- `update_frequency` - update frequency for GTFA API (in seconds)
203+
- `update_frequency` - update frequency for GTFS API (in seconds). Comment out to disable updates.
192204

193205
## Configuring Extensions
194206

docs/dev/development.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ To kick off a development server at [http://localhost:9966](http://localhost:996
1010
npm start
1111
```
1212

13-
This will use `mastarm` to run a browserify server at the above port along with a proxy for the back-end API, which is assumed to be running on http://localhost:4000.
13+
This will use `mastarm` to run a browserify server at the above port along with a proxy for the back-end API, which is assumed to be running on http://localhost:4000.
14+
15+
To optionally substitute the default configuration, provide your own directory:
16+
17+
```
18+
npm start -- --config /path/to/config
19+
```

docs/img/add-fare-zone.png

6.13 KB
Loading

docs/img/auth0-token-generator.png

-11.1 KB
Loading

docs/img/create-project.png

-106 KB
Loading

0 commit comments

Comments
 (0)