Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/city-of-helsinki/vesiliikenne-maas
Platform & APIs for selling water traffic tickets via 3rd parties
https://github.com/city-of-helsinki/vesiliikenne-maas
Last synced: about 1 month ago
JSON representation
Platform & APIs for selling water traffic tickets via 3rd parties
- Host: GitHub
- URL: https://github.com/city-of-helsinki/vesiliikenne-maas
- Owner: City-of-Helsinki
- License: mit
- Created: 2020-06-18T06:09:34.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2023-11-15T17:37:43.000Z (about 1 year ago)
- Last Synced: 2024-04-08T16:43:10.557Z (9 months ago)
- Language: TypeScript
- Size: 3.49 MB
- Stars: 2
- Watchers: 22
- Forks: 1
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Warning: this project as been deprecated
This pilot project has been depreacted. [Maritime MaaaS](https://github.com/City-of-Helsinki/maritime-maas) continues the work with same functionality and beyond. More information and technical documentation about the project can be found [here](https://maritime-maas.atlassian.net/wiki/spaces/MM/overview)
# Vesiliikenne MaaS
Next.js app that acts as an integration layer that mediates the connection between ticket sales platforms and MaaS providers. It is kept as platform-agnostic as possible so that multiple platforms and MaaS app providers can be supported and swapped out if needed.
## Requirements
- Docker
- Docker Compose## Getting started
To set up the development environment:
1. `yarn`
1. `./scripts/generate_keys.sh`
1. `yarn run create-api-key`
1. Create `.env` from `.env.dist` using above information, your mapbox account and integration keys from CRD
1. `docker-compose up`
1. `yarn run-migrations-dev up`
1. Navigate to http://localhost:3000/## Documentation
### Api documentation
[Link](https://vesiliikenne-maas.herokuapp.com/specs/redoc.html) to the api documentation
### Architecture diagram
[Link](doc/Vesiliikenne-MaaS-Architecture.pdf) to the architecture diagram
## Configuration
The application is configured using environment variables. The following variables are used:
- `CRD_URL` - The URL to the CRD Systems Bartrace API
- `CRD_TOKEN` - The access token to the aforementioned API
- `MAAS_API_KEY_HASH` - The hash of the API key that the MaaS frontend provider uses in their requests. Generated with `yarn run create-api-key`. **Note that the value generated by the script is escaped for use in a .env file. When directly configured as an environment variable, the the quotemarks and backslashed need to be removed.**
- `GWT_SIGNING_PRIVATE_KEY` - The private key used to sign responses with JWT. Generated with `./scripts/generate_keys.sh`
- `GWT_SIGNING_PUBLIC_KEY` - The public key which is used by the end user to verify responses from the API. Generated with `./scripts/generate_keys.sh` and accessible from `/api/ticket-public-key`.
- `DATABASE_URL` The url of the PostgreSQL instance used by the application.
- `MAPBOX_ACCESS_KEY` - This is required for the demo frontend to work. This can be acquired by making an account at https://www.mapbox.com/
- `DEV_API_KEY` - API key generated by the `yarn run create-api-key` script. This is used by the demo frontend to automatically authenticate requests.
- `ALLOW_DEMO_FRONTEND` - Allows access to the demo frontend. Should be disabled on production systems. If you want to enable this flag, set it to `allow`. Otherwise leave it out.
- `ALLOW_CRD` - Toggles if ticket sales should be posted to CRD backend. Should be disabled on local development environments. If you want to enable this flag, set it to `allow`. Otherwise leave it out.