{"id":20564324,"url":"https://github.com/tarantool/frontend-core","last_synced_at":"2025-10-10T00:05:51.293Z","repository":{"id":35087510,"uuid":"204447343","full_name":"tarantool/frontend-core","owner":"tarantool","description":"Tarantool core module for pluggable WebUI development","archived":false,"fork":false,"pushed_at":"2023-11-15T11:57:14.000Z","size":10190,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-09-14T20:01:15.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tarantool.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2019-08-26T09:58:02.000Z","updated_at":"2025-04-09T06:00:52.000Z","dependencies_parsed_at":"2025-04-14T15:10:47.767Z","dependency_job_id":"a9c71353-34c8-457d-af58-13ae7946bf2d","html_url":"https://github.com/tarantool/frontend-core","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/tarantool/frontend-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ffrontend-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ffrontend-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ffrontend-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ffrontend-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarantool","download_url":"https://codeload.github.com/tarantool/frontend-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Ffrontend-core/sbom","scorecard":{"id":868676,"data":{"date":"2025-08-11","repo":{"name":"github.com/tarantool/frontend-core","commit":"7813574036011b3e3a977ff15bdd318303aae703"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":6,"reason":"Found 20/30 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/tarantool/frontend-core/tests.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:55","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"41 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-4wx3-54gh-9fr9","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-hc6q-2mpp-qw7j","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T03:29:08.808Z","repository_id":35087510,"created_at":"2025-08-24T03:29:08.808Z","updated_at":"2025-08-24T03:29:08.808Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002371,"owners_count":26083355,"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":"2024-11-16T04:25:40.416Z","updated_at":"2025-10-10T00:05:51.276Z","avatar_url":"https://github.com/tarantool.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tarantool Front-end Core\n\nIt's core module for admin UI. Any UI submodules should be register at core.\n\nIt has two parts. Lua part as rock that will be used at your project. JS part that will be compiled at Lua bundle. JS part based on React.\n\n# Architecture\n\n## Javascript\n\nIt's based on CRA. But with some details. Core is just a little React app that can route to correct module.\n\nIt can register a module in any time and route to it. This is main purpose.\n\nModule can be described by module namespace, react root component and menu description, which can be described in two way(about it later).\n\nExample of integration register a module:\n\n```js\nconst core = window.tarantool_enterprise_core;\nconst RootComponent = () =\u003e \u003cdiv\u003eModule\u003c/div\u003e;\ncore.registerModule({\n  namespace: 'module',\n  menu: [{label: 'Module', path: '/module/'}],\n  RootComponent,\n});\n```\n\n### window.tarantool_enterprise_core.install()\n\nRegister main react element in #root element. In Lua part it's called by default.\n\n### window.tarantool_enterprise_core.registerModule({ namespace: string, menu: menuShape, RootComponent: ComponentType\u003cany\u003e, menuMiddleware?: (Object) =\u003e void})\n\n#### namespace\n\nname of namespace. It will be used as namespace of your module. Prepend for routing.\n\n#### menu\nIt can be [reducer](https://redux.js.org/basics/reducers) for your menu or some static menu.\n\n\nDefault reducer(you can use something like this):\n\n```js\nconst matchPath = (path, link) =\u003e {\n  const point = link.indexOf(path)\n  return point === 0 \u0026\u0026 (link.length === path.length || link[path.length] === '/')\n}\n\nconst selected = path =\u003e menuItem =\u003e ({\n  ...menuItem,\n  expanded: menuItem.items.length \u003e 0\n    ?( menuItem.path === path ? !menuItem.expanded : menuItem.expanded)\n    : false,\n})\n\nconst updateLink = path =\u003e menuItem =\u003e ({\n    ...menuItem,\n    selected: matchPath(path, menuItem.path)\n})\n\nconst defaultReducer = (defaultState = []) =\u003e (state = defaultState, {type, payload}) =\u003e {\n  console.log('default reducer', state, type, payload, defaultState)\n  switch (type) {\n    case constants.SELECT_MENU:\n      return state.map(selected(payload.path))\n    case '@@router/LOCATION_CHANGE':\n      return state.map(updateLink(payload.location.pathname))\n    case constants.RESET:\n      return defaultState.map(updateLink(payload.path))\n    default:\n      return state\n  }\n}\n\n```\n\nExample of static menu:\n\n```js\n[{label: 'Module', path: '/module/'}]\n```\n\nOr can be described in more way:\n\n```js\n  label: string,\n  path: string,\n  selected: boolean,\n  expanded: boolean,\n  loading: boolean,\n  items: [menuItem],\n```\n\nIt's full state of menu item.\n\n#### RootComponent\n\nRootComponent can be any React Component. If you want using routing in module you should\nusing history from core component for menu updating.\n\n\nExample with `react-router-dom`:\n\n```js\nclass Root extends React.Component{\n  render() {\n    return (\n      \u003cdiv\u003e\n        test namespace:\n        \u003cRouter history={window.tarantool_enterprise_core.history}\u003e\n          \u003cSwitch\u003e\n            \u003cRoute path={'/test/test2'}  component={() =\u003e \u003cdiv\u003e2\u003c/div\u003e}/\u003e\n            \u003cRoute path={'/test/test1'} component={() =\u003e \u003cdiv\u003e1\u003c/div\u003e}/\u003e\n            \u003cRoute path={'/'} component={() =\u003e \u003cdiv\u003eDefault\u003c/div\u003e}/\u003e\n          \u003c/Switch\u003e\n        \u003c/Router\u003e\n      \u003c/div\u003e\n    )\n  }\n}\n```\n\nRoute should using same namespace of module. You should start all of your routes with `/test`.\n\nYou can use any technology inside that you want.\n\n#### menuMiddleware\n\nThis is a redux middleware for dispatch some custom events or add reaction on your custom events.\n\nIt should be using if you want do async loading of menu elements or some another dynamic changes. Or you want dispatch action on menu events from other modules.\n\n### window.tarantool_enterprise_core.register(namespace: string, menu: menuShape, RootComponent: ComponentType\u003cany\u003e, engine?: string, menuMiddleware?: (Object) =\u003e void)\n\nDeprecated method. Arguments type same as new method.\n\n#### menuMiddleware\n\nThis is a redux middleware for dispatch some custom events or add reaction on your custom events.\n\nIt should be using if you want do async loading of menu elements or some another dynamic changes. Or you want dispatch action on menu events from other modules.\n\n### window.tarantool_enterprise_core.checkNamespace(module: string)\n\nThrow error if module is already registered.\n\n### window.tarantool_enterprise_core.getModules() : Array\\\u003cmodule\\\u003e\n\nReturn registered modules.\n\n### window.tarantool_enterprise_core.notify({ title: string, message: string, details?: string, type: 'default' | 'success' | 'error', timeout: number}) : void\n\nShow notification. Title and message are text of notification.\n\nType influence on view of notification.\n\nTimeout is time in milliseconds for automatic hide notification. If timeout = 0. It's infinite time. You only can close it by your hands.\n\n### window.tarantool_enterprise_core.dispatch('setAppName', name: string)\n\nSets application name.\n\n### window.tarantool_enterprise_core.subscribe(eventType: string, callback: Function) : unsubscribe function\n\nReturn unsubscribe function.\n\nSubscribe to events of certain type. This can be used for cross module reaction.\n\n`callback(event)` - event could be anything include null.\n\nExample:\n\n```js\nconst unwait = this.subscribe('registerModule', () =\u003e {\n    const modules = this.getModules().filter(x =\u003e x.namespace === namespace)\n    if (modules.length \u003e 0) {\n      unwait();\n      resolve(true)\n    }\n})\n```\n\n\n### window.tarantool_enterprise_core.dispatch(eventType: string, event: any)\n\nIt's for cross module reaction. You can dispatch anything that you want.\n\n### window.tarantool_enterprise_core.components\n\nCollection of React components working with frontend core.\n\nExample:\n\n`AppTitle` - sets application title\n\n### window.tarantool_enterprise_core.apiMethods.registerAxiosHandler(eventType: 'request' | 'response' | 'requestError' | 'responseError', handler: (any, Array\u003chandlers\u003e) =\u003e any, priority?: number = 0)\n\nRegister axios handler. It's use a single responsibility chain inside. Handler should looks like:\n\n```js\n(r, next) =\u003e next(r + 1)\n```\n\nHandlers with negative priority will be called before handlers without priority.\n\nMore about context of usage [https://github.com/axios/axios#interceptors]. So request is request interceptor and requestError it's error on request. Also same for response with interceptors.response.\n\n### window.tarantool_enterprise_core.apiMethods.axiosWizard(axiosInstance)\n\nYou should use it for your axios instance for using same middlewares.\n\nExample:\n\n```\nwindow.tarantool_enterprise_core.apiMethods.axiosWizard(axiosInstance)\n```\n\n### window.tarantool_enterprise_core.apiMethods.registerApolloHandler(eventType: 'middleware' | 'onError' | 'afterware', handler: (any, Array\u003chandlers\u003e) =\u003e any, priority?: number)\n\nRegister handler for Apollo. Handler should looks like it:\n\n```js\n(r, next) =\u003e next(r + 1)\n```\n\n* `middleware` runs before query;\n\n* `afterware` handles successful responses;\n\n* `onError` handles errors.\n\nHandlers with negative priority will be called before handlers without priority.\n\nMore information here: [https://www.apollographql.com/docs/react/networking/network-layer/]\n\n### window.tarantool_enterprise_core.apiMethods.apolloLinkMiddleware\n\nLink middleware. Should use for working handlers.\n\nExample of usage:\n\n```js\nimport { from } from 'apollo-link'\n\nnew ApolloClient({\n    link: from([\n        window.tarantool_enterprise_core.apiMethods.apolloLinkMiddleware,\n        yourHttpLink,\n    ])\n})\n```\n\n### window.tarantool_enterprise_core.apiMethods.apolloLinkAfterware\n\nLink afterware. Should use for working handlers.\n\nExample of usage:\n\n```js\nimport { from } from 'apollo-link'\n\nnew ApolloClient({\n    link: from([\n        window.tarantool_enterprise_core.apiMethods.apolloLinkAfterware,\n        yourHttpLink,\n    ])\n})\n```\n\n### window.tarantool_enterprise_core.analyticModule\n\nWe add our analytic abstraction module. It support 2 types of event: Pageview and Action. By default it doesn't send any information.\n\nYou could send event with sendEvent and add own implementation of analytic by usage effect.\n\n```js\nwindow.tarantool_enterprise_core.analyticModule.sendEvent({\n    type: 'pageview',\n    url: 'https://tarantool.io'\n})\n\nconst unsubscribe = window.tarantool_enterprise.analyticModule.effect((event) =\u003e {\n    axios.post('https://myanalytics.io', { pageview: event.url })\n})\n\nunsubscribe() // unsubscribe from effect\n```\n\n\nTypings:\n\n```js\ntype Action = {\n  type: 'action',\n  action: string,\n  category: string,\n  label?: string,\n  value?: number\n}\n\ntype PageView = {\n  type: 'pageview',\n  url: string\n}\n\ntype AnalyticsEvent = Action | PageView\n\nsendEvent(AnalyticsEvent)\neffect(Function)\n```\n\n\n### window.tarantool_enterprise_core.pageFilter.registerFilter(MenuItem =\u003e boolean): unsubscribeFn\n\nRegister page filter and return unsubscribe function.\n\n### window.tarantool_enterprise_core.pageFilter.applyFilters(MenuItemType[]):  MenuItemType[]\n\nFilter out pages.\n\n### window.tarantool_enterprise_core.pageFilter.filterPage(MenuItemType):  boolean\n\nDoes page pass filters\n\n### window.\\_\\_tarantool_variables\n\nObject contains values passed from lua part.\n\n### Core events\n\n`dispatchToken` - transmits action to core redux store.\n\nExample:\n```js\nwindow.tarantool_enterprise_core.dispatch('dispatchToken', { type: 'ADD_CLUSTER_USERS_MENU_ITEM' });\n```\n\n### Emittable core events\n\n`setHeaderComponent` - Header component was passed to frontend core.\n\n`core:pageFilter:apply` - Emits on modifying page filters before applying. Provides an array of filtering functions.\n\n`core:pageFilter:applied` - Emits on modifying page filters after applying. Provides an array of filtering functions.\n\n## Rock\n\nCore module and other UI modules bundled as Lua files that contains bundle files.\n\n```console\n$ tarantoolctl rocks install frontend-core\n$ tarantool -l pack-front - build/bundle.json build/bundle.lua\n```\n\nCommand above make a bundle. Then it could be included as module at Tarantool Enterprise Admin.\n\nBundle usually contains a table\n\n```lua\n{\n  [filename] = {\n    is_entry = boolean,\n    body = string,\n    mime = string\n  },\n  ...\n}\n```\n\n- `is_entry` - indicate that's JS enter file of your module.\n- `body` - content of file.\n- `mime` - mime-type of file.\n- `filename` - filename or filepath.\n\n## Lua\n\n```lua\nlocal http = require('http.server')\nlocal httpd = http.new('0.0.0.0', '5050')\nhttpd:start()\n\nlocal front = require('frontend-core')\nfront.init(httpd, {\n\tenforce_root_redirect = false,\n\tprefix = '/tarantool',\n})\n```\n\nThis start a Tarantool Enterprise Admin without modules.\n\nYou can register a module in this way:\n\n```lua\nlocal my_module_bundle = require('my_module.bundle')\nfront.add('module_namespace', my_module_bundle)\n```\n\n### init(httpd: httpd, { enforce_root_redirect: boolean, prefix: string })\n\n`httpd` argument - should be an instance of a Tarantool HTTP server.\n\n`enforce_root_redirect` - optional key which controls redirection to frontend-core app from '/' path, default true.\n\n`prefix` - optional, adds path prefix to frontend-core app.\n\nRegister routes `/admin/` and `/static/`, and redirect from `/` to `/admin/` in `httpd`.\n\n`/admin/` - route for single page application admin module front-end.\n\n`/static/` - route for static files that will be used at application.\n\n### add(namespace, bundle, replace)\n\n`namespace` - using for namespace module. Should be same name as your JS namespace module.\n\n`bundle` - a frontend bundle loaded as a lua table.\n\n`replace` - if true, will replace exists module.\n\n### remove(namespace)\n\nRemoves front-end module.\n\n### set_variable(key, value)\n\nPasses value from lua to browser's global object `__tarantool_variables`.\n\nExample:\n```lua\nfront.set_variable('authPath', 'https://sso.example.com')\nfront.set_variable('threshold', 42)\nfront.set_variable('editorParams', {smarttabs: true, padding: 2})\n```\n\n## Development usage\n\nYou can use it in your frontend development mode with our npm package `@tarantool.io/frontend-core`, but you need use external `react` and `react-dom` from our package.\n\n### Install development package\n\n`npm i -s @tarantool.io/frontend-core`\n\n### Part of webpack config example\n\n```js\n  externals: {\n    react: 'react',\n    'react-dom': 'reactDom',\n    '@tarantool.io/frontend-core': 'tarantool_frontend_core_module',\n    '@tarantool.io/ui-kit': 'tarantool_frontend_ui_kit_module',\n  },\n```\n\n### Bundle to lua\n\nWe use plugin to bundle our static as Lua. Check it out here: https://github.com/tarantool/lua-bundler-webpack-plugin\n\n# Boilerplate \n\nStub project: https://github.com/tarantool/frontend-stub\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Ffrontend-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarantool%2Ffrontend-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Ffrontend-core/lists"}