Bondi Beach: A world-famous beach in Sydney known for its golden sands, surf-friendly waves, vibrant beach culture, and the iconic Bondi Icebergs swimming club.
I have a deep passion for Scala and Functional Programming, although my professional work predominantly involves JavaScript and TypeScript on Node.js.
To bridge this gap, I initiated this project to handle various one-time or recurring tasks. More importantly, this project serves as a platform for me to learn and practice Scala 3, delve into Functional Programming with libraries like Cats and ZIO, and explore other Scala libraries.
Topics:
- Scala 3
- Skunk: a functional PostgreSQL client for Scala.
- PureConfig: a Scala library for loading configuration files.
- PostgreSQL: a powerful, open source object-relational database system.
- cats: a library that provides abstractions for functional programming in Scala.
- cats-effect: a library that provides abstractions for effectful programming in Scala.
- circe: a JSON library for Scala.
Run:
auto/dev io.daniel.apps.RefundApp
auto/prod io.daniel.apps.RefundApp
Read a CSV file, then send emails using AWS SES client.
How to run the application:
- changeAwsProfileToProd
- change the
paymentType
toPIF
orDD
- put the corresponding csv file in the
src/main/resources
folder, file name should bepif_club_transfer.json
ordd_club_transfer.json
- run the application: auto/prod io.daniel.apps.ClubTransfer
- can test by changing #185 to
toDaniel
email
Run:
auto/dev io.daniel.apps.ClubTransfer
auto/prod io.daniel.apps.ClubTransfer
Read a plain text file with emails, query and update Dynamodb data using AWS SDK.
auto/dev io.daniel.apps.FixDuplicateEmails
auto/prod io.daniel.apps.FixDuplicateEmails
Start the local PostgreSQL database using Docker:
docker compose up
- Setting the mainClass in
build.sbt
Compile / mainClass := Some("io.daniel.Main") Compile / mainClass := Some("io.daniel.apps.RefundApp")
- Using the
run
task with the--main
optionsbt "runMain io.daniel.apps.FixDuplicateEmails"
Secrets Manager can't find the specified secret. (Service: SecretsManager, Status Code: 400, Request ID: aab88d0e-ca3b-461a-8a6f-21371846fc63)
Options:
- Option 1: add environment variable
AWS_PROFILE=prod
to Intellij Idea Run/Debug configuration. - Option 2: run on the command line:
AWS_PROFILE=prod auto/prod io.daniel.apps.ClubTransfer