package sihl

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Sihl is a high-level web application framework providing a set of composable building blocks and recipes that allow you to develop web apps quickly and sustainably. Statically typed functional programming with OCaml makes web development fun and safe.

Things like database migrations, HTTP routing, user management, sessions, logging, emailing, job queues and schedules are just a few of the topics Sihl takes care of.

Let's have a look at a tiny Sihl app in a file called sihl.ml:

module Service = struct
  module WebServer = Sihl.Web.Server.Service.Opium
end

let hello_page =
  Sihl.Web.Route.get "/hello/" (fun _ ->
      Sihl.Web.Res.(html |> set_body "Hello!") |> Lwt.return)
;;

let endpoints = [ "/page", [ hello_page ], [] ]
let services = [ Service.WebServer.configure endpoints [ "PORT", "8080" ] ]
let () = Sihl.Core.App.(empty |> with_services services |> run)

Authentication

module Authn = Authn

Authorization

module Authz = Authz

Core

module Core = Core

Database

module Database = Database

Repository

module Repository = Repository

Migration

module Migration = Migration

Emailing

module Email = Email

Message

module Message = Message

Job Queue

module Queue = Queue

Random

module Random = Stdlib.Random

Scheduler

module Schedule = Schedule

Session

module Session = Session

Storage

module Storage = Storage

Token

module Token = Token

User Management

module User = User
module Password_reset = Password_reset

Utils & Helpers

module Utils = Utils

Http

module Http = Http
module Middleware = Middleware
OCaml

Innovation. Community. Security.