YAME — Yet Another Miso Example

This Miso example is derived from the haskell-miso website source code, but adds dynamic retrieval of objects via a REST API.

Miso

Miso is a small, production-ready, component-oriented, reactive, isomorphic Haskell front-end framework for quickly building highly interactive single-page web and mobile applications. It features a virtual-dom, recursive diffing / patching algorithm, attribute and property normalization, event delegation, event batching, SVG, 2D/3D Canvas (WebGL), Server-sent events SSE, Websockets, type-safe servant -style routing and an extensible Subscription-based subsystem. Inspired by Elm and React. Miso is pure by default, but side effects can be introduced into the system via the Effect data type.

YAME

YAME example program for Miso reads objects from a real REST API which is ready to handle HTTP requests. Can be used for demo projects, testing, learning or even educating someone else. The REST API supports main HTTP methods such as GET, POST, PUT, DELETE and PATCH."

There are different build targets (Makefile):

  • wasm for the WASM target that will run in the browser
  • haskell for the Haskell target that will prerender
  • hls for Haskell Language Server (HLS support in editor)

To build and serve (for development):

  • make release to build everything and prerender.
  • make wasm to enter WASM dev and then make serve to serve the site.

To develop:

  • make hls to enter HLS context and then start e.g. emacs to edit the site.
  • make wasm to enter Haskell WASM dev and then make build.
  • make haskell to enter Haskell dev and then make prerender.

The project is on Codeberg: photonsphere/yame and is deployed here: yame.photonsphere.org.