Scala hands on training project. Looking to introduce new team members or anyone interested to the scala programming language and the way it's used within the ArkonData team.
You'll implement a web server exposing a GraphQL API to expose business retrieved from the INEGI's API and query them based on their location.
-
Referential transparency.
-
Immutability.
-
Recursion (FP).
-
Basic concurrency using Scala's Future.
-
Functor/Mondad (FP through cats).
-
The real world/side effects using the IO Monad.
-
Testing
- cats: Library for FP.
- cats-effect: IO Monad in Scala.
- FS2: Functional streams.
- Doobie: Functional layer for JDBC.
- Sangria: Scala library for GraphQL.
- ScalaTest: Scala testing library.
- ScalaCheck: Library for random testing of program properties inspired by QuickCheck.
- http4s: Library fot HTTP
SBT console
$ sbt
Running sbt commands inside the SBT console
// sbt console
$ sbt
// Scala REPL
$ sbt console
// Compile the main module
sbt:arkon-scalatraining> compile
// Compile the test module
sbt:arkon-scalatraining> test:compile
// Run all tests
sbt:arkon-scalatraining> test
// Run a specific test
sbt:arkon-scalatraining> testOnly training.std.OptionSpec
Implement a GraphQL API based on the given schema to expose the saved business and
query them based on their location. The database to be used should be PostgreSQL with the
PostGIS exitension to power the georeferenced queries. To fill the database you'll have
to implement a web scrapper to retrieve data from the INEGI's DENUE API
and execute the createShop
mutation defined on the implemented API.
The implemented API should comply the following rules:
- On the
createShop
mutation- The
activity
,stratum
andshopType
fields should search for existing records on theActivity
,Stratum
andShopType
tables and insert only if there is no previous record.
- The