{"id":14987592,"url":"https://github.com/magicbell/magicbell-js","last_synced_at":"2025-04-05T05:03:57.647Z","repository":{"id":59862661,"uuid":"536982661","full_name":"magicbell/magicbell-js","owner":"magicbell","description":"JavaScript/TypeScript SDK monorepo for MagicBell - The real-time notification inbox for web \u0026 mobile apps","archived":false,"fork":false,"pushed_at":"2025-04-02T23:10:53.000Z","size":10470,"stargazers_count":29,"open_issues_count":10,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T00:20:24.306Z","etag":null,"topics":["email-notification","monorepos","notification","notification-api","notification-center","notification-service","pushnotifications","react","real-time","slack-bot"],"latest_commit_sha":null,"homepage":"https://www.magicbell.com","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicbell.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":"2022-09-15T10:52:18.000Z","updated_at":"2025-04-01T19:30:48.000Z","dependencies_parsed_at":"2023-10-03T03:36:13.314Z","dependency_job_id":"7a402758-1cdc-4614-b2af-73c7647e7930","html_url":"https://github.com/magicbell/magicbell-js","commit_stats":{"total_commits":1658,"total_committers":20,"mean_commits":82.9,"dds":0.5826296743063932,"last_synced_commit":"e42b8c5f9d5cdc9a86d0c7767aa5ed2cbb268e58"},"previous_names":["magicbell/magicbell-js","magicbell-io/magicbell-js"],"tags_count":307,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicbell","download_url":"https://codeload.github.com/magicbell/magicbell-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289409,"owners_count":20914464,"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":["email-notification","monorepos","notification","notification-api","notification-center","notification-service","pushnotifications","react","real-time","slack-bot"],"created_at":"2024-09-24T14:14:58.898Z","updated_at":"2025-04-05T05:03:57.617Z","avatar_url":"https://github.com/magicbell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MagicBell\n\nThis monorepo contains JavaScript/TypeScript based SDKs to build a notification inbox for your site, powered by [MagicBell](https://magicbell.com).\n\n## Documentation\n\nYou can find the MagicBell documentation on [magicbell.com/docs](https://magicbell.com/docs). Documentation found in this README applies to the dev setup of this monorepo. It does not cover or apply to the consumption of the SDKs.\n\nFor SDK documentation see [magicbell.com/docs](https://magicbell.com/docs), or the package readmes at: [packages/core](packages/core), [packages/embeddable](packages/embeddable), [packages/magicbell-react](packages/react), [packages/react-headless](packages/react-headless).\n\n## Requirements\n\nThe development environment for this repo supports `node:v18` and up. We use `yarn` as package manager.\n\nYou'll need TypeScript 4.5 or higher for our bundled type definitions.\n\n## Setup\n\nRun the following commands in your terminal to get a copy of this repo, and install required dependencies.\n\n```\ngit clone git@github.com:magicbell/magicbell-js.git\ncd magicbell-js\nyarn\n```\n\n### Packages\n\nWhen working on the packages, you'll want to run the builder in watch mode. You can do so by:\n\n```\nyarn start\n```\n\nThis builds the packages, and recompiles all affected ones when you make changes in the `packages` folder.\n\n### Storybook\n\nWe have a single storybook instance available for stories in all packages. Run it with:\n\n```\nyarn start:storybook\n```\n\nAfter that, visit http://localhost:6006. Storybook will hot-reload on any change that you make in `/packages`. Make sure that you're running `yarn start` in another terminal, when you have the feeling that you're dealing with stale data.\n\n### Example\n\nThere is a vite based example application located in the /example folder. This gives one the opportunity to try out use cases in a production like environment. Run it with:\n\n```\nyarn start:example\n```\n\nAfter that, visit http://localhost:3000. The example app will hot-reload on any change that you make in `/packages`. Make sure that you're running `yarn start` in another terminal, when you have the feeling that you're dealing with stale data.\n\n## Contribute\n\nCode quality is set up for you with `eslint`, `prettier`, `husky`, and `lint-staged`. Please keep the pre-commit hooks enabled.\n\n## Optimizations\n\nYou can take advantage of [invariant](https://npmjs.com/tiny-invariant), [warning](https://npmjs.com/tiny-warning) and `__DEV__` to add development-only warnings which won't end up in our production bundles.\n\n```js\nimport invariant from 'tiny-invariant';\nimport warning from 'tiny-warning';\n\ninvariant(truthyValue, 'This should not throw!');\ninvariant(falsyValue, 'This will throw!');\n\nwarning(truthyValue, 'This should not log a warning');\nwarning(falsyValue, 'This should log a warning');\n\nif (__DEV__) {\n  // this is excluded from the production bundle\n}\n```\n\n### Tests\n\nTests are setup using [vitest](https://npmjs.com/vitest). They can be run once with coverage with `yarn test` or use `yarn test:watch` to run them in watch mode.\n\n```\nyarn test:watch\n```\n\n### Pull Requests\n\nWhen contributing changes, make sure to document them in a changeset. You'll usually do this when you're ready to push the changes and create a pull-request. To do so, run:\n\n```\nyarn changeset\n```\n\n`Changeset` will ask you for a change description, and how different packages are affected. Your answers help us determine if packages should be bumped in version, and if it should be a `patch`, `minor`, or `major` version bump. The description you provide may end up in our changelogs, please write it in a way that makes sense to our users.\n\nPlease review, polish, and commit the files after completing the steps.\n\nPlease use a descriptive title for pull-request. The title should be in semantic commit format, so we can use it as (squash merge) commit message and automate the release process.\n\nPlease add a description that explains the change. The changeset is likely to form a solid basis for your description, tho the pull-request description is written for our maintainers and thereby may be more technical and explain why certain decisions were made.\n\n## Publish\n\nPublishing new package versions is an automated process managed via the `release` workflow. To trigger a release, push a commit containing changesets (`yarn changeset`) to `main`. This will trigger the bot to open or update a pull-request named `next release`. Once that pull request gets merged, the bot will publish the new versions to npm and create the release notes on GitHub.\n\n### Manual publishing\n\nManual publishing is done in two steps:\n\n```\nyarn changeset:version\n```\n\nThis command consumes the changesets as collected in [.changeset](.changeset), and proposes changelogs and version bumps. Please review the proposed changes, and polish the changelogs. Make sure that breaking changes result in major version bumps.\n\nCommit the change with `git add . \u0026\u0026 git commit -m 'version packages'`, and move on to the next step to publish.\n\n```\nyarn changeset:release\n```\n\nThis will publish all changed packages to npm, and tag the last commit. Please don't commit anything between the release commit, and the publish action. These command are separate to enable you to check if the release commit is accurate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicbell%2Fmagicbell-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicbell%2Fmagicbell-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicbell%2Fmagicbell-js/lists"}