The web application provides metrics for cycling and running (or for other kind of sports) activities. The statistics page compares yearly aggregated data, such as distance, hours ridden, elevation gained and shows year to date series as well. The yearly data is presented as a heatmap, so it is easy to compare the efforts for a given period of the year. Athletes' data feed is collected via the Strava API. It helps you find the best component prices via the product aggregator page.
Building the cycling platform provides a good opportunity to experiment and learn new technologies or languages in a
"live" environment.
The infrastructure is built following the "Infra as code" principle, the FE is written in React
, web gateway in Scala
with the Play Framework
exposing the contract with Swagger.
Services are communicating via http
with each other, exploring various languages and technologies:
- web-app with
Scala
andPlay Framework
,ZIO
- web-front with
React
- crawler-service with
Scala
,http4s
,cats-effect
,circe
(Typelevel stack) - exchange-rate-service with
Rust
(extracted in a separate repository) - data-provider with various database support
postgresql
,orientdb
,rethinkdb
, etc - data-search - with
zinc-search
a lightweight replacement for elasticsearch - user-service - with
Java
andSpring Boot
- weather-service - with
Kotlin
- health-check-service - with
Go
Visit the page at http://velocorner.com, I'd love to hear your feedback!
Follows the infrastructure as code approach.
Start local infrastructure and deploy the stack
Start database
# start and import database
./script/start_psql.sh
./script/import_psql.sh ~/Downloads/velo/velocorner/backup/psql-202008031826.sql.gz
# start web application
sbt -Xms512M -Xmx2048M -Xss1M -Dhttp.port=9001 -Dlogback.debug=true --add-opens java.base/jdk.internal.misc=ALL-UNNAMED \
"project web-app" run
Some useful plugins
sbt unusedCode
sbt "scalafix WarnUnusedCode"