Commit 83e1f591 authored by Andreas Muttscheller's avatar Andreas Muttscheller

Add README

parent 4bd2a8e2
# Bahn Delay Information Bot
This application provides information about delayed trains from Deutsche Bahn. It can publish delay information to users via Slack and provides a GraphQL interface for stations. The app is deployed on Amazon AWS and uses Lambdas, DynamoDB, ElasticSearch and API Gateway.
This project was created to learn more about serverless programming, Scala, ElasticSearch, GraphQL and other technologies. It seems that some frameworks are overkill for their usage in this project, but the goal was to use and implement them.
## Setup
A simple `sbt assembly` builds the application. You can test it with `sbt test`. Integration tests are covered later as they require additional setup.
### Deutsche Bahn Open Data
Since we use the API from Deutsche Bahn, we have to get an API key. The API itself is free and has almost no restrictions (except from rate limits) and requires only an email address and your name.
After registration get your API key in the `My Subscriptions` tab. I created a sandbox key - however a production key should work too. Next you have to subscribe to the [Timetables v1](https://developer.deutschebahn.com/store/apis/info?name=Timetables&version=v1&provider=DBOpenData&) API and you are good to go! It also contains the API documentation and provides an online API console to try it out!
### Required tools
* [sbt](https://www.scala-sbt.org/download.html)
* [aws-cli](https://aws.amazon.com/cli/)
* [serverless](https://serverless.com/) - If you want to deploy it on AWS
## Testing
Another goal of this project was to implement proper testing, especially integration tests. Integration tests are more challenging in a cloud and serverless environment, because you need a running cloud in order to test a lot of features. Some services are not locally available (e.g. API Gateway) or do not behave exactly like their cloud counterpart.
### Unit
Unit testing is done with [Scalatest](https://github.com/scalatest/scalatest) and is pretty straigt forward. Test all units that do not need access to external services. In case classes make use of them, we can either mock them or test them in the integration test phase.
### Integration
### Load test
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment