{"id":22440041,"url":"https://github.com/holochain-open-dev/membrane-roles","last_synced_at":"2026-02-17T07:39:42.562Z","repository":{"id":38330215,"uuid":"312835567","full_name":"holochain-open-dev/membrane-roles","owner":"holochain-open-dev","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-17T01:43:17.000Z","size":14886,"stargazers_count":2,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-15T03:15:48.276Z","etag":null,"topics":["module","zome"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/holochain-open-dev.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}},"created_at":"2020-11-14T14:42:02.000Z","updated_at":"2022-01-28T11:43:22.000Z","dependencies_parsed_at":"2022-08-25T03:53:36.486Z","dependency_job_id":null,"html_url":"https://github.com/holochain-open-dev/membrane-roles","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/holochain-open-dev/membrane-roles","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holochain-open-dev%2Fmembrane-roles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holochain-open-dev%2Fmembrane-roles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holochain-open-dev%2Fmembrane-roles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holochain-open-dev%2Fmembrane-roles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holochain-open-dev","download_url":"https://codeload.github.com/holochain-open-dev/membrane-roles/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holochain-open-dev%2Fmembrane-roles/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29536918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T05:00:25.817Z","status":"ssl_error","status_checked_at":"2026-02-17T04:57:16.126Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["module","zome"],"created_at":"2024-12-06T01:16:47.137Z","updated_at":"2026-02-17T07:39:42.534Z","avatar_url":"https://github.com/holochain-open-dev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reusable Module Template\n\nThis repository is meant to be a scaffolding starting point to build reusable holochain modules (zome \u0026 UI module).\n\nThis is what is has included:\n\n- UI and Zome Instructions to use the module in a bigger app\n- Github Actions automatic integration with building and testing\n- Zome\n  - Basic sample code \n  - Integrated tests with tryorama\n  - Instructions to include the zome as a crate in any DNA\n- UI\n  - Reusable CustomElements with `lit-element`\n  - Automated demoing with `storybook`, also publishing to `gh-pages`\n  - Automated testing with `web-test-runner`\n  - Automated end-to-end testing with the holochain zome\n  - GraphQl common libraries and scaffold code\n  - See [open-wc](https://open-wc.org/) for all the available tools and documentation\n\n## How to scaffold a holochain reusable module\n\n1. Create a new repository from this template (you can use the `Use this template` button on the top of this page).\n2. Look for all the `TODO` keyword to see the places that need to be changed. (NOTE: replacing it inside the files can easily be done with your IDE, and for renaming files \u0026 directories you can use this bash one-liner: `new_name=YOUR_NEW_NAME_HERE find . -name \"*todo_rename*\" | while read line ; do mv $line $(echo $line | sed 's/todo_rename/$new_name/g') ; done`)\n3. Remove this section of this README.md until this next line.\n\n---\n\n# TODO_RENAME_MODULE\n\n\u003e TODO: carefully change whatever needed in this README.\n\nSmall zome to create and see calendar events, in holochain RSM.\n\nThis module is designed to be included in other DNAs, assuming as little as possible from those. It is packaged as a holochain zome, and an npm package that offers native Web Components that can be used across browsers and frameworks.\n\n## Documentation\n\nSee our [`storybook`](https://holochain-open-dev.github.io/calendar-events-zome).\n\n## Assumptions\n\nThese are the things you need to know to decide if you can use this module in your happ:\n\n- Zome:\n  - Optional dependency with the [resource-bookings-zome](https://github/holochain-open-dev/resource-bookings-zome).\n- UI module:\n  - `ApolloClient` as the state-management and data-fetching engine.\n  - The resolvers are declared in the frontend using [`makeExecutableSchema`](https://www.npmjs.com/package/@graphql-tools/schema).\n  - No framework or library assumed.\n\n## Installation and usage\n\n### Including the zome in your DNA\n\n1. Create a new folder in the `zomes` of the consuming DNA, with the name you want to give to this zome in your DNA.\n2. Add a new `Cargo.toml` in that folder. In its content, paste the `Cargo.toml` content from any zome.\n3. Change the `name` properties of the `Cargo.toml` file to the name you want to give to this zome in your DNA.\n4. Add this zome as a dependency in the `Cargo.toml` file:\n```toml\n[dependencies]\ntodo_rename_zome = {git = \"TODO_CHANGE_MODULE_URL\", package = \"todo_rename_zome\"}\n```\n5. Create a `src` folder besides the `Cargo.toml` with this content:\n```rust\nextern crate todo_rename_zome;\n```\n6. If you haven't yet, in the top level `Cargo.toml` file of your DNA, add this to specify which version of holochain you want to target:\n```toml\nhc_utils = {git = \"https://github.com/guillemcordoba/hc-utils\", branch = \"develop\", package = \"hc_utils\"}\nhdk3 = {git = \"https://github.com/holochain/holochain\", rev = \"7037aa2ccfb1ad9a8ece98eb379686f605dc1a0c\", package = \"hdk3\"}\nholo_hash = {git = \"https://github.com/holochain/holochain\", rev = \"7037aa2ccfb1ad9a8ece98eb379686f605dc1a0c\", package = \"holo_hash\"}\n```\n7. Add the zome into your `*.dna.workdir/dna.json` file.\n8. Compile the DNA with the usual `CARGO_TARGET_DIR=target cargo build --release --target wasm32-unknown-unknown`.\n\n### Using the UI module\n\n1. Install the module with `npm install @holochain-open-dev/calendar-events`.\n\nOR\n\nAdd it in your `package.json` with a reference to `holochain-open-dev/TODO_RENAME_MODULE_REPOSITORY#ui-build`\n\n2. Add the GraphQl schema and resolvers to your `ApolloClient` setup:\n\n```js\nimport { AppWebsocket } from \"@holochain/conductor-api\";\nimport {\n  calendarEventsTypeDefs,\n  calendarEventsResolvers,\n} from \"@holochain-open-dev/calendar-events\";\n\nexport async function setupClient(url) {\n  const appWebsocket = await AppWebsocket.connect(String(url));\n\n  const appInfo = await appWebsocket.appInfo({ app_id: \"test-app\" });\n\n  const cellId = appInfo.cell_data[0][0];\n\n  const executableSchema = makeExecutableSchema({\n    typeDefs: [rootTypeDef, calendarEventsTypeDefs],\n    resolvers: [calendarEventsResolvers(appWebsocket, cellId)],\n  });\n\n  const schemaLink = new SchemaLink({ schema: executableSchema });\n\n  return new ApolloClient({\n    typeDefs: allTypeDefs,\n    cache: new InMemoryCache(),\n    link: schemaLink,\n  });\n}\n```\n\n3. In the root file of your application, install the module:\n\n```js\nimport { CalendarEventsModule } from \"@holochain-open-dev/calendar-events\";\nasync function initApp() {\n  const client = await setupClient(`ws://localhost:8888`);\n\n  const calendarEventsModule = new CalendarEventsModule(client);\n\n  await calendarEventsModule.install();\n}\n```\n\n4. If you haven't yet, add the icons and font for material elements in your `\u003chead\u003e`:\n\n```html\n\u003chead\u003e\n  \u003clink\n    href=\"https://fonts.googleapis.com/css?family=Roboto:300,400,500\"\n    rel=\"stylesheet\"\n  /\u003e\n  \u003clink\n    href=\"https://fonts.googleapis.com/css?family=Material+Icons\u0026display=block\"\n    rel=\"stylesheet\"\n  /\u003e\n\u003c/head\u003e\n```\n\n5. Once you have installed the module, all the elements you see in our storybook will become available for you to use in your HTML, like this:\n\n```html\n...\n\u003cbody\u003e\n  \u003chod-cal-full-calendar\u003e\u003c/hod-cal-full-calendar\u003e\n\u003c/body\u003e\n```\n\nTake into account that at this point the elements already expect a holochain conductor running at `ws://localhost:8888`.\n\n## Developer setup\n\nThis respository is structured in the following way:\n\n- `ui/`: UI library.\n- `zome/`: example DNA with the `todo_rename_zome` code.\n- Top level `Cargo.toml` is a virtual package necessary for other DNAs to include this zome by pointing to this git repository.\n\nRead the [UI developer setup](/ui/README.md) and the [Zome developer setup](/zome/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholochain-open-dev%2Fmembrane-roles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholochain-open-dev%2Fmembrane-roles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholochain-open-dev%2Fmembrane-roles/lists"}