Chimney Star Watch Fork

Chimney is a library transforming an instance of one case class to another, when fields in both classes are very similar. If you have a case of:

  • event migration
  • distinction between API entities and internal entities (that are similar but not exaclty the same)
  • rewrite between Java Beans into case classes and vice versa
  • basically a lot of classes which are very similar except of few fields which were added/removed/renamed/changed that needs to be converted to-and-from
  • or when you want to patch some fields in one object using another object without a lot of manual work

Take a look at Chimney’s documentation.

Maven Central Javadocs License Join the chat at

Endpoints Elm Star Watch Fork

Elm code generator based on Scala endpoints library.

The project provides:

  • interpreter for all basic endpoints algebras that targets data structures that resemble elm type system
  • code emitter that takes these data structures and emits elm code containing:
    • elm type definitions
    • json encoders and decoders
    • initial value providers
    • url construction methods targeting elm-url
    • api client methods targeting elm-http-builder

See also project README.

Maven Central License

Endpoints Json Schemas Macros Star Watch Fork

Generic derivation based macros for JsonSchema type class of Scala endpoints library.

Endpoints have generic derivation of json schemas based on Shapeless library.

This project provides fully compatible, drop-in replacement that doesn’t use Shapeless, but Scala macros directly. This approach has several advantages:

  • immediate compilation-time performance improvements
  • more descriptive error messages
  • no runtime overhead as materialization to HList/Coproduct is not required
  • avoided runtime dependency on Shapeless

See also

Pulp Star Watch Fork

If passing arguments explicily is below you and runtime reflection fill you with distaste try out implicit-based dependency injection on steroids.

You can find details at Pulp’s documentation.

Maven Central Scala.js License

OCDQuery Star Watch Fork

Overly-Complicated Database Query takes a case class defined by you and turns it into:

  • config format for defining column-name-to-case-class-field mapping (with sane defaults)
  • creation object allowing you to pass only certain fields to INSERT while the others will use DEFAULTs
  • entity object fetched from database
  • update object that let you update only certain fields without writing whole object at once filters for select, update and delete queries

Basically, it creates a repository basing on your (higher-kinded) case class.

Additionally, repositories can be joined together to fetch tuples of objects.

All returned results are Doobie queries.

You can find details at OCDQuery’s documentation.

Maven Central License

Enumz Star Watch Fork

In Scala you might meet many different implementations of enums:

  • build-in scala.Enumeration,
  • sum-type based sealed hierarchies,
  • enumeratum as the previous one on steroids,
  • Java’s enum type which use static methods and has no companion object.

You are in control of what implementation you pick, but you have no control over what other people use. So if you had to use APIs using many different implementations how would you handle common code?

With a type class.

You can find details at Enumz’s documentation.

Maven Central Scala.js License

Catnip Star Watch Fork

If you love Kittens but you find automatic generation kind of heavy, and ideally you would like to have something that does semiauto derivation and puts it into companion object – Catnip is here to support you with @Semi macro annotation.

You can find details at Catnip’s documentation.

Maven Central Scala.js License