{"id":13726710,"url":"https://github.com/yawaramin/fullstack-reason","last_synced_at":"2025-05-07T22:30:29.143Z","repository":{"id":147930423,"uuid":"232471715","full_name":"yawaramin/fullstack-reason","owner":"yawaramin","description":"A demo project that shows a fullstack ReasonML/OCaml app–native binary + webapp","archived":true,"fork":false,"pushed_at":"2023-08-03T06:24:51.000Z","size":611,"stargazers_count":164,"open_issues_count":3,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-04T23:13:47.608Z","etag":null,"topics":["bucklescript","ocaml","reason-react","reasonml"],"latest_commit_sha":null,"homepage":"","language":"Reason","has_issues":false,"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/yawaramin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-01-08T03:43:59.000Z","updated_at":"2024-06-04T21:29:48.000Z","dependencies_parsed_at":"2024-01-06T07:44:07.518Z","dependency_job_id":"471e9ab3-c1ec-4632-82e8-5c68b88e032c","html_url":"https://github.com/yawaramin/fullstack-reason","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yawaramin%2Ffullstack-reason","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yawaramin%2Ffullstack-reason/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yawaramin%2Ffullstack-reason/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yawaramin%2Ffullstack-reason/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yawaramin","download_url":"https://codeload.github.com/yawaramin/fullstack-reason/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965069,"owners_count":21832817,"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":["bucklescript","ocaml","reason-react","reasonml"],"created_at":"2024-08-03T01:03:17.338Z","updated_at":"2025-05-07T22:30:28.399Z","avatar_url":"https://github.com/yawaramin.png","language":"Reason","funding_links":[],"categories":["Reason"],"sub_categories":[],"readme":"## Fullstack Reason Demo\n\nThis project shows a minimal fullstack\n[ReasonML](https://reasonml.github.io/) application. It has a\n\n- Backend web server that compiles to a native binary using the Esy/dune\n  compilation toolchain\n- Frontend ReasonReact component that compiles to JavaScript using the\n  BuckleScript toolchain\n- Shared business logic used by both of the above\n\nThis is a proof-of-concept; you can customize it to your needs.\n\n## Try it out\n\n### Development mode\n\nFollow these steps:\n\n1. Install [NodeJS](https://nodejs.org/en/) (one-time setup)\n1. Install Esy (one-time setup): `npm install --global esy@latest`\n1. Set up the backend project: `esy install` (one-time setup but will\n   take a while to compile dependencies like SSL so grab your favourite\n   beverage)\n1. Run `npm install` (or use [pnpm](https://pnpm.js.org/) to save some\n   disk space)\n1. Run the services defined in `Procfile` either manually on different\n   terminals, or using a process manager like Foreman/Overmind/Hivemind\n1. Browse the frontend: http://localhost:5200/\n\n### Production mode\n\nYou can also try out the app without the Webpack dev server:\n\n1. Assuming the above builds have already been done\n1. Put production assets in the `dist` directory: `npm run dist`\n1. Run the backend app: `esy b dune exec backend/App.exe`\n1. Browse the frontend (note, different port than above, this is being\n   served directly from the backend app): http://localhost:8080/\n\nCorrectly caches the JS bundle–with cache busting!\n\n## How it works\n\nThis project pulls together:\n\n- A working setup of the [ReWeb](https://github.com/yawaramin/re-web/)\n  Reason/OCaml native web framework\n- A [ReasonReact](https://reasonml.github.io/reason-react/) frontend app,\n  using the [BuckleScript](https://bucklescript.github.io/) OCaml-to-JS\n  compiler\n\n## Project layout\n\nThese are the significant parts of the project:\n\n- `backend/`: contains the sources for the backend executable\n- `esy.lock/`: a lock directory used by Esy to capture precise dependency\n  information\n- `frontend/`: contains the sources for the frontend ReasonReact app\n- `shared/`: contains sources shared between the backend and frontend\n- `bsconfig.json`: BuckleScript project configuration\n- `dune-project`: [Dune](https://dune.build/) project configuration (for\n  the native build)\n- `esy.json`: Esy project configuration (native package management)\n- `fullstack-reason.opam`: [OPAM](http://opam.ocaml.org/) project\n  configuration (empty but needed for backward-compatibility with OPAM)\n- `package.json`: [Npm](https://www.npmjs.com/) project configuration\n- `webpack.config.js`: [Webpack](https://webpack.js.org/) bundler\n  configuration for the frontend\n\nHonourable mention: build outputs are in the `.gitignore`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyawaramin%2Ffullstack-reason","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyawaramin%2Ffullstack-reason","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyawaramin%2Ffullstack-reason/lists"}