# \[ANN\] Tapak: Experimental Web Framework Based on EIO

**URL:** <https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507>\
**Category:** Ecosystem\
**Tags:** web, announce\
**Created:** [November 19, 2025, 1:32pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507 "2025-11-19T13:32:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![syaiful6](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/syaiful6/32/6257_2.png) [@syaiful6](https://discuss.ocaml.org/u/syaiful6)\
**Post date:** [November 19, 2025, 1:32pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/1 "2025-11-19T13:32:59Z")

</div>

Hello! I am a newcomer to the OCaml community, and this is my first post.

I would like to share an experimental web framework I have been working on, based on Eio. I am a happy user of Dream and Opium, but I felt there was still room for improvement.

I’ve shared my motivation here: [Tapak | Syaiful Bahri](https://www.sbahri.com/projects/tapak/)

I would love to hear your suggestions and opinions regarding the API. What important features do you feel are missing in existing libraries? Personally, I miss the type-safe routing that Servant offers, as well as the Phoenix real-time API.

---

<div class="post-metadata">

**Author:** ![EmileTrotignon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/emiletrotignon/32/5913_2.png) [@EmileTrotignon](https://discuss.ocaml.org/u/EmileTrotignon)\
**Post date:** [November 19, 2025, 2:33pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/2 "2025-11-19T14:33:31Z")

</div>

Do you know about [ocsigen](https://ocsigen.org/home/intro.html) ?

Its the ocaml web framework with the most features that I know. It has not only type safe routing, but type safe http requests.

That is, you can mark a function as being an endpoint of sorts, and then when this function is called from the frontend, the http request for it is generated, and the function actually runs on the backend.

---

<div class="post-metadata">

**Author:** ![syaiful6](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/syaiful6/32/6257_2.png) [@syaiful6](https://discuss.ocaml.org/u/syaiful6)\
**Post date:** [November 19, 2025, 2:58pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/3 "2025-11-19T14:58:06Z")

</div>

I believe you are referring to Ocsigen Eliom. I did look into it, but it is built on Lwt, and I was specifically interested in a framework that does not use Lwt and use algebraic effects instead. This is not due to any dislike for Lwt, but rather my desire to explore what an OCaml web framework built with Eio and algebraic effects might look like.

Eliom’s server-client capabilities are interesting, but they are incompatible with our existing tooling. Our teams prefer using Melange with React.js (via `reason-react`) for the frontend and `server-reason-react` for the backend

---

<div class="post-metadata">

**Author:** ![EmileTrotignon](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/emiletrotignon/32/5913_2.png) [@EmileTrotignon](https://discuss.ocaml.org/u/EmileTrotignon)\
**Post date:** [November 19, 2025, 3:15pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/4 "2025-11-19T15:15:59Z")

</div>

Yes, ocsigen/eliom is opiniated, and you have to kind of opt in everything to get the benefits.

However, even if you can’t use it, looking at it to get inspiration for features for your framework is certainly worth it.

I am not a big fan of melange, because of how much more complicated it is to use random libs from opam compared to jsoo. My understanding is that it makes a lot of sense if you have an existing JS codebase or if you want to use JS tooling.

Btw, your type safe routes are something very nice. Did you get inspiration from [furl](https://github.com/drup/furl) ?

I think your api looks nicer, but the idea is the same.

---

<div class="post-metadata">

**Author:** ![dinosaure](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dinosaure/32/16_2.png) [@dinosaure](https://discuss.ocaml.org/u/dinosaure)\
**Post date:** [November 19, 2025, 3:29pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/5 "2025-11-19T15:29:55Z")

</div>

> [@EmileTrotignon](#):
>
> Btw, your type safe routes are something very nice. Did you get inspiration from [furl](https://github.com/drup/furl) ?

This is currently what we offer through our [Vif](https://github.com/robur-coop/vif) framework. The latter also uses algebraic effects and [Miou](https://github.com/robur-coop/miou) as a scheduler (you can find more details [here](https://discuss.ocaml.org/t/ann-httpcats-ocaml-h1-vif-hurl-a-webstack-for-ocaml-5/17104)). We have wanted typed routes for a very long time. `vif` goes a little further than `furl` because it also attempts to type the content of a request (and recognises whether this content is JSON or `multipart/form-data`, which allows for typed forms). There is a tutorial available [here](https://robur-coop.github.io/vif/) and an example of a chat room (with websockets) [here](https://github.com/robur-coop/vif/tree/master/examples/with-dune).

---

<div class="post-metadata">

**Author:** ![syaiful6](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/syaiful6/32/6257_2.png) [@syaiful6](https://discuss.ocaml.org/u/syaiful6)\
**Post date:** [November 19, 2025, 3:35pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/6 "2025-11-19T15:35:30Z")

</div>

The router is inspirred by [GitHub - anuragsoni/routes: typed bidirectional router for OCaml/ReasonML web applications](https://github.com/anuragsoni/routes), I tried to use this library first, but I wanted a custom solution for “Request Guard” which is kind like a middleware/filter but allow the validated data goes directly to request handler.

I was first modeled it as Servant way, where we accumulate the parameter in list, but it was too complicated. 🤣

---

<div class="post-metadata">

**Author:** ![syaiful6](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/syaiful6/32/6257_2.png) [@syaiful6](https://discuss.ocaml.org/u/syaiful6)\
**Post date:** [November 19, 2025, 3:50pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/7 "2025-11-19T15:50:04Z")

</div>

This is the closest library/framework we wanted. Unfortunately, I didn’t know it until someone mention it in my tweet. 😃

Anyway, Vif is looking nice. If I knew it, I won’t write a new library at all. But I learning new things along the way.

---

<div class="post-metadata">

**Author:** ![davesnx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/davesnx/32/2949_2.png) [@davesnx](https://discuss.ocaml.org/u/davesnx)\
**Post date:** [November 20, 2025, 3:11pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/8 "2025-11-20T15:11:53Z")

</div>

Great work @syaiful6. Looking forward on where you reach with Tapak 😃

---

<div class="post-metadata">

**Author:** ![Vincent\_Balat](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/vincent_balat/32/2191_2.png) [@Vincent\_Balat](https://discuss.ocaml.org/u/Vincent_Balat)\
**Post date:** [November 21, 2025, 1:18pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/9 "2025-11-21T13:18:56Z")

</div>

There is now a (very experimental) version of Eliom (and Js\_of\_ocaml/Ocsipersist/Server/Toolkit/Start) using Eio instead of Lwt: [WIP: Transition to eio (version with Eliom\_stream) by balat · Pull Request #846 · ocsigen/eliom · GitHub](https://github.com/ocsigen/eliom/pull/846)

---

<div class="post-metadata">

**Author:** ![syaiful6](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/syaiful6/32/6257_2.png) [@syaiful6](https://discuss.ocaml.org/u/syaiful6)\
**Post date:** [November 21, 2025, 2:55pm UTC](https://discuss.ocaml.org/t/ann-tapak-experimental-web-framework-based-on-eio/17507/10 "2025-11-21T14:55:39Z")

</div>

nice! hope it merged soon. 😉
