package dream

  1. Overview
  2. No Docs
Tidy, feature-complete Web framework

Install

Dune Dependency

Authors

Maintainers

Sources

dream-1.0.0-alpha6.tar.gz
sha256=8d3b6344c0e175aca628b3d5bb8ee58265e8c1074fc2d40d63f136fef83daf90

Description

Dream is a feature-complete Web framework with a simple programming model and no boilerplate. It provides only two data types, request and response.

Almost everything else is either a built-in OCaml type, or an abbreviation for a bare function. For example, a Web app, known in Dream as a handler, is just an ordinary function from requests to responses. And a middleware is then just a function from handlers to handlers.

Within this model, Dream adds:

  • Session management with pluggable back ends.
  • A fully composable router.
  • Support for HTTP/1.1, HTTP/2, and HTTPS.
  • WebSockets.
  • GraphQL, including subscriptions and a built-in GraphiQL editor.
  • SQL connection pool helpers.
  • Server-side HTML templates.
  • Automatic secure handling of cookies and forms.
  • Unified, internationalization-friendly error handling.
  • A neat log, and OCaml runtime configuration.
  • Helpers for Web formats, such as Base64url, and a modern cipher.

Because of the simple programming model, everything is optional and composable. It is trivailly possible to strip Dream down to just a bare driver of the various HTTP protocols.

Dream is presented as a single module, whose API is documented on one page. In addition, Dream comes with a large number of examples. Security topics are introduced throughout, wherever they are applicable.

Dependencies (33)

  1. yojson
  2. uri >= "4.2.0"
  3. ssl >= "0.5.8"
  4. ptime >= "0.8.1"
  5. ocaml >= "4.08.0"
  6. multipart_form-lwt
  7. multipart_form >= "0.4.0"
  8. mirage-crypto-rng-lwt < "1.0.0"
  9. mirage-crypto-rng < "1.0.0"
  10. mirage-crypto >= "0.8.1" & < "1.0.0"
  11. mirage-clock >= "3.0.0"
  12. markup >= "1.0.2"
  13. magic-mime
  14. logs >= "0.5.0"
  15. lwt_ssl
  16. lwt_ppx >= "1.2.2"
  17. lwt
  18. lambdasoup >= "0.6.1"
  19. graphql-lwt
  20. graphql_parser
  21. fmt >= "0.8.7"
  22. dune >= "2.7.0"
  23. dream-pure >= "1.0.0~alpha2"
  24. dream-httpaf >= "1.0.0~alpha2"
  25. digestif >= "0.7"
  26. cstruct >= "6.0.0"
  27. ocaml os = "win32"
  28. conf-libev os != "win32"
  29. caqti-lwt >= "2.0.0"
  30. caqti >= "2.0.0"
  31. camlp-streams
  32. bigarray-compat
  33. base-unix

Dev Dependencies (11)

  1. tyxml with-test & >= "4.5.0"
  2. reason with-test
  3. ppx_yojson_conv with-test
  4. ppx_expect with-test & >= "v0.15.0"
  5. js_of_ocaml-ppx with-test
  6. js_of_ocaml with-test
  7. crunch with-test
  8. caqti-driver-sqlite3 with-test
  9. caqti-driver-postgresql with-test
  10. bisect_ppx with-test & >= "2.5.0"
  11. alcotest with-test

Conflicts

None

OCaml

Innovation. Community. Security.