Scala Webapp Utilities
This library was initially extracted (with permission) from the closed-source ShipReq where it when through many evolutions, and was battled-tested on a real-world, large and complex project. It was ported without git commit history, so please understand that in this case, the low commit count is not an indication of immaturity.
val WebappUtilVer = "<version>"
"com.github.japgolly.webapp-util" %%% "protocol" % WebappUtilVer
"com.github.japgolly.webapp-util" %%% "protocol-test" % WebappUtilVer % Test
"com.github.japgolly.webapp-util" %%% "protocol-circe" % WebappUtilVer
"com.github.japgolly.webapp-util" %%% "protocol-circe-test" % WebappUtilVer % TestIncluded
-
The
protocolmodule:-
japgolly.webapputil.protocol.generalErrorMsg- typed error message, with some util and predefined casesEscapeUtil- functions for escaping stringsLazyVal- A lightweightlazy valas a portable valueProtocol- abstract definitions of protocolsServerSideProcInvoker- abstract and invokable representation of a server-side procedure (JS only)Url- types for URLs
-
japgolly.webapputil.protocol.ajaxAjaxProtocol- protocol for an AJAX endpointAjaxClient- means for a client to perform AJAX calls (JS only)
-
japgolly.webapputil.protocol.binaryBinaryData- immutable representation of BinaryDataBinaryJs- functions for conversion between various JS binary data types (JS only)
-
japgolly.webapputil.protocol.entrypointEntrypointDef- definition of a JS app entrypointEntrypoint- abstract class for a JS app entrypoint (JS only)EntrypointInvoker- generate JS to invoke an entrypoint (JVM only)Html- HTML content (JVM only)Js- JavaScript code (and some utilities) (JVM only)LoadJs- define a bundle of JS assets to be loaded vialoadjsbefore entrypoint invocation (JVM only)
-
japgolly.webapputil.protocol.httpHttpClient- an abstract HTTP (invocation) clientUrlEncoder- cross-platform URL encoding and decoding
-
-
The
protocol-testmodule:japgolly.webapputil.protocol.testBinaryTestUtil- utilities for testing binary dataTestAjaxClient- anAjaxClientinstance for use in tests (JS only)TestHttpClient- aHttpClientinstance for use in tests
-
The
protocol-circemodule:japgolly.webapputil.protocol.circeJsonAjaxClient- implementation ofAjaxClientthat uses JSON andJsonCodec(JS only)JsonCodec- composition of Circe'sEncoderandDecoderinto a single typeclassJsonEntrypointCodec- creates instances ofEntrypointDef.Codecusing Circe codecsJsonUtil- utilities to supplement Circe
-
The
protocol-circe-testmodule:japgolly.webapputil.protocol.circe.testJsonTestUtil- utilities to test JSON codecsTestJsonAjaxClient- implementation ofTestAjaxClientthat uses JSON andJsonCodec(JS only)
TODO:
- Add ScalaDoc and proper doc
- Port websocket stuff
- Port webstorage stuff
- Port SafePickler and related
Support
If you like what I do —my OSS libraries, my contributions to other OSS libs, my programming blog— and you'd like to support me, more content, more lib maintenance, please become a patron! I do all my OSS work unpaid so showing your support will make a big difference.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
