Note that even though Sihl is being used in production, the API is still under active development.
Sihl is a batteries-included web framework built on top of Opium, caqti, logs and many more. Thanks to the modular architecture, included batteries can be swapped easily. Statically typed functional programming with OCaml makes web development fun and safe.
The easiest way to get started is by using Spin.
To initialize opam:
To install Spin, following the instructions here. You can install it using opam:
opam install spin
Generate a start project:
spin new https://github.com/oxidizing/spin-sihl.git app
http://localhost:3000/ to use the demo to-do list app.
Check out the (adjusted) example project to see how the code looks like. We use that project for testing but the file structure gives you an idea of how a real world project might look like.
These are the main design goals of Sihl.
The overarching goal is to make web development fun. Fun is hard to quantify, so let's just say fun is maximized when frustration is minimized. This is what the other design goals are here for.
Sihl should provide high-level features that are common in web applications out-of-the-box. It should provide sane and ergonomic defaults for 80% of the use cases with powerful but not necessarily ergonomic customization options for the other 20%.
OCaml itself ensures a certain level of correctness at compile-time. In order to optimized developer experience, some things are not verified at compile-time but at start-time. Sihl makes sure that your app does not start without the needed configurations and the required environment.
These are some of things that Sihl can take care of for you.
Yes, because all other frameworks have not been invented here!
On a more serious note, originally we wanted to collect a set of services, libraries, best practices and architecture to quickly and sustainably spin-off our own tools and products. An evaluation of languages and tools lead us to build the 5th iteration of what became Sihl with OCaml. We believe OCaml is a phenomenal place to build web apps.
Thanks to OCaml Sihl is ...
The API documentation for the latest version can be found here: https://oxidizing.github.io/sihl/sihl/Sihl/index.html
Our main goal is to stabilize the service APIs, so updating Sihl in the future becomes easier. We would like to attract contributions for service contributions, once the framework reaches some level of maturity.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated. If you have any questions just contact us.
git checkout -b feature/amazing-feature)
git commit -m 'Add some amazing feature')
git push origin feature/amazing-feature)
Copyright (c) 2020 Oxidizing Systems
Distributed under the MIT License. See
LICENSE for more information.
Project Link: https://github.com/oxidizing/sihl