Welcome to the OASIS framework

A full-stack framework for Ocaml (pre-alpha)

Key Benefits

Share types across the stack seamlessly (Frontend ๐Ÿค Backend)

(* common.ml *)
type message_obj = {
  text: string
}
(* backend.ml *)
let message: message_obj = { text="hello" }

Dream.get "/fetch_message" (fun req -> 
  yojson_of_message_obj message 
  |> Yojson.Safe.to_string
  |> Dream.json
)
(* frontend.ml *)
type model = {
  message: message_obj
} 

let view model =
  div [] [
    h1 [] [text "Message from Backend"]
    p [] [text (model.message.text)]
  ]

Refactor with confidence (๐Ÿงจ๐Ÿ’ช)

let message: message_object = { text="hello"; id=1 }

(* Error: This record expression is expected to have type message_object
There is no field id within type message_object *)

Deploy with ease (๐Ÿš€)

$ dune build lib/webapp/webapp.js # generate js
$ dune build # create a webserver executable

Getting Started

Ready to get started? click here for instructions to install.
Or click here for a tutorial to teach you the basics of the Oasis framework.
Or view the guide for more general notes on key concepts.
Or click here to learn about the design philosophy behind the Oasis framework.

Features

Technology

Oasis framework is built with a number of really great technologies, the main ones are listed below: