If you are mainly using OCaml and do not mind flakes, this was a very good starting point for me: https://github.com/brendanzab/ocaml-flake-example/blob/main/...
Using Flakes you can have a devShell, a check target and a build target neatly organized.