{"id":15020295,"url":"https://github.com/ahoward2/zod-modfed","last_synced_at":"2025-04-12T12:44:27.773Z","repository":{"id":65189648,"uuid":"586088475","full_name":"ahoward2/zod-modfed","owner":"ahoward2","description":"Example application demonstrating remote module ts support and zod validation.","archived":false,"fork":false,"pushed_at":"2023-01-18T13:15:50.000Z","size":4010,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T21:38:02.033Z","etag":null,"topics":["module-federation","react","styled-components","zod"],"latest_commit_sha":null,"homepage":"https://www.delightfulengineering.com/blog/module-federation/typescript-and-zod","language":"TypeScript","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/ahoward2.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":"2023-01-06T23:01:11.000Z","updated_at":"2023-01-18T17:18:23.000Z","dependencies_parsed_at":"2023-02-10T15:15:55.679Z","dependency_job_id":null,"html_url":"https://github.com/ahoward2/zod-modfed","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/ahoward2%2Fzod-modfed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahoward2%2Fzod-modfed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahoward2%2Fzod-modfed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahoward2%2Fzod-modfed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahoward2","download_url":"https://codeload.github.com/ahoward2/zod-modfed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248570173,"owners_count":21126372,"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":["module-federation","react","styled-components","zod"],"created_at":"2024-09-24T19:54:52.554Z","updated_at":"2025-04-12T12:44:27.748Z","avatar_url":"https://github.com/ahoward2.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![featured image](/images/feature-image.png)\n\nThe main store app (host) dispatches DOM events. Cart is a separate application (remote) that has an event interface that can listen for events from host or other remotes.\n\n\u003e Goal: demonstrate a schema validation mechanism for remote module events. Remotes accept no props and instead rely entirely on window DOM events to ensure decoupling.\n\n- [x] Typescript support for remote modules\n- [x] Simple zod parsing of remote module events\n- [x] Lightweight events client with type safety from client -\u003e host \u0026 host -\u003e client with the [EventClient](https://github.com/rocket-science-core/core/blob/main/docs/event-client/overview.md).\n- [x] [FederatedTypesPlugin](https://github.com/module-federation/universe/tree/main/packages/typescript) with support for fetching types from remote cdn.\n- [x] Remote checkout `@ahowardtech/checkout` app published to npm and available on unpkg cdn.\n\n## Run the app\n\nThis works best when using two terminal windows.\n\n```bash\n# REMOTE\ncd checkout\n# install dependencies\nyarn install\n# run storybook\nyarn storybook\n# build and run local server hosting federated modules\nyarn build \u0026\u0026 yarn federate\n\n# HOST\ncd host-app\n# install dependencies\nyarn install\n# run app pointing to local server hosting remote federated modules\nyarn dev:local\n## run app pointing to unpkg cdn hosting remote federation modules\nyarn dev\n```\n\n![host app screenshot](/images/host-app.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahoward2%2Fzod-modfed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahoward2%2Fzod-modfed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahoward2%2Fzod-modfed/lists"}