{"id":13653364,"url":"https://github.com/Sitecore/feaas-nextjs-example","last_synced_at":"2025-04-23T06:31:38.925Z","repository":{"id":188654679,"uuid":"679140129","full_name":"Sitecore/feaas-nextjs-example","owner":"Sitecore","description":"An example repository to showcase best practices on using feaas components in a nextjs app","archived":false,"fork":false,"pushed_at":"2023-10-19T07:42:08.000Z","size":53,"stargazers_count":3,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-25T00:11:11.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Sitecore.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":"2023-08-16T07:23:43.000Z","updated_at":"2024-08-02T02:09:21.171Z","dependencies_parsed_at":null,"dependency_job_id":"d2b92480-5992-4313-b22d-997cae83af01","html_url":"https://github.com/Sitecore/feaas-nextjs-example","commit_stats":null,"previous_names":["sitecore/feaas-nextjs-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sitecore%2Ffeaas-nextjs-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sitecore%2Ffeaas-nextjs-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sitecore%2Ffeaas-nextjs-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sitecore%2Ffeaas-nextjs-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sitecore","download_url":"https://codeload.github.com/Sitecore/feaas-nextjs-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250385058,"owners_count":21421840,"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-08-02T02:01:09.321Z","updated_at":"2025-04-23T06:31:33.906Z","avatar_url":"https://github.com/Sitecore.png","language":"TypeScript","readme":"This is a repo that demonstrates an example of BYOC components using best practices.\n\n## Getting Started\n\n1. To run the NextJS server just execute the following command:\n\n   ```bash\n   npm run dev\n   ```\n\n2. Then visit demo page in the browser:\n\n   [http://localhost:3000](http://localhost:3000)\n\n## Enabling BYOC in your existing app\n\n### XMC JSS app:\n\nIf your app uses JSS (for xmc next.js), BYOC will be already pre-configured upon the app generation. Simply add the components you want in `byoc/index.client.tsx` and `index.server.tsx`. Be mindful that at the time being, **jss does not support async components**\n\n### Regular Next.js app\n\n1.  Copy `byoc` folder from this repo to your `app` directory\n2.  In `layout.tsx` add to the top of the file:\n\n    ```typescript:\n            import * as FEAAS from \"@sitecore-feaas/clientside/react\";\n            import \"./byoc\";\n    ```\n\n    And inside the layout tree itself:\n\n    ```typescript:\n    \u003cFEAAS.ExternalComponentBundle /\u003e\n    ```\n\n3.  Render the component directly or as a part of FEAAS component as in `demo/page.tsx`\n\n## Integrating Rendering Host for Sitecore Components\n\n1. Copy `preview-component` folder into your `app`\n2. In Sitecore Components app, go to Settings/Rendering Host and put in the url to that page, e.g. `https://my-website.com/preview-component`\n3. Now in the component Builder you will be able to use BYOC components and use Preview feature to see what they look like inside Sitecore components.\n","funding_links":[],"categories":["XM Cloud"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSitecore%2Ffeaas-nextjs-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSitecore%2Ffeaas-nextjs-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSitecore%2Ffeaas-nextjs-example/lists"}