{"id":18055666,"url":"https://github.com/jackhowa/ai-react-ember","last_synced_at":"2025-10-08T15:51:26.841Z","repository":{"id":260370858,"uuid":"875757763","full_name":"JackHowa/ai-react-ember","owner":"JackHowa","description":"A React in Ember app that also shows how to do an incremental ai migration with Vertex AI","archived":false,"fork":false,"pushed_at":"2025-04-24T01:10:37.000Z","size":42,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-24T02:25:54.430Z","etag":null,"topics":["ai","ember","react"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=JPtng2eFAZc","language":"JavaScript","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/JackHowa.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-20T19:06:28.000Z","updated_at":"2025-04-24T01:10:42.000Z","dependencies_parsed_at":"2024-10-31T00:25:45.575Z","dependency_job_id":"bcca15e0-7de7-4023-aeaa-e521f7fd0405","html_url":"https://github.com/JackHowa/ai-react-ember","commit_stats":null,"previous_names":["jackhowa/ai-react-ember"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JackHowa/ai-react-ember","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fai-react-ember","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fai-react-ember/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fai-react-ember/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fai-react-ember/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JackHowa","download_url":"https://codeload.github.com/JackHowa/ai-react-ember/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JackHowa%2Fai-react-ember/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278972330,"owners_count":26078017,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","ember","react"],"created_at":"2024-10-31T01:11:03.250Z","updated_at":"2025-10-08T15:51:26.818Z","avatar_url":"https://github.com/JackHowa.png","language":"JavaScript","readme":"# React to Ember migration with Generative AI \n\n## Phase 1 \n\n- [x] Setup a working React in Ember app\n- [x] Ember components with only templates\n- [x] Run ai gemini script\n\n### Phase 2 \n\n- [x] Come up with a sample app. Docusign app with lots of markup might be good.\n- [x] Update title from super rental in package.json name and other places\n- [x] Generate loads of components with markdown\n- [x] Line up the existing scripts to run in sequence\n\n## Phase 3\n\n- [ ] Migrate component files as well as templates\n- [x] Migrate parent dom components\n\n## Commands \n\n1. `gcloud auth login`\n1. `export ACCESS_TOKEN=\"$(gcloud auth print-access-token)\"`\n1. `export PROJECT_ID=\"\"` -\u003e your project id from gcp\n1. `npm start`\n1. `npm run migrate:create-template-only-ember-components`\n1. `npm run migrate:find-potential-ember-components`\n1. `npm run migrate:call-ai-model`\n1. `npm run migrate:ember-components`\n\n### Commands explained \n\n#### `npm start`\n\nServes Ember.js with React components inside. Watches files and updates with file changes. \n\n#### `npm run migrate:create-template-only-ember-components`\n\nUses ASTs to look through all Ember.js components and their respective JavaScript files if available. Has a prettier post-migrate run to update changed hbs and scs files. Removes and migrates \"empty shell\" components that have `component.js` files and `template.hbs` files, but the component.js files aren't needed to describe the behavior with `template.hbs` components. `template.hbs` files are easier to migrate 1:1 with presentational React `jsx` files. \n\nThere's also functionality for migrating pod styles out of Ember components into global scss styles. \"Near empty\" components have classnames that are migrated out.\n\n```\nEmpty component files: 1\nNear empty ember component file count: 0\nFound pod styles count: 0\n```\n\n#### `npm run migrate:find-potential-ember-components`\n\nUses ASTs to find if the template has addons that can't be migrated yet. For instance, if there's a package that is still in use in other Ember components like a table library. \n\nThis writes to an array:\n\n```js\n const TEMPLATE_ONLY_EMBER_COMPONENTS_WITHOUT_EMBER_CHILDREN = [\n  'app/components/greeting/template.hbs',\n];\n```\n\nMigrating all Ember components would not only take a long time for the AI model. But it would also be too chaotic to review with a human. \n\nThere's a post-run call that runs prettier on this updated file.\n\n#### `npm run migrate:call-ai-model`\n\nCalls target Vertex AI model. Includes prompt engineering instructions. Also includes few-shot learning with example migrations. \n\nThis writes to a file to see the output. \n\n#### `npm run migrate:ember-components`\n\nUpdates the target output to the designated files. Deletes the Handlebar template file and replaces it with an `index.jsx` file. \n\nThe post-run script also runs lint fix and prettier to fix any standards that came up.\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhowa%2Fai-react-ember","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackhowa%2Fai-react-ember","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackhowa%2Fai-react-ember/lists"}