front: A reactive frontend web framework

[ bsd3, library, web ] [ Propose Tags ]

A reactive frontend web framework. See for more details.

[Skip to Readme]


Automatic Flags

Builds front's examples


Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS],,,,,,,
Change log
Dependencies aeson, async, base (>=4.0 && <5), base-compat (>=0.9.1), base64-bytestring, blaze-html (>=0.9), blaze-markup (>=0.8), bytestring (>=0.10), cereal (>=0.5), conduit, cryptonite (>=0.14), data-default, directory, exceptions, fay (>=, fay-dom, fay-websockets, filepath, front, http-media, http-types (>=0.9), mtl, random, servant (>=0.5), servant-auth-cookie, servant-blaze (>=0.5), servant-server (>=0.5), stm, text (>=1.2), time, transformers (>=0.4), unordered-containers, wai (>=3.0), wai-websockets, warp (>=3.0), websockets, yesod-core, yesod-static, yesod-websockets [details]
License BSD-3-Clause
Author Andrey Prokopenko
Category Web
Home page
Source repo head: git clone
Uploaded by swamp_agr at 2020-05-01T16:19:07Z
Executables todo-yesod-example, todo-servant-example
Downloads 2230 total (34 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for front-

[back to package description]

front (work-in-progress)

A front-end web framework which aim is to bring the power of GHC on client side with as less JavaScript as possible by the Fay.

The goal is to have a tiny websockets-based bridge between client and server to propagate client events on server for further handling.


  • Server-side rendering.
  • both SPA and regular webapp (sharing state across multiple routes).
  • Several communication models (single session, broadcast, etc.).
  • Virtual DOM with full/partial rendering.
  • "blaze-html" like extended markup tree for handling both DOM and JS events.


  1. Add front as a dependency to your project using preferred build tool.
  2. Obtain bundle.js by

and include it as static resource in your application server.

  1. Import Shared module.
  2. Choose proper communication model (Only session, Broadcast, etc.).
  3. That's it.
  4. The only thing you need to keep in mind that one of records in your types should have name commandValue!


  • TODO

    • Installation with Stack (servant-auth-cookie should be fixed to allow build with cabal):
    stack install --flag="front:examples"


    cabal v2-build --flags examples
    • usage:
    cd examples/todo
    # for servant-based:
    # for yesod-based:
    # open web browser:
    open http://localhost:3000

Developer Installation (Contribution)

For server:

cabal new-build


stack build

For client: there is nothing special you need on client side. bundle.js already had everything included.

Please do not hesitate to open Issue to discuss your questions or use cases.


This ongoing framework would not have happened without these people and technologies:

  • @5HT for inspiration by N2O framework. The idea of transfer both data and events over websockets.
  • @jaspervdj for blaze-html.
  • @meiersi for blaze-react and the approach how to handle events in the same markup with html.
  • @snoyberg for yesod-fay and the way how to embed generated assert into server and to trigger dependent Fay compilation from Haskell code.
  • @bergmark for Fay compiler.