{"id":21409896,"url":"https://github.com/stackbuilders/compose-2019","last_synced_at":"2026-01-10T04:32:50.039Z","repository":{"id":73912590,"uuid":"191606211","full_name":"stackbuilders/compose-2019","owner":"stackbuilders","description":"Compose 2019 Conference Example","archived":false,"fork":false,"pushed_at":"2019-06-25T15:57:07.000Z","size":181,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T21:51:31.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackbuilders.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-12T16:18:27.000Z","updated_at":"2022-02-06T01:20:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c3d8ab1-9d72-4be8-beaa-75ca2f9c55f7","html_url":"https://github.com/stackbuilders/compose-2019","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stackbuilders/compose-2019","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fcompose-2019","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fcompose-2019/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fcompose-2019/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fcompose-2019/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackbuilders","download_url":"https://codeload.github.com/stackbuilders/compose-2019/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbuilders%2Fcompose-2019/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265233753,"owners_count":23731825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T17:35:00.429Z","updated_at":"2026-01-10T04:32:50.011Z","avatar_url":"https://github.com/stackbuilders.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Haskell + ReasonML Example\n\n## Requirements\n\n- Install [haskell-stack](https://docs.haskellstack.org/en/stable/README/#how-to-install).\n- Install [yarn](https://yarnpkg.com/en/)\n\n## Getting Started\n\nClone this repository\n\n```\ngit clone git@github.com:stackbuilders/compose-2019.git\n```\n\nYou'll find four different projects in the repository root:\n\n- `blog-types`: Haskell type definitions for our simple blog implementation\n- `blog-server`: Simple [servant](https://www.servant.dev/) API that works as a\n  backend for our blog\n- `genetate-ocaml-types`: Executable that generates OCaml types based on our Haskell\n  types defined in `blog-types`\n- `blog-frontend`: The front end side of our blog written in [ReasonML](https://reasonml.github.io/)\n\nIn order to build everything, just do\n\n```\nstack build\n```\n\nfrom the repo root folder.\n\n### Run the backend\n\n```\nstack exec blog-server-exe\n```\n\nNow the server should be up and running in http://localhost:8080\nYou can test the server is running with the following endpoint: http://localhost:8080/articles. \nIt should return a json with all the articles in the default database.\n\n### Generate front-end types\n\nBefore running the front-end server, we have to generate the OCaml types and the\nserialization tests. This project uses the [ocaml-export](https://github.com/plow-technologies/ocaml-export)\nlibrary to make the Ocaml types. Run the following command:\n\n```\nstack exec generate-ocaml-types-exe\n```\n\nYou will find the OCaml type definitions in the `blog-frontend/src/Exported` folder,\nand the serialization tests in `blog-frontend/__test__/Exported`\n\n### Start up the frontend\n\nThis is a [ReasonReact](https://reasonml.github.io/reason-react/) project that uses\nthe API we builded before with the exact same types.\n\n```\ncd blog-frontend\nyarn install\nyarn build\nyarn test  # These are the serialization tests that make sure our types match\nyarn start # starts the dev server\n```\n\nAnd that's it. Now you should have a frontend in http://localhost:3000.\n\n**Happy hacking!**\n\n## Contribute\n\nFile an issue or make a PR in https://github.com/plow-technologies/ocaml-export, your contribution is welcomed!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbuilders%2Fcompose-2019","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackbuilders%2Fcompose-2019","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbuilders%2Fcompose-2019/lists"}