Anton Bachin a268400fce s/set_session/put_session
Part of #6.
2021-04-08 00:12:57 +03:00
2021-04-05 00:53:26 +03:00
2021-04-08 00:12:57 +03:00
2021-04-08 00:12:57 +03:00
2021-04-08 00:12:57 +03:00
2021-03-22 10:40:36 +03:00
2021-03-27 12:55:06 +03:00
2021-03-14 21:23:27 +03:00
2021-03-09 17:59:32 +03:00
2021-04-07 23:41:07 +03:00

Dream

Easy-to-use, feature-complete Web framework without boilerplate.




Dream is one flat module in one package, documented on one page, but with many examples. It offers:


Every part of the API is arranged to be easy to understand, use, and remember. Dream sticks to base OCaml types like string and list, introducing only a few types of its own — and some of those are just abbreviations for bare functions!

The neat interface is not a limitation. Everything is still configurable by a large number of optional arguments. Where necessary, Dream exposes the lower-level machinery that it is composed from. For example, the basic body and WebSocket readers return strings, but you can also do zero-copy streaming.

You can even run Dream as a quite bare abstraction over its underlying set of HTTP libraries, where it acts only as minimal glue code between their slightly different interfaces, and takes care of horridness like ALPN.


Getting started

TODO opam release, esy instructions, quick-start script.

opam install dream

Documentation

  • Tutorial — Threads together the first several examples of Dream, touching all the basic topics, including security. See the full list and start wherever you like, or begin at 1-hello, the Dream version of Hello, world!
  • Reason syntax — Several of the examples are available in Reason syntax, with more to come over time!
  • Examples — These cover various HTTP scenarios.
  • API reference

Contact

Apart from the issues, good places to discuss Dream are...

Highlight @antron to poke @aantron specifically.


Contributing

Dream uses several submodules, so be sure to clone with

git clone https://github.com/aantron/dream.git --recursive

Acknowledgements

Dream is based on work by the authors and contributors of its many dependencies and their transitive dependencies. There are, however, several influences that cannot be discovered directly:


Roadmap

1.0.0~alpha1:

  • Finish more of the examples, cross-link everything.
  • Correct the cipher rotation envelope scheme.
  • Quick start script.

Then:

  • Optimizations: router, logger, microparsers (form data, etc.), fully zero-allocation streaming.
  • WebSocket and stream backpressure.
  • HTTP3/QUIC.
  • Review JSON.
  • Review SQL prepared statements.
  • Switch to AEAD_AES_256_GCM_SIV for the cipher.
  • WebSocket streaming (frames).
  • Factor out internal sub-libraries to port Dream to MirageOS, etc.
  • Token rotation-based session management.
  • Lots of helpers for decoupling defaults, e.g. forms without CSRF checking, SQL sessions with a different database.
  • Bundle GraphiQL into a single HTML file that does not access any external CDN.
  • Maybe a logo.
  • i18n helper, URL templates.
  • Auth library.
  • Maybe REST helpers.
  • Maybe Async support.
  • Multicore.
  • Effects.
  • Proxy headers support.
  • Introspection.
  • Dependency reduction, especially system dependencies.
  • And lots, lots more.
Description
Tidy, feature-complete Web framework
Readme 8.8 MiB
Languages
OCaml 93.5%
CSS 1.6%
Shell 1.5%
Makefile 0.9%
Reason 0.8%
Other 1.7%