{"id":25939329,"url":"https://github.com/axinom/mosaic-frontend-samples","last_synced_at":"2025-10-10T00:02:54.442Z","repository":{"id":51677947,"uuid":"518728433","full_name":"Axinom/mosaic-frontend-samples","owner":"Axinom","description":"Collection of scenarios demonstrating how client applications can interact with the services provided by Axinom Mosaic.","archived":false,"fork":false,"pushed_at":"2025-07-22T12:25:03.000Z","size":3331,"stargazers_count":16,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-30T09:44:11.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://portal.axinom.com","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/Axinom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-07-28T06:31:14.000Z","updated_at":"2025-07-09T07:31:11.000Z","dependencies_parsed_at":"2024-04-08T10:24:45.365Z","dependency_job_id":"7b8cb419-7fa4-4ad1-983e-b74acd0365c5","html_url":"https://github.com/Axinom/mosaic-frontend-samples","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/Axinom/mosaic-frontend-samples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axinom%2Fmosaic-frontend-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axinom%2Fmosaic-frontend-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axinom%2Fmosaic-frontend-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axinom%2Fmosaic-frontend-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Axinom","download_url":"https://codeload.github.com/Axinom/mosaic-frontend-samples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Axinom%2Fmosaic-frontend-samples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002356,"owners_count":26083353,"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-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2025-03-04T04:16:40.113Z","updated_at":"2025-10-10T00:02:54.413Z","avatar_url":"https://github.com/Axinom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mosaic Frontend Samples\n\nThis React application contains code examples that cover how to use Mosaic\nservices to achieve certain scenarios.\n\nEach scenario is developed to be a concise example that showcases the use-case\n(i.e. the scenario) and what code is responsible to achieve it. This will act as\ndeveloper documentation for frontend application developers who would be\ninterested to develop against Mosaic services.\n\n## Project Structure\n\nThe scenarios are grouped into areas to be easily discoverable:\n\n- user-authentication\n  - SignInWithExternalIdp\n  - ShowUserInfo\n- user-profile-management\n  - CreateProfile\n  - SwitchActiveProfile\n- catalog-consumption\n  - GetSingleItem\n- video-playback\n  - PlayProtectedVideo\n- etc.\n\nThe `scenario-registry.ts` found in the root of the project maintains an array\nof all scenarios that will be loaded into the application, and this array is fed\ninto the `ScenarioHostApp` in the `index.tsx` file.\n\n## ScenarioHost Features\n\nThe ScenarioHost exposes several commonly used features that maybe required by\neach scenario.\n\nSuch as:\n\n- activeProfile\n  - Through this object, the individual scenario can access different Endpoint\n    URLs of the Mosaic services, and different IDs (i.e. `tenant_id`,\n    `environment_id`) that are configured by the user.\n- logger\n  - Through the logger each scenario can print some output to the Logger\n    component that will provide meaningful feedback to the user.\n- setVariable, getVariable\n  - These methods will allow scenarios to share variables between different\n    scenarios (i.e. user-access-token is set by scenario-A, and it is later\n    accessed by scenario-B). The\n    `./src/common/types/well-known-variable-keys.ts` file will list all\n    well-known variables that can be shared between scenarios.\n\n## Additional Notes\n\nThe `semantic-ui-react` library is used as the UI Component library when\ndeveloping the scenarios. In real-world applications, the appropriate UI\nlibraries shall be used.\n\n# Running the Project\n\n- Run `yarn` to install dependencies\n- Copy `.env.template` into `.env`, and change the values if needed\n- Run `yarn dev` to start running the project in watch mode\n- Run `yarn util:start-proxy` to start a `localhost` proxy to the\n  `Mosaic User Service` upstream\n  - Ensure to set/update the URL for `User Auth Base URL` in your\n    `Mosaic Frontend Samples` profile to use the proxy endpoint for requests\n\n# Building for Production\n\n- Run `yarn build` to generate the `build` folder\n- Use the `Dockerfile` in the root to build a docker image\n  - `docker build -t mosaic-fe-samples .`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxinom%2Fmosaic-frontend-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxinom%2Fmosaic-frontend-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxinom%2Fmosaic-frontend-samples/lists"}