main: add flask REST app and tests