{"id":18132694,"url":"https://github.com/joojscript/phoenix_reactify","last_synced_at":"2025-04-16T05:57:58.915Z","repository":{"id":46505831,"uuid":"379419055","full_name":"joojscript/phoenix_reactify","owner":"joojscript","description":"Phoenix Reactify is an amazing mix task capable of adding a simple React implementation to your fresh phoenix projects.","archived":false,"fork":false,"pushed_at":"2021-10-06T19:49:50.000Z","size":1307,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T05:05:56.008Z","etag":null,"topics":["elixir","javascript","phoenix","react"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/phoenix_reactify","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joojscript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-22T22:47:48.000Z","updated_at":"2023-11-06T21:22:43.000Z","dependencies_parsed_at":"2022-07-19T21:58:46.567Z","dependency_job_id":null,"html_url":"https://github.com/joojscript/phoenix_reactify","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joojscript%2Fphoenix_reactify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joojscript%2Fphoenix_reactify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joojscript%2Fphoenix_reactify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joojscript%2Fphoenix_reactify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joojscript","download_url":"https://codeload.github.com/joojscript/phoenix_reactify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249205855,"owners_count":21230007,"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":["elixir","javascript","phoenix","react"],"created_at":"2024-11-01T13:05:18.944Z","updated_at":"2025-04-16T05:57:58.897Z","avatar_url":"https://github.com/joojscript.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/joojscript/phoenix_reactify/blob/master/.github/phoenix_reactify.png?raw=true\" /\u003e \u003cbr /\u003e\n  Phoenix Reactify\n\u003c/h1\u003e\n\n\u003ch1 align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/hexpm/v/phoenix_reactify?style=for-the-badge\" /\u003e\n  \u003cimg src=\"https://img.shields.io/hexpm/l/phoenix_reactify?style=for-the-badge\" /\u003e\n  \u003cimg src=\"https://img.shields.io/hexpm/dt/phoenix_reactify?style=for-the-badge\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/joojscript/phoenix_reactify?style=for-the-badge\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/stars/joojscript/phoenix_reactify?style=for-the-badge\" /\u003e\n\u003c/h1\u003e\n\n**Phoenix Reactify** is an amazing **mix task** capable of adding a simple React implementation to your fresh **phoenix projects**.\n\n⚠ **WARNING**: Currently, because of some webpack version related issues, this library its only compatible with **Phoenix 1.5.9+** or any other that have webpack ~4.5 as peer-dependency.\n\n### How does PhoenixReactify works?\n\nIt uses the amazing [remount](https://github.com/rstacruz/remount) library to make your entire SPA App into a html tag, so that you can use into your phoenix application's templates\n\n## Installation\n\nMy first idea was to release it as a mix archive, so that you could use it in any project, once installed, just like `mix phx.new` command. But since mix archives cannot bundle dependencies (and this project has), I had to release it in two different ways:\n\n- As a hex.pm package, that you can install like this, pasting this code into your **mix.exs** file:\n\n```elixir\ndef deps do\n  [\n    # other dependencies\n    {:phoenix_reactify, \"~\u003e 0.0.5\"}\n  ]\nend\n```\n\nFeel free to remove it from the dependencies once you've set up your project 😄\n\n- Or, at every release I put a binary-compiled file altogether, you can download it [directly from the releases page](https://github.com/joojscript/phoenix_reactify/releases), and then, run it inside your fresh phoenix project.\n\n```bash\n$ ./phoenix_reactify\n```\n\n## Usage\n\nAt this moment, Phoenix Reactify supports these options:\n\n- -p, --project: Specifies the React project name (Default to SPA).\n- -v, --verbose: Ensures verbose output.\n- -t, --typescript: Enables Typescript support.\n- --npm-force-install: Uses the **force** keyword on npm installations.\n\n```sh\nmix phx.reactify --typescript --project \u003cPROJECT-NAME\u003e --verbose\n```\n\nBy default, the library already puts the first entrypoint tag to the default elixir first page template (lib/\\\u003cproject-name\u003e\\_web/templates/page/index.html.eex). But you can always create new tags and even multiple SPAs! If you want this kind of behaviour, please refer to [Advanced Usage](https://github.com/joojscript/phoenix_reactify/blob/master/ADVANCED_USAGE.md)\n\nWith your default first tag set, just fire up localhost:4000 (default phoenix server port), and you should see that, if everything gone well:\n\n![PhoenixReactfyMainScreen](https://github.com/joojscript/phoenix_reactify/blob/master/.github/mainscreen.png?raw=true)\n\n⚠ **WARNING**: be careful with route conflicts between the applications\n\n## ToDo\n\n- 🕐 Automatic route mapping (probably via macros or something like that).\n- 🕐 Bundle dependencies together to distribute as mix archive.\n- ✅ Typescript support (deppends on babel).\n- ✅ Auto-Inject first generated tag (not trully necessary, but I think it would be more user-friendly).\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoojscript%2Fphoenix_reactify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoojscript%2Fphoenix_reactify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoojscript%2Fphoenix_reactify/lists"}